From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

which event trigger is used?

Hi Labview Forum,

I have an event case which is triggered by multiple events (value changes from a variety of controls).

When the event case is triggered, how can I find out which of the event triggers were used?

This would allow me to reduce the amount of work done when depending on the trigger.

Regards,
Jamie
Using Labview version 8.0
0 Kudos
Message 1 of 3
(2,075 Views)
The CtlRef terminal returns the reference of the control that was causing the event.

Ton


Message Edited by TonP on 02-27-2008 10:18 AM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 3
(2,070 Views)
Each event case has terminals on the left side which return the event data. When you configure multiple events for a single case, the available terminals are only the terminals which are common to all the configured events. If you are only using value change events, you should have a CtlRef terminal, which will return a reference to the control which triggered the event. If you build the references of your controls into an array and search that array for the reference, you know which control triggered the event. Not the cleanest code, but it works.

___________________
Try to take over the world!
0 Kudos
Message 3 of 3
(2,068 Views)