LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Recommended structure for seperation of measurement and control

Solved!
Go to solution
Hi everyone, I´m going to write a labview program for a test-stand that demands to control external hardware via the outputs of NI-DAQ modules in a DAQ usb chassis and also various measurement tasks via DAQ-modules in the same chassis. The output has to run for a rather long time, lets say for about an hour, and shouldn´t be interrupted by (i.e. by errors in the labview code). Measurements will be done occasionally but require the variation of some output parameters. For this kind of setup, would you rather recommend to separate the control - and measurement parts into two VIs and let them communicate via global variables or rather put them into one VI with refined error-handling to avoid failure of the output? Or, of course, are there other, better suited approaches for this kind task? Thanks for your ideas!
0 Kudos
Message 1 of 4
(3,040 Views)
Solution
Accepted by topic author Ingo1

You can consider master - slave architecture with 1 master and 2 slaves.  One slave can carry out the control and other measurement.

For intercommunication between loops: you can use globals or queues. Queues are recommended than globals (freedom from racing  Smiley Happy )

 

Post back if any queries.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Message 2 of 4
(3,032 Views)

thanks, 

after reading the introduction to the master slave model, I will consider using it for my project.

 

Would it be suitable to write a master VI that handles frontpanel changes  and communicates with the slave-VIs (not sub-VIs) for control and measurement via queus (if thats possible) or would it rather be a master vi that contains slave-loops for control and measurement? 

 

Also, unfortunately, the formating of my initial post got lost, sorry for that 😉

0 Kudos
Message 3 of 4
(3,008 Views)

well, after some time spend on the project, it was blown out to an event-driven input loop, three queued-state-machines for control- and recording purposes and another queue 

for measurement-data transfer. Also I´m getting close to the point of losing track.

 

Do you think the best way to transfer the measurement-data (6 channel waveform array) to the tdms-recording loop and the control loop via 2 queues?

0 Kudos
Message 4 of 4
(2,938 Views)