LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question on usage of event structures

Hi:
I have three buttons to trigger three different events. event1, event2, event3
If I want to trigger event1 just after event3 was triggered, how should I design it?
Do I need to use Dynamically Registering Events?
 
i.e. Click button3>>Trigger Event3>>Automatically Trigger Event1...
p.s. Event 1 also could be triggered by button1.
 

由 zenith 在 02-22-2007 01:46 PM 上編輯的訊息

0 Kudos
Message 1 of 3
(2,735 Views)
Good afternoon Zenith,

Have you tried to use the Value (Signaling) property of the button.  That is, inside of your Event3 case, simply read the value of Button1 and wire it back into this property, excepted with a "not" in between.  This will change the value of the boolean and fire the event associated with value change from Button1.  If you need to immediately change the value of Button1 back, you can use the regular value property, or a local variable.  One issue that might arise is that you cannot use this property if you choose a latched boolean.  That is why you may need to immediately change the value back.

I hoipe that helps,
0 Kudos
Message 2 of 3
(2,721 Views)
Perhaps the code to be executed when event 1 occurs (either from button 1 being pressed or from event 3 completing) should be outside the event case in a parallel loop. Then send a message via notifier or queue from the event 1 case or the conclusion of the event 3 code.

It might be better to use different terminology to distingush between the EVENTS (a button being pressed) and the TASKS (the actions performed in response to an event). Using this terminology, Event 1 causes Task 1 to execute. Event 3 causes Task 3 to execute. The last step in Task 3 is to call Task 1.

Lynn
0 Kudos
Message 3 of 3
(2,717 Views)