LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

key down, and boolean value change in one event?

Solved!
Go to solution

Hi,

 

I'm having difficulty with my VI, i have a "next" and a "previous" button (booleans). I want to fire the same event in the case when: the left or right arrow keys are pressed or when the next or previous buttons are pressed.

 

When i add all the events in one events case, i can't determine what key is pressed i get an event with all key presses, which is fine, but i realy need to know if the right or left arroy key is pressed.

 

Anyone,

 

Best regards,

Thijs Boeree

 

PS. i also want to a slider and want to control the slider with the next and previous buttons, but maybe that's another sort of question...

0 Kudos
Message 1 of 5
(2,552 Views)

Hi Thijis,

              I have modified your VI using two case structures.In this you can add any further modifications according to your requirement.

              Hope this helps.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 2 of 5
(2,547 Views)
Solution
Accepted by ThijsBoeree

Hi  ThijsBoeree

 

 

Hope the following VI will suit your requirment. In this VI, I am filtering the keys only for left and right.

 

Regards

 

Javed.

0 Kudos
Message 3 of 5
(2,539 Views)

I am going to do it on antother way, but thanks for the help! I am going to register all my frontpanel objects first and then use references to them, and i am going to make several Event cases, with the same sub VI in it.

 

Best regards,

Thijs

0 Kudos
Message 4 of 5
(2,528 Views)

Hi Javed,

 

your example code works well for this special problem. However, in most cases it will be not very usefull, since all pressed keys (except for the trigger keys "left" and "right") are dicarded. So, text input for example, is no longer possible.
Keep this in mind.

 

Best regards

 

transfererror

0 Kudos
Message 5 of 5
(2,449 Views)