g.mccormick
Lifetime Supporting Member
I have a Horner PLC that is reading Ascii string from a device. When the device responds, it responds with the hex value in Ascii. I need to figure out a way to grab parts of the ascii data in registers and convert to an integer.
In the attached, the data is saved in registers 1559 and 1560. The string in 1558 to 1560 reads '16#11&' which is the hex value 16#11 (17Decmal) and a '&' termination character. I need to strip the '#' from 1559 and the '&' from 1560, combine into an integer 17. I'm banging my head against the wall here.
Thanks
In the attached, the data is saved in registers 1559 and 1560. The string in 1558 to 1560 reads '16#11&' which is the hex value 16#11 (17Decmal) and a '&' termination character. I need to strip the '#' from 1559 and the '&' from 1560, combine into an integer 17. I'm banging my head against the wall here.
Thanks