LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I prevent an event triggering multiple times

Hi
 
I have a simple event structure inside a case structure inside a while loop! The while loop has a shift register to feed back the output of one case to select the next case to be run (typical state machine).
 
The event structure is inside a 'ProductScan' case, and on pressing the OK button, a message is displayed and then , the 'ProductScan' case is exited and the 'Test' case begins. On completion of the test, the 'ProductScan' case is reselected.
 
The problem I am having is that if the OK button is hit twice by accident, when the 'Test' case exits and the 'ProductScan' case re-enters, the extra OK button press is being remembered and the 'Test' case is being started again. Is there a way to prevent multiple occurances of the same case being called - I do have the lock front panel until event completes selected.
 
Cheers
0 Kudos
Message 1 of 2
(2,579 Views)

IHi,

ts better you disable that 'OK button using its property node and setting property as disabled and later enable it after your event has finished execution.

regards

Dev

 

0 Kudos
Message 2 of 2
(2,571 Views)