LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save data on state change

I’m using Labview 2010 p1 and trying to figure out have to save data on a specific change in the data.  I have a VI that I can;

  • Watch the data change real time
  • Save single shot or continuous data
  • Save if data goes over “x”

But what I now need is to save once when the data goes over, then watch till the data goes under “x”, and repeat.  So instead of continuously saving data (a waste), only want to save data when the motor first starts and when the motor stops.  So I will have just two segments of data instead of 100’s.

Does this make sense?

SKIP

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

If your program already saves data when a threshold is passed on the increase, then you have accomplished much of what you need. Have the state change set a boolean to indicate to the data save to save the data, then have the data save reset it, then have the state change below the threshold set it again to allow saving, ... The state change boolean can be in a Functional Global, a single element queue, or depending on the structure, held in a shift register around the threshold determining code.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



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

I'm not sure what you are saying to try.  I've searched "change state boolaen" and did not find examples or information on how to build one.  Would you have an example for it? 

I also attached my file, like I said it currently only runs when the data goes above X, I'm looking to save once when it goes above and again when it goes below X.

Thank you for your help

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