LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Assigning key to while loop end boolean

Hi!,

In my vi the user is required to press many buttons on the GUI to get some final data. Each of these buttons have to be pressed in given fixed order. Presently, the user has to click with a mouse.

All buttons are booleans to end their respective while loop and move into the next/outer while loop. Some of the while loops are nested.

Is it possible to assign the same keyboard key (to all buttons) such that pressing it will do the job of clicking the current active button? I would prefer this key to be the 'space bar'.

The application allows only one hand to be free. The other hand will be used to place test component and rotate it manually below the sensor. Thus, such a feature makes the user's task very easy. H
e just keeps clicking the space bar until the vi ends. It is upto the user sle discretion when he ends a particular stage (while loop) and moves into the next.

I am using LV-PDS 6.1

- Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 1 of 2
(2,610 Views)
Since you've got 6.1, use an event structure (on "this vi") to watch for a "key down" event. See the attached example. NOTE, the nested while loops might give you trouble with the event structure. I suggest putting converting the nested while loops to a state machine (see this article for an example).

Tim
this
Message 2 of 2
(2,610 Views)