LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tring to save data for n iterations, beginning when SAVE button is pressed

OK, I'm STILL struggling with this vi.  (See post from 12/16).  I've cleaned up the code considerably, and better defined what it is I want to accomplish.  When the vi begins, I want to immediately begin displaying on the front panel 3 values: Indicated Flow Rate O2, Indicated Flow Rate N2, and Helium Concentration.  When the operator presses the SAVE button, I want the next n iterations to be saved to file.  N is determined by the Measurement Duration (in minutes) divided by the measurement interval (in seconds).  After the desired number of data points are saved, the operator can press the stop button, at which time the vi goes to frame 1 of the sequence, shuts off the Helium Solenoid and returns the detector to standby.  The whole key to this vi is being able to monitor the data in real time, and decide based on measurement criteria when to begin saving the data, initiated by pressing the SAVE button.  Somehow, I know I need to initiate the save with the case statement, and then save the data (n-1) more times.  When I tried a loop within a loop, I just saved the same data for the given # of iterations, and then the displays began updating again.  Is this making any sense at all?  I'm beginning to understand what an aneurism feels like.

0 Kudos
Message 1 of 3
(2,481 Views)

Hiiii,

              Please post your sub vis which could help us to analyze ur total vi, coz it is difficult to judge, whats happening in ur vi.

Thanks,

Nishant

Message 2 of 3
(2,466 Views)

One possibility solution is attached. Basically, we have a shift register that contains zero and regulates a case structure. Case zero is empty. If save is pressed, we feed a positive, nonzero number to it , which triggers the default case that (1) saves a data point and (2) decrements the shift register. This contiunes until the shift register reaches zero again.

Modify as needed.

btw: there is no reason for any local variables, use direct wires. 😉

0 Kudos
Message 3 of 3
(2,461 Views)