LAVA 1.0 Content Posted January 17, 2008 Report Share Posted January 17, 2008 Hi there, I have one question.. Is it possible to discard an event (a boolean (button press) event)? I dont want the event to get triggered when i toggle the boolean from "True" to "False" I know that the "Panel close?" has this feature available on the event structure (see the image attached) , but how to make it visible for the boolean events (or any other events)? Quote Link to comment
Ton Plomp Posted January 17, 2008 Report Share Posted January 17, 2008 QUOTE(guruthilak@yahoo.com @ Jan 16 2008, 09:34 AM) Hi there,I have one question.. Is it possible to discard an event (a boolean (button press) event)? I dont want the event to get triggered when i toggle the boolean from "True" to "False" I know that the "Panel close?" has this feature available on the event structure (see the image attached) , but how to make it visible for the boolean events (or any other events)? Auto discarding can only be done with filter events. (the ones ending with a '?') These are mostly key down? and mouse down? like actions. What's a boolean event? Ton Quote Link to comment
LAVA 1.0 Content Posted January 17, 2008 Author Report Share Posted January 17, 2008 What's a boolean event? what i meant to say that you create an "value Change" event for an boolean... Quote Link to comment
Tomi Maila Posted January 17, 2008 Report Share Posted January 17, 2008 There are two types of events 1) static events and 2) dynamic events. Static events are directly subscribed by the event structure and cannot be unregistered. Dynamic events on the other hand can be registered and unregistered as you wish. When an event is registered, it can be catched with event structure. When an event is unregistered, it will be ignored by the event structure. To register events, use register for events node and wire your boolean control reference as the event source. To unregister events, use the same node but this time use existing dynamic event registration refnum and wire null reference to the to the event source input. So actually you change your event to listen to a non-existing boolean button instead of your real one. Then you can change it back when you feel like it. For more details see an example VI Dynamically Register for Events.vi shipped with LabVIEW located in labview\examples\general\dynamicevents.llb Cheers, Tomi Quote Link to comment
Aitor Solar Posted January 17, 2008 Report Share Posted January 17, 2008 Maybe I'm missing something, but it wouldn't be much simpler just to chek if the new value is "true" and then do nothing? Saludos, Aitor Quote Link to comment
TobyD Posted January 17, 2008 Report Share Posted January 17, 2008 QUOTE(Aitor Solar @ Jan 16 2008, 03:43 AM) Maybe I'm missing something, but it wouldn't be much simpler just to chek if the new value is "true" and then do nothing?Saludos, Aitor Something like this: http://lavag.org/old_files/monthly_01_2008/post-8758-1200503208.png' target="_blank"> Or as Aitor said you could check that the NewVal parameter is True. Quote Link to comment
Justin Goeres Posted January 17, 2008 Report Share Posted January 17, 2008 You can also reduce TobyD's example by using the Compound Arithmetic primitive in AND mode, with the OldVal input inverted. Quote Link to comment
Tomi Maila Posted January 17, 2008 Report Share Posted January 17, 2008 QUOTE(TobyD @ Jan 16 2008, 07:08 PM) Something like this: Just curious, what kind of transformation would have NewVal true but OldVal something else than False assuming that the Value Change event has been triggered. Tomi Quote Link to comment
Ton Plomp Posted January 17, 2008 Report Share Posted January 17, 2008 QUOTE(Tomi Maila @ Jan 16 2008, 07:54 PM) Just curious, what kind of transformation would have NewVal true but OldVal something else than False assuming that the Value Change event has been triggered. Value signalling. If you sent a property 'Value(Sgnl)' the event will always be triggered. Ton Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.