jbradtke9112
Supporting Member
Good morning all,
I'm integerating a device with a Rockwell PLC with V34 Studio 5000. The device reports error codes using a single integer to represent a decimal Error code.
For example 201 means error code 2.1 I have existing code that works by converting DINT to String, then FIND the "0" digit, then INSERT the "." at the first found location of the "0", then delete the "0" digit, then convert STRING To REAL (see screenshot for code).
This works for most error codes except the device can report a 1.1 error code and a 10.XX error code (see screenshot). I don't believe my code will work as it will replace the 10 with 1.
Any alternative suggestions for the conversion? Am I missing something in my interpretation of the manual?
Thanks for any and all help!
I'm integerating a device with a Rockwell PLC with V34 Studio 5000. The device reports error codes using a single integer to represent a decimal Error code.
For example 201 means error code 2.1 I have existing code that works by converting DINT to String, then FIND the "0" digit, then INSERT the "." at the first found location of the "0", then delete the "0" digit, then convert STRING To REAL (see screenshot for code).
This works for most error codes except the device can report a 1.1 error code and a 10.XX error code (see screenshot). I don't believe my code will work as it will replace the 10 with 1.
Any alternative suggestions for the conversion? Am I missing something in my interpretation of the manual?
Thanks for any and all help!
Last edited: