Sending integers through anybus-x-gateway-ab7649-f/71619/2

Hi,

I am using an Anybus gateway to communicate from a siemens PLC to a Allen Bradley PLC. I am working on checking data mapping points and have ran into an issue. We are sending and analog value from one PLC to another and we are not getting the correct values back. We notice that since we are sending integers it gets broken up into two bytes - a high and low. Noticing this we did a calculation to try and solve this issue but have no luck. Here is an example of our calculation - (DIG_DATA:I.Data[12] * 256 + DIG_DATA:I.Data[13])/10. Do you have another solution?

Hi Jake,

The gateway is just transferring the bytes but not looking at the data type and endiness/byte order. You will need to verify what the data needs to look like and ensure it is in the right order and that the PLC is interpreting the data correctly.
This tool can be helpful as two hex characters is equivalent to one byte. Floating Point to Hex Converter
So you can see that 0xAABBCCDD == float of -3.336e-13 or 0xCCDDAABB == float of -3.336e-13.
The windows Calculater can be used similarly for non float values.

1 Like