Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

starting counter immediately after analog acquisition

Attached are programs of my application.
How can i start the digital acquisition immediately after the analog acquisition? If its not possible to do it without delay, is there anyway that I can acquire both the analog & digital acquisition concurrently? Currently, I'm seeing a delay of about few milliseconds(inconsistently) in starting the counter after i had completed my analog acquisition of 20msec, the worst thing is that the delay that I'm facing is not consistent.

The inconsisent delay is a major problem as both signals that i'm acquiring should not have a significant delay between their acquisition or in a worst case situation, the delay is at a fixed/consistent value so that i can offset t
he time delay back.

1. why is the delay inconsistent although i'm acquiring the same signal using the same software?

2. what should i do to keep the delay consistent or avoid the delay?
Download All
0 Kudos
Message 1 of 2
(2,546 Views)
It was helpful to see your VI in order to get a better understanding of your application. From looking at your VI, I am assuming that the digital acquisition your question refers to is actually buffered event counting.

I will address your two questions separately:

1. The delay is inconsistent because it depends upon how quickly your computer executes your application. The execution time depends on the resources currently available to your CPU. Therefore, the delay will be inconsistent.

2. The best way to be certain of your timing is to rely upon hardware, rather than software, to control the timing. You can do this if you use the same external signal to start your analog acquisition and buffered event counting at the same time.

It looks a
s though you are basing your VI off of the Count Buffered Edges (DAQ-STC).vi shipping example. You can combine this with the Acquire N Scans Digital Trig.vi shipping example. Then connect the external signal which you are routing to the counter's gate in the Count Buffered Edges example to the digital trigger input (PFI 0) for the analog acquisition. The analog acquisition will then start at the same time your counter receives its first pulse to count.

I hope that this helps!

Sonya
Message 2 of 2
(2,545 Views)