LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Limiting Number of data samples acquired

Hello,
Im a new user to Labview and I am having a problem with my data acquisition. I built the attached VI to cycle a hydraulic cylinder between 2 setpoints for a number of cycles. I am also acquiring the maximum values for torque and pressure every cycle and building an array.
The problem I am having is that if I run the VI and use a 'hold time' option (which will maintain the required SP Pressure/Torque for the 'hold time'), my VI will gather data for the duration of the 'hold time' (collecting several points for max pressure, max torque and cycle number). What I am trying to do is only obtain a single data point during that time. Im not sure on how to modify my VI to achieve this.

Any help or suggestions would be
greatly appreciated.

thanks,
David
0 Kudos
Message 1 of 2
(2,501 Views)
I assume you know in the code when you are entering the hold time. If that is so I would suggest creating a indicator boolean that is like "Holding". So you now have a holding variable and a holding state.

Now in the code place a case structure around the DAQ reads, with the following boolean logic. if Holding variable is true and the state is holding DON't do DAQ.

Now if holding is false but holding state is True make a reading and set Holding variable to true.

If Holding is false and holding state is false take a reading and leave holding as false.

This way you will take readings whenever you are not in the holding state. When you are in the state, you will only take the first reading and then you will not read.
0 Kudos
Message 2 of 2
(2,501 Views)