Jump to content

Programmatically "Discard Event" in an event structure


Recommended Posts

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)?

Link to comment

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

Link to comment

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

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.