LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple separate acquisitions required

Hello,

I would like to be able to keep my VI running while I let the user acquire data, stop acquiring, change some task parameters, and begin acquiring again.  I have two versions of my program attached.  The first (3-Sequence) does not allow this functionality, but has as good a style as I can muster (low number of sequence structures and local variables).  The second (4-sequence) I created on the advice of someone more expert in LabView than I.  He said I could just create a big stacked sequence structure, which would both save space on the block diagram and allow me to continually cycle through easily.  Unfortunately, it also requires more sequence locals and/or local variables.  Should I have stuck with the linear style (as in 3-Sequence) and found some way to send the user back to the beginning? What is the proper way to implement this?

In that vein, is it a bad idea to create "large" SubVI's as I have here (such as Write Config and Read Config) ? 

I would welcome any additional comments you have on how I can make my code cleaner and/or more efficient!

Thanks,
Adam
Download All
0 Kudos
Message 1 of 2
(2,621 Views)

Hi, Adam.

The size of your Read and Write Config VIs is great. In terms of the architecture of your application, it sounds like you probably want to use one of the following design patterns:

Producer/Consumer - commonly used when acquiring multiple sets of data to be processed in order
Master/Slave - commonly used when responding to user interface controls while collecting data simultaneously
State Machine - used in applications where distinguishable states exist

They each have their pros and cons; I recommend reading over the tutorials to see which one is most applicable to your situation. If you have more questions, please let me know.

Have a nice afternoon!

 
Sarah K.
Search PME
National Instruments
Message 2 of 2
(2,587 Views)