01-10-2011 11:10 AM
In standard ASCII (Seven bit) 0x4f is the code for 'O'. But the days when you could say ASCII and everyone knew what you meant ended long ago. Now there is extended ASCII, Unicode and the various codepages.
For the sleep function you just need to figure out what byte or byte sequence is sent to the COM port by the program when the end key is pressed. Hyperterm apparently sends an escape sequence.
01-11-2011 06:50 PM - edited 01-11-2011 06:52 PM
Hello Matt,
I would also suggest referencing the user manual about the ending hex codes associated with the pressing of the END key. These values may very well be: x1B x5B x4B. You should also make sure that you are sending hex formated values to the device rather than the HEX values represented in ASCII characters (eg 1B 5B 4B in ASCII). If you intend to send ASCII commands and represent the END values correctly, you can do this by initializing each byte to a U8 data type and converting that to a string character. That issue tends to come up frequently when communicating with serial devices. If you need further assistance, feel free to call National Instruments support.