LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

control adquisition with keyboard

Hello, I want to control my adquisition program with keyboard. First step I want for this is to get keyboard information while I'm adquiring. I have 2 version. In version 1 I get the keyboard information, but not allways, it depends on the moment I push keyboard buttons, and i'm adquiring data correctly. In version 2 I adquire keyboard information in any time, but I don't adquire correctly. What can I do?
 
Thaks.
 
Luz
0 Kudos
Message 1 of 14
(3,529 Views)
hi,
 
Pls see attached vi as reference. Hope it helps 🙂
 
regards,
ian
 
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 2 of 14
(3,521 Views)

Hi Luz,

U can use ian fumg example as reference (thanx ian).

You can have problems mostly because of detecting several times the same key if you dont time it properly. I mean, if u check every 10miliseconds you can press a key for 100 ms and then detect 10 times de same caracter while it was only one.

I dont know how many controls you need to asign to keys but if you right click the mouse on a control and go to properties and then to "key navigation" option you can automatically asign key shorcuts to your controls. The only problem about that is that labview limits it to several caracters an its combinations with <ctrl> and <shift>. But if you only need a few controls (I think your program is one of them) that would be enough.

Regards, 

Jaime Cabrera

NI Applications Engineering

Regards,

Jaime Cabrera

NI Applications Engineering Spain
0 Kudos
Message 3 of 14
(3,505 Views)
Hi Jaime,
 
Thanks 🙂
 
Also, using dynamic runtime menu is another way of achieving the requirement.
 
[IFK_GUI_Runtime Menu Demo]
This demo vi show programmatically added menu items.
Queue event is used to demonstrate the menu items' execution
 
LabVIEW 7.0
Solution Prepared By,
Ian Fung, Koo
ian_fung@yahoo.com | Sg
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 4 of 14
(3,499 Views)

Hola Jaime, si pulso botón derecho y propiedades no tengo la opción que comentas, "key navigation". ¿Qué me pasa?.

Gracias.

Luz

0 Kudos
Message 5 of 14
(3,488 Views)
Hello Ian, and thank you very much. I can't understand your .vi. Can you simplify the program for me, please?. I only want, for example, that I press a key a led value is true. Can you help me?.Thanks.
Luz
0 Kudos
Message 6 of 14
(3,487 Views)
Hello Ian and Jaime, I show you an example (using Ian example, thanks Ian) that what I don't know adquiring a signal with keyboard. If I push {Ctrl+t} I see that "Boolean 2" is on, but this event allways take place in iteration 0 of my signal, as I see in "Numeric". Why not, for example, in iteration 2562? I have  5000 in each iteration. Thanks.
0 Kudos
Message 7 of 14
(3,479 Views)

Hi Luz,

I did a quick simulation by removing your DAQ VIs.

Pressing CTRL+"t" will activate "Boolean(SimulateGLobal)", which will in turn activate "Boolean 2" and causes an index value updated to your Numeric indicator. It is not always at 0 of the iteration.

My apologies if I have not captured your problem.

Regards,

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 8 of 14
(3,473 Views)

Hi luz,

 

key navigation is only for controls, not for indicators, so u can use key navigation for a button but not for a led.

Has no sense to activate an indicator. You can use the key navigation to a control that is connected to your indicator.

Jaime

 

Regards,

Jaime Cabrera

NI Applications Engineering Spain
0 Kudos
Message 9 of 14
(3,472 Views)

Hello Jaime, if I right click the mouse on a control and go to properties I only have this options: appearance, operation and documentation, I don't find key navigation. What can I do?

Thanks.

Luz

0 Kudos
Message 10 of 14
(3,465 Views)