thebard3
Chemical
- May 4, 2018
- 723
If anyone is up to a challenge, I have been working all day to figure out a good way to convert data retrieved from some legacy devices from ASCII format via SINT array to floating point. Putty returns the following;
My communication module returns each individual character as a SINT data type in an array (SINT[4000]). I need to pick out the 5 digits of data, apply the appropriate sign and exponent to create the floating point number. I have a few ways to do that but none of them are very pretty, because each digit is a separate SINT register. ControlLogix version 30 is the platform I'm using. Any good ideas out there? I hate working with ASCII data to begin with, but when it's reall SINT data to begin with it's even worse.
Brad Waybright
It's all okay as long as it's okay.
My communication module returns each individual character as a SINT data type in an array (SINT[4000]). I need to pick out the 5 digits of data, apply the appropriate sign and exponent to create the floating point number. I have a few ways to do that but none of them are very pretty, because each digit is a separate SINT register. ControlLogix version 30 is the platform I'm using. Any good ideas out there? I hate working with ASCII data to begin with, but when it's reall SINT data to begin with it's even worse.
Brad Waybright
It's all okay as long as it's okay.