From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How keyboard control Button in Event structure

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
(14,286 Views)

Please refer to this VI. Hope this helps.

 

 

0 Kudos
Message 2 of 11
(14,277 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
(14,261 Views)
that is an enumerated constant it is found on the numerics palette
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 4 of 11
(14,258 Views)
0 Kudos
Message 5 of 11
(14,257 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 welcome:)
0 Kudos
Message 6 of 11
(14,249 Views)
What is its importance
0 Kudos
Message 7 of 11
(14,248 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 welcome:)
0 Kudos
Message 8 of 11
(14,242 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
(12,274 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


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 11
(12,246 Views)