LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure resets local constant

I'm using a event structure to change the value of a switch with a press button. To change the value i'm using a local constant. But when I pres the stop button the event structure sets al the local constants to zero. How can i prevent this?
0 Kudos
Message 1 of 2
(2,665 Views)
Put the locals INSIDE the case you want to change them in. Putting them outside makes them get updated with default values everytime the loop runs and does not execute the "CtrUp" or "CtrDown" cases.

Or you need to explictly set values for the locals in the other cases. The "Use Default if Unwired" is whats killing.

Optimally, you would combine CtrUp and CtrDown in the same event case and use the value of either CtrUp or CtrDown to decide which values the locals got.
Message 2 of 2
(2,665 Views)