From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How Do You Send the END KEY via Serial?

Hello All,

 

I'm trying to do something that would seem simple, but is not because almost no information about the END KEY on keyboards is posted online.  Essentially, I'm trying to activate a device that comes out of sleep when someone presses the END KEY through hyperterminal or some ascii based command window.  I'm trying to send that END KEY automatically using Labview, but I'm stuck. So here are my questions.

 

Does the END KEY have a specific ASCII number?  I'm getting 2 different answers in my search for this one.

 

If it doesn't, how do I send that command over the serial communications line?

 

If it does, then what's the best way to convert it to something that labview understands as the END KEY, and not some combo of characters?

 

Thanks a bunch.

 

Matt

0 Kudos
Message 1 of 12
(3,226 Views)

You would have to find out the character that is mapped to the END key and simply send that out the serial port. You may want to try sending 0x4f". At least this is what I found for the mapping of the END key.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 12
(3,217 Views)

As far as I know there is not an ASCII code for end. Does the device you want to wake up need a character in particular or is that something under your control? There are some "device control" ascii codes but I don't know what they are for and doubt they are mapped to the keyboard. If there is a character that the device does not use such as "&", "?", "*" or "Backspace" then you could use one of those.

=====================
LabVIEW 2012


0 Kudos
Message 3 of 12
(3,208 Views)

See, that's what I thought, from the little information that I've gotten, is that there is no ascii code for the END KEY.  The device communicates with either a hyperterminal or something called "bb talk", so I'm not sure if there's a character sent after someone presses the end key.  So either the END key does something special to the serial line or there's a secondary character being sent when someone presses the END KEY.  I'll have to find out, I guess.

0 Kudos
Message 4 of 12
(3,199 Views)

 


@TeknoAXE_1 wrote:

See, that's what I thought, from the little information that I've gotten, is that there is no ascii code for the END KEY. 


 

You should go back and re-read Mark's response. There is an ASCII code for the End key. However, whether or not that's the correct character we cannot tell you. You need to look at the documentation for the device that you're communicating with. The "END KEY" is just a general term. What that actually is depends on the communication protocol.

0 Kudos
Message 5 of 12
(3,193 Views)

Is this "bb talk" a program that connects to your device? Connect "bb talk" to another computer running Hyperterm (or LabVIEW) and press the end key. See what characters get sent when you press end. It is likely that "bb talk" intercepts the keyboard scancode for END and then sends some ASCII code.

 

If all else fails just press the ANY key to continue. Smiley Very Happy

=====================
LabVIEW 2012


0 Kudos
Message 6 of 12
(3,192 Views)

"You may want to try sending 0x4f"

 

I will try this.  Thanks!  Sorry I missed this the first time.

0 Kudos
Message 7 of 12
(3,183 Views)

smerc,

 

We're communicating via Serial port, so I would think the ASCII format would be the correct format.

0 Kudos
Message 8 of 12
(3,181 Views)

On my system, pressing END on the keyboard while an Hyperterminal session is open sends a 3-characters escape sequence to the serial port:

ESC[K  

in ASCII hex codes: 1B 5B 4B  (dec codes: 27 91 75)

 

I'm not sure it's also valid for all systems

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 9 of 12
(3,180 Views)

 


@TeknoAXE_1 wrote:

smerc,

 

We're communicating via Serial port, so I would think the ASCII format would be the correct format.


This statement makes no sense. It is irrelevant whether you are using a serial port, TCP/IP, or a tin can with a string. The ASCII code does not change, nor does it change the fact that there is an ASCII code for an "END" key. As noted, whether or not this is the code that needs to be sent for your device can be verified by looking at the documentation for your device. Have you done this?

 

0 Kudos
Message 10 of 12
(3,165 Views)