LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keydown event for arrow keys in number pad

Hi all,

 

I need to move an image using the arrow keys, and use the number pad to change the value of some controls. I made a VI, but it has two problems:

1) The VI responds to the arrow keys in the number pad.

2) The VI stop responding when special character key, such as Ctrl, is pressed.

 

Problem 1 is not acceptable because I need the number pad to change the value of a numeric control. Is there a way to make the VI responds specifically to the arrows keys but not to the arrow keys in the number pad?

 

The source of problem 2 is the "Wait for front panel activity". When I replace the "Wait for front panel activity" with "Wait until next ms multiple", the VI runs without any problem. However, I cannot use the "Wait until next ms multiple" in my complete VI because it drains out the memory when the image is large. Anyone has any idea about this?

 

Thank you in advance for your help. By the way, I am using windows XP and Labview 8.6.

 

Regards,

Julianti

Download All
0 Kudos
Message 1 of 3
(3,173 Views)

Il suggest to avoid using two Event Case in the same vi.

Moreover, to me the NumPad is working properly: provided NumLock is active or not I get the arrows or the numbers.

You write "Wait until next ms multiple drains out the memory when the image is large".

I do not understand.

If you want the loop with the event case to run slower you can simply increase the timeout (even set it to infinite) but I can't see

how the Event Case loop is related to memory draining...

 

Marco

Message 2 of 3
(3,165 Views)

Hi Marco,

 

I am not sure it was due to two Even Structures in one VI, or other problem, somehow after I deleted the second Even Structure, the respond of the arrow keys in the number pad is now OK.

 

Also, I think I defined my problem poorly. Lets forget about the the image loading and "Wait until next ms multiple". I redefine my problem here.

 

Thanks for your help!

 

Best regards,

Julianti

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