Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

How to sync an AI and a DI task to get simultaneous reading ?



My project has a voltage signal repeating at 4 KHz, which is a group of 4 succeeding signals. The group repeat at 1 KHz (a b c d a b c d a b c d....).


The sampling clock will be a few MHz so that I can take n samples per trigger and average them.


If I just use a retriggerable AI task at 4 KHz, I won't be able to tell those four apart.


I also have a 1 KHz trigger that marks the beginning of each group, which can be read by a DI task (rising edge).


Is there a way to somehow sync the AI and DI task so that I can tell the four signals apart ?


Thanks in advance !

0 Kudos
Message 1 of 3

What is 4 kHz? The a-b-c-d pattern repetition rate, or the frequency of the indivudal signals? Why should the samples be averaged? What kind of signals are we talking? Please be more specific.

Best regards

0 Kudos
Message 2 of 3

It'll also help to know what DAQ hardware you have for this app.


I'd normally *want* to approach this with a retriggerable AI task, but I'm not sure that's gonna be able to work out here.  The problem will be the fast turnaround time you'd need after capturing one trigger's worth of data.  Ideally, you'd want to capture nearly a full msec worth of data but the closer you get to that full msec, the less time you have to retrieve one trigger's data before the next trigger arrives.  You're always gonna be trying to do this in a fairly small fraction of a msec, and I wouldn't be confident that this would work reliably under Windows.


Instead, I'd probably capture the trigger signal as an additional AI channel in the same task.  Then I'd collect many triggers worth of data all at once and post-process to find the trigger instants and split up the data correspondingly.



-Kevin P


P.S. Nothing in the original description made it sound like a DI task would be of any particular benefit, hence no discussion of syncing AI and DI tasks.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW?

(Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).

0 Kudos
Message 3 of 3