Jump to content

Recommended Posts

Posted

I have some actuators I am controlling with a vision 700 over modbus. When I read the holding registers for the position data the data is being brought in as signed 2s compliment numbers. Does anyone know why this is and how to bring it is as base 10? If i read the same registers with the program MODBUS POLL the data reads correctly with that program which leads me to believe it is something in how Visilogic converts the data. 

  • MVP 2023
Posted

That should totally not be happening.  What is the make and model of the actuators?

What are your port parameters?  Can you upload the portion of your program that handles Modbus communication?

 

Joe T.

Posted
On 6/23/2023 at 9:44 AM, garydreppert said:

I have some actuators I am controlling with a vision 700 over modbus. When I read the holding registers for the position data the data is being brought in as signed 2s compliment numbers. Does anyone know why this is and how to bring it is as base 10? If i read the same registers with the program MODBUS POLL the data reads correctly with that program which leads me to believe it is something in how Visilogic converts the data. 

Are you sure that is actually what is going on, based on my own experience using Modbus on Unitronics devices and without giving it much more thought It sounds like it may be the endianness.

are you sure that you are not getting the Bytes in a reversed order? if that the case the easiest way to fix it is to use swap bytes function block

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.