LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cause Event 1 or Event 2 or Both???

Very helpful to all ... thanks.
 
Have a nice weekend.
 
Will surely humm on Monday.
0 Kudos
Message 11 of 18
(619 Views)

I have a question.  I am currently handling a 14 case event structure.  12 cases are using booleans with 'Value Change' events handled by each case. (they work perfectly)  Two cases need to invoke scan codes or use the 'Acquire Input data' vi from the 'Input device control pallet'.  Why am I getting the "Duplicate event handlers are not allowed" error message when assigning just two cases to 'Key Up' by the two events handled differently??

0 Kudos
Message 12 of 18
(499 Views)

...the bottom line is: I need two of the 14 events handled by scan codes or custom key strokes assigned to the vi itself or two different Booleans.

0 Kudos
Message 13 of 18
(498 Views)

Post your VI!

0 Kudos
Message 14 of 18
(495 Views)
0 Kudos
Message 15 of 18
(483 Views)

I wouldn't use the Acquire Input Data.vi.  You are already capturing the button press by way of the Key Up event case.

 

In your Key Up event case, put a case structure that you wire the key code into.  If the key code equals 18, do one thing.  If it equals 45 do another.  The default case (for all other key codes) does nothing.

 

Then you can have another couple of event cases that handle the Value change events for the buttons, each case doing what you need which would probably be identicaly code to what you put in the case structure of the Key Up event.

0 Kudos
Message 16 of 18
(479 Views)

Actually, I could try consolidating the Key Up events as you suggest - good idea!  Thank you.  I am not sure if creating two Value change events would give me a conflict or not however.  Are you suggesting I could OR the result of either Key up event case to its appropriate Value change? 

0 Kudos
Message 17 of 18
(467 Views)

Thank you!  That works!

0 Kudos
Message 18 of 18
(463 Views)