11-28-2012 02:21 PM
I know this is VERY basic, yet it is giving me fits. I have a toggle on the front panel of my vi. The user sets it to 'ON'. The vi runs until there is a triggering event. When the triggered event is sensed, it passes a 'true' statement to a case structure that sends an email message. At this point I want to turn the toggle 'OFF" so I don't get multiple emails telling me the same thing. Again, I know this is basic, I know someone is going to say, 'Set a flag!' and yes, I have done that in programming code. How do I do it in LabVIEW?
Ron
11-28-2012 02:24 PM
local variable
Right-click on your control, create->local variable
11-28-2012 02:26 PM
Excellent! I knew I was missing something simple. Much MUCH simpler than setting flags. Thanks. KUDOS!
11-28-2012 02:32 PM - edited 11-28-2012 02:32 PM
Store the boolean value in a shift register or feed back node. Then use some boolean logic. IF the old value is false and the new value is true, then execute the true case of the case structure.
11-28-2012 02:35 PM
RavensFan,
I like your example as well. I think crossrulz will work for me, but then again, I also have to worry about reseting it to on, don't I? By the way, I haven't watched more than 3 games this year in Philly. How the heck did you guys lose to them???!!!
11-28-2012 02:52 PM
Essentially here, the flag is the value stored in the feedback node. So if you want to make it on or off you can feed that value into the feedback node instead.
Philly.
Bad refs. We had a winning touchdown taken away on a suspect offensive pass interference call.