LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

display button options

My VI has a state machine configuration. What I need to do is in a few states I have user dialogs present whihc tell the user what to do. Now what I want to do is to have a dialog where if the user hits the space bar the process execution moves to the next state but if the user hits the 'R' key on the keyboard it should go 2 stages back. How can I accomplish this? Which user dialog vi should I use?
Thanks.
0 Kudos
Message 1 of 9
(3,631 Views)
Hi smm,
you can write your own user dialog. Use an event structure and define your two states.
Mike
0 Kudos
Message 2 of 9
(3,626 Views)

So the deal is, my main VI contains an event structure. In this vi, each event leads to another VI. now this other VI has a subvi. So as you can see there are about 2 stages. One main VI with event structure, then that vi leading to another VI which contains a subvi. This subvi is a state machine. So how can I change the state to an event structure. Could you explain?

Thanks

0 Kudos
Message 3 of 9
(3,622 Views)

Hi smm,

i´m not sure what you have there, can you upload parts of your code?

Mike

0 Kudos
Message 4 of 9
(3,614 Views)
7862-Buttons_ver2  is the main VI
7862-manual is one of the events vi for the main VI
and Tstat_demo5NEW is the subvi used in 7862-manual.
When you see Tstat_demo5NEW, you will see states with user dialogs. These user dialogs are timed. I want to now chane them to keyboard key clicks. But for a few states I want to change the buttons to decide which state to go to depending on which button is clicked. Like I said in my previous post, space bar implies move forward, 'R' key implies move back two states.
I hope you can understand what I am saying.
Thanks.
 
0 Kudos
Message 5 of 9
(3,611 Views)

Hi smm,

sorry but your code don´t helps. see the attached picture, maybe it helps. You see the "key pressed" event. Smiley Happy

Mike



Message Edited by MikeS81 on 05-05-2008 04:15 PM
0 Kudos
Message 6 of 9
(3,590 Views)

I don't understand what I assume is German. So I don't know where the key pressed event is. Also what is scan code and what are those numbers used.

0 Kudos
Message 7 of 9
(3,547 Views)
Hi smm,
the case you see in the picture is the "key pressed" event from the "vi". Scan code shows which key you have pressed. Both numbers are you special keys. One is space and the other "R".
 
Hope this helps.
Mike
0 Kudos
Message 8 of 9
(3,545 Views)
Hi smm,
a listing of scan codes can be found at http://www.quadibloc.com/comp/scan.htm.


Message Edited by lmtis on 05-07-2008 07:35 AM
Jim

LV 2020
0 Kudos
Message 9 of 9
(3,537 Views)