Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing to long in finite sample mode with ni usb 6212

Hey,
I have a problem with my timing in a vi.
I use LV7.1 and a HW NI USB-6212 multifunction data aquisition device.

Want I want to do is this:

Every second:
- give out a voltage on AO0,
- then measure in mode finite 2750 values on Channel AI0 with 11kHz samplerate,
- then give out another voltage on AO0,
- wait for the next second.

To wait for the second i use a TimedLoop. In the TimedLoop i have three sequences,
to do the above.
Theoretical the time for the AI is 2750 * 1/11kHz = 250ms.
Therefore my voltagepulse must be 250ms long. I measured this with an oscilloscope and
i get 250ms + an offset. The offset is between 40ms - 60ms.
If i reduce the samples e.g. 100, then i get 9ms + that offset.


Without the AI part, i can it switch off with the AIOnOff switch,
i have my pulse with 250ms.


My question is where comes the offset.

No other USB devices are connected on my PC.
I can not belive that this is the time for transmit the data from the USB-6212 to the pc
in finite mode.

 

I have attached my vi.
Have anybody a hint for me.

Thanks Tom

 

0 Kudos
Message 1 of 2
(2,629 Views)

Hi UBTTom,

the acquisition of the 2750 sample lasts exactly 250 ms but the overhead created by "code execution + data transfer through the USB bus + retrieving the data from the RAM+any parallel task of the OS" is delaying the execution of the next code step (the one where you bring the voltage to -0,25V) nad as consequence also the time the singl.

With some boards, but not yours, a solution would be to loop back the AO to use the analog triggering features to be sure that the execution of the sequence you desire is HW controlled and not SW controlled.  

 

Since your boards doesn´t have this feature you have to implemet it in the SW wihtout any determinism or to loop back a digital trigger for your analog acquisition but I don´t know if it is a feasible solution on you side.

 

BEst regards.

 

Andrea P.

 

 

 

 

 

 

 

0 Kudos
Message 2 of 2
(2,586 Views)