LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How keyboard control Button in Event structure

Highlighted

Hello

First I am Just a beginner in Labview 

I just make a program that Consist of 4 button controling 4 LEDs Using Event Structure

The Problem is I did not want to operate the button by the mouse click but

i want to operate the button using the arrow keys in keyboard

 

 

T

 

0 Kudos
Message 1 of 11
(10,329 Views)

Please refer to this VI. Hope this helps.

 

 

0 Kudos
Message 2 of 11
(10,320 Views)

Thank you

But Can I ask waht is this in the image 

Sorry I am just begginer

Thank you again 

 

 

Abdo

0 Kudos
Message 3 of 11
(10,304 Views)
that is an enumerated constant it is found on the numerics palette
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcomeSmiley Happy
0 Kudos
Message 4 of 11
(10,301 Views)
0 Kudos
Message 5 of 11
(10,300 Views)

VKEY is the key you are comparing to or what have you...

 

you can get to it by left clicking on the rectangle.

 

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcomeSmiley Happy
0 Kudos
Message 6 of 11
(10,292 Views)
What is its importance
0 Kudos
Message 7 of 11
(10,291 Views)

well in you example it is used to compare what key was pressed so that you get a read out of true or false so if I hit the up key the up led is set to true due to the VKEY being = to up

 

so it is important

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcomeSmiley Happy
0 Kudos
Message 8 of 11
(10,285 Views)

Hi, I tried implementing your example. I'm trying to use the keyboard to control boolean buttons to make my "throttle bar" move up and down. It works, but I can't get it to switch until release when I hold down on my keyboard. My stop and clear buttons also doesn't seem to work when I put in the event structure.

 

I'm a total newbie. Help! Smiley Sad

0 Kudos
Message 9 of 11
(8,317 Views)

Hi saiko,

 

when you're a "total newbie" you should at first go through all those free online LabVIEW courses offered by www.NI.com!

 

Try this:

check.png

 


My stop and clear buttons also doesn't seem to work when I put in the event structure.


 

How did you configure the event case? When putting those buttons inside the event structure you have the tell that structure how/when to handle them. Did I mention the free online courses?

 


but I can't get it to switch until release when I hold down on my keyboard.


 

Do you want to use the automatic key press repeat feature? Well, you have to configure the event: right now it's "key press", but you probably want an event like "key repeat"? You may read the LabVIEW help on available events...

Best regards,
GerdW
CLAD expired, using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

Message 10 of 11
(8,289 Views)