11-27-2011 11:58 PM
My question seems simple but I have not found a solution to it. My problem is I have a Boolean Button and I want to control this button my pressing the letter 'a' on my keyboard. For example, I hold down the letter 'a' on my keyboard and the button is depressed until I release the button on my keyboard. I kow that LabVIEW have the Key Navigation, but all of those are the Function Keys and odd sysbols. I jsut need to use the letter 'a.' Ideas?
Solved! Go to Solution.
11-28-2011 01:10 AM
Use an event structure with "key down" and "key up" events and then filter for the letter "a".
11-28-2011 01:18 AM
Well I am using an even structure already. Here is a clip of that section that I am reffering to. What do you mean by filter?
11-28-2011 01:19 AM
In total I want to have 8 different letters controlling 8 different buttons.
11-28-2011 01:21 AM
Here's a simple example (LV 2010) to enable a boolean with the "a" key. See if you can take it from here.
(also, please attach real code instead of pictures. An image never tells the full story)
11-29-2011 03:44 AM
That you for the help. Here is what I tried to do. What did I do wrong? It seems as if the exevnt loop is not even being initiated at all. The ascii number for 'a' is 61 I dont understand why in your exmaple it is 30. PLease explain. Thank You very much
11-29-2011 06:20 AM
You need to catch the Keydown-event to capture key presses.
/Y
11-29-2011 10:41 AM
@Andrew Hensley wrote:
That you for the help. Here is what I tried to do. What did I do wrong? It seems as if the exevnt loop is not even being initiated at all. The ascii number for 'a' is 61 I dont understand why in your exmaple it is 30. PLease explain. Thank You very much
Of course the event fires when you press "a", however you have no way to tell unless you look at the string sent to the TCP/IP.
Is there a device with name jjj listening on port 555? (What is the significance of the 555ms timeout?)
The scancode gives a unique number for each key on the keyboard. it is unrelated to ASCII codes. Easiest would be to place an indicator on the scancode wire and press all the buttons you need while noting the resulting number. should take less than a minute. 😉
11-29-2011 03:30 PM
Yes I have a device listening on there. I just removed my ip address that I had in there and put in a fake port number when I posted. So the valuse of the key pressed it auto matically sent with this configureation?
11-29-2011 03:49 PM
@Andrew Hensley wrote:
So the valuse of the key pressed it auto matically sent with this configureation?
Don't ask me, try it! 😄