LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Key press on Keyboard -> event

Hello,

I'm a Labview beginner.

 

I try to make a programm which does the following

 

After I pressed a certain button on the Keyboard (space) a light on the left goes on, after pressing the button (space) again after 3 s (less or more) the light on the right goes on. This should be woring as long as I stop the programm.

I would be great to get help from you.

 

Attached thats what I got so far.

0 Kudos
Message 1 of 10
(7,183 Views)

a light on the left goes on .. afterwards the light on the right goes on

 

ok ... but when do your lights go off ?

0 Kudos
Message 2 of 10
(7,157 Views)

 

so I found a solution, I'm sure it is not the best but it is working.

Now the lights schoukd go off after 1 sec after pressing the button on the keyboard how to solve this?

 

thank you

0 Kudos
Message 3 of 10
(7,151 Views)

Here is something to get you started.  It will take care of the left LED.  Give you ideas to taking care of the right.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 10
(7,135 Views)

I'm not sure if this is right

but both LEDs should be turned off at the beginning than after pressing a button on the keyborad on LED shoukd goes on for 1s after pressing the button, after I push the button a second time the other LED soukd go on for 1 sec and so on.

 

I dont know how I can make the LEDS turn off after 1 sec

0 Kudos
Message 5 of 10
(7,125 Views)

This appears to work.  See if it helps.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 10
(7,112 Views)

Sorry I cant found all the functions you used

But thank you, in your VI when the lights are going out?

0 Kudos
Message 7 of 10
(7,108 Views)

volcomsmile wrote:  But thank you, in your VI when the lights are going out?

The lights go out when the Elapsed Time goes to TRUE.

 

The other function you probably aren't finding is the Boolean Crossing PtByPt.vi.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 10
(7,097 Views)

Thank you the point is I do not unterstand your solution. Is there no way to make my program running good?

0 Kudos
Message 9 of 10
(7,090 Views)

Okay a couple of things, first your code has some complicated ways of doing comparisions.  Here I simplified it by having the equal function look to see if any of the values in an array are equal using an array constant and the Or Array Elements function.

 

cuttingtask_BD.png

 

The next thing you might want to notice is that all of these pictures we are posting are executable code, and you don't need to recreate the code in the picture, just drag the picture to your block diagram.  This is called a snippet:

 

http://www.ni.com/tutorial/9330/en/

0 Kudos
Message 10 of 10
(7,055 Views)