LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a variable based on my current state, and default to tha variable if needed.

I am working on a VI to control a robt car.

 

What I am trying to do is set a variable based on my current state.  For example I have 3 indicators, if the left one is active I want the varable set to a certain value, if the right is active I want the variable set to a different value.

 

The purpose is f all my indicators become inactive, I will have my vi default to the last state, which it gets from the variable t has been set.

 

Is there any way to do this is Lab View 2012.

 

thanks

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

You can store your state information in a shift register or use a functional global or DVR. If you want to have persistant storqage then you will need to write the data to a file.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 3
(2,219 Views)

Just to clarify the only state information I need stored is my current state, this way if I lose my state, and can default ack to my last knwn state.  Any other state prevous is irrelevant for my purposes.

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