Byte float format in Kepware 5.1

D

Thread Starter

Dan

I can read a floating point value from a Modbus TCP slave's register #40001 with Modscan32 using Modscan23's "Swapped FP" format. The value is correct.

I created a point in Kepware's OPC server V5.1 and the Kepware test client reads the point, but the value is off by a dozen or two orders of magnitude, usually an indication of the wrong floating point byte order format.

The only floating point data format selection that I can find in the Kepware server (V5.1)configuration tool is just plain 'float'. I can find no other data type format selection that appears to be 'swapped float' or 'inverted float', or, as the slave calls it "Big Endian 4,3,2,1,"

What did I miss?
 
Problem solved.

Apparently, my slave's register 0 cannot be addressed by KepServerEX 5.1.

When I got more points than just the one configured, at registers 400002 and above, the Big Endian format was read just fine by Kepware. The slave can be custom mapped, so I moved the problematic point at 40000 elsewhere and everything is OK.

I suspect that my attempt to read 400001 read half a float from one value and half a float from another, and reversed order, to boot; really a bogus value.
 
S

Stephen Friedenthal

When you define a new ModBus device in Kepware, take a look at the "Data Encoding" page when setting the device properties. You have several options here to change the byte order for the data. If you unselect 'Use Default ModBus Byte Order' I think you will see that data correctly. However, the driver has other options to allow you to more specifically control the byte order for 32 and 64 bit data, as well as bit ordering if that is applicable.
 
Top