Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQ9181 turns off from while loop?

I am attempting to update a VI for chromatography data acquisition. DAQassist is running in a while loop as a trigger to begin data collection based on external voltage signal going low. A separate DAQassist reading from the same cDAQ9181, but different channel, appears to be stopped based on the while loop upstream in the sequence. The VI proceeds normally if two different cDAQ units are used. Is it possible to use the same cDAQ in this VI?

0 Kudos
Message 1 of 7
(1,900 Views)
  1. Please (please!) spend more time programming and doing tutorials instead of turning the diagram into an easter egg party with glaring colors.
  2. Don't use stacked sequences!
  3. Are you using "continuous run" mode?

Sorry, I won't even try to debug this monstrosity. Try to learn about state machines! Once you improve the architecture, things will make more sense.


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2 of 7
(1,883 Views)

Link to State Machine tutorial.


GCentral
0 Kudos
Message 3 of 7
(1,834 Views)

Thank you for your time. Apologies for aesthetics and suboptimal architecture.

Is there a known issue with using sequence structures that affects sequential calling of the same cDAQ, i.e. where stopping a DAQassist within a while loop would inactivate the same cDAQ for use in following sequences? If not a specific issue for sequence structure then it may affect state machine use as well. This VI works if two separate cDAQs are used, but at a cost of double the data acquisition resources (cDAQs).

0 Kudos
Message 4 of 7
(1,805 Views)

Quick Update: The VI also works when reading from a single cDAQ-9184 but signals arising from two individual NI 9215 modules.

0 Kudos
Message 5 of 7
(1,799 Views)

To be clear, it doesn't look like you're actually stopping the DAQ Assistant tasks - if you right click on them and click Open Front Panel you can see their block diagrams (or perhaps equivalent block diagrams). If you want to go back to DAQ Assist, you can just close the new window (Defer Saving) and use Undo - you'll get a message asking if you want to save or not the new VI, click Don't Save. 

 

They're 'Preallocated Reentrant Clones', so one shouldn't mess up the other. Some quick testing suggests they also don't mind being called in multiple For iterations within a While loop (as Altenbach already pointed out - it's not so easy to work out what's what when While loops are green...) but I didn't try with Sequence structures.

 

What do you mean by "appears to be stopped based on the while loop upstream in the sequence"?


GCentral
0 Kudos
Message 6 of 7
(1,791 Views)

 

What do you mean by "appears to be stopped based on the while loop upstream in the sequence"?


The data acquisition process records NaN as the for loop executes, as if the DAQ assistant or cDAQ module has been stopped by the previous while loop. Everything appears to proceed as programmed except no data is acquired.

Thanks again for your time. I will proceed with the cDAQ-9184 and two 9215 modules as an acceptable allocation of resources...while I try to learn more programming.

0 Kudos
Message 7 of 7
(1,771 Views)