Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

Can we run two while loops independently in one application?

I am acquiring two channels using PCI-6052.both channels to be read at 2ks/s,but I want to scans read at a time different for each channel,So I put two AI-read vi's in two different while loops.but the second while loop waits until the first is completed.Can we run independently both while loops?
0 Kudos
Message 1 of 2
(2,735 Views)
Sounds like there is some 'data dependancy' between your loops. Delete all wires connecting them to have them run independantly.

However, since you are acquiring these two channels at the same rate I'm going to suggest an alternative to avoid software synchronization issues:

Since you are using AI Read I'm assuming you're using Traditional NI-DAQ (as opposed to NI-DAQmx). With traditional NI-DAQ, the default interchannel delay during read is as fast as possible (i.e. 1/max scan rate). This definitely can be changed (with AI Config I think). Another alternative: with NI-DAQmx, the default interchannel delay is to spread out the Reads over the user-specified scan interval.

David Moerman
TruVIEW Technology Integration Ltd.
0 Kudos
Message 2 of 2
(2,735 Views)