09-13-2021 10:15 AM
Solved! Go to Solution.
09-13-2021 10:21 AM - edited 09-13-2021 10:25 AM
If you need negative numbers then you shouldn't you be using SIGNED integers?
What is the device and do you have a manual for it?
09-13-2021 10:58 AM
If you are expecting a value of -17.20, obviously all your "blue" solutions are out unless there is some scaling (or FXP interpretation) involved. As has been said, we simply need to see the manual.
(and if you primary number is integer, you probably want to simply change the indicator to I32 or convert to I32 for further processing. Do you know the byte order?)
09-13-2021 11:09 AM - edited 09-13-2021 11:11 AM
@BibianoFlores wrote:
but when the encoder becomes negative, my first modbus register is = 24635 and the second is = 65533 (1 = 24635, 2 = 65533), it should give me a value of (-17.20)
Wild guess (you can change the 10k to SGL if you want a SGL result, but it does not matter for the value):
09-13-2021 11:10 AM - edited 09-13-2021 11:11 AM
Divide that by 10000 and you get -17.1973, I think that's probably it.
Edit: Was beat to it, the previous post wasn't there when I clicked Reply...
09-13-2021 11:30 AM
Thanks Friend, It worked perfect. I appreciate your cooperation.
09-13-2021 11:32 AM
Thanks Friend, It worked perfect. I appreciate your cooperation.
Kyle97330
altenbach
Either of the 2 solutions worked great