04-17-2012 09:04 AM
- LV 2010 with Embedded for ARM module
- MCB2300
- COM1 port
I am trying to read in a serial string on this port from a serial device. I am (for whatever reason) reading in hexidecimal characters. I can either read in one byte at a time or all bytes at port.
My coming string either looks like this:
\D5\8B\D6\EC\AB\D6\EC\FB\F6\FB\F6\EBV\D6\EC\EB (if I read in all at once)
or
\DB
\8B
... (if I read in one byte per iteration)
Either way I want to convert this to ASCII characters but I can't get the '\' off the front of the string. I have tried two ways and neither works. The outputs are just blank. Any suggestions?
Solved! Go to Solution.
04-18-2012 06:59 PM
Hi tir38,
Your logic inside the case structure worked for me. However, for your program, I suggest running your program in Highlighted Execution to check if the case structure hangs while waiting for the boolean input. In addition, I see that you have added the substring indicator, does that indicator show the cleaned-up HEX string correctly before converting it to a decimal?
04-19-2012 03:31 PM
suprisingly, when I change the 1 to a 0 (i.e. remove nothing) it works.