When I convert Ascii string
The serial input comes in on the devicenet mapped address at Local:2:I.Data[8] through Local:2:I.Data[11]. The data comes in accurately in either Ascii or hex format and each address is a DINT. For each of these addresses I use a DTOS (DINT to STRING), to convert the incoming data to a String. This is just an intermediate step so I can use the MID command to parse out each character and may be a mistake as it does not appear to be usable data.
If I input data to DTOS and then DTOS to STOD to convert the data back to Ascii the data integrity is good. Input is 0264, DTOS is 80857704 and STOD returns 0264. Problem is if I parse any digits out from the DTOS and try to convert back to Ascii the return does not appear meaningful.
This may be the wrong way around to accomplish what I need?
Ultimate goal is to Parse each ascii character to a holding register, convert each character to an integer, perform the math, convert result back to an ascii character.