Modbus Register Set

J

Thread Starter

JAspinall

Hello all,

I'm currently in the midst of setting up an "AutoSol AES" driver to communicate with a PLC out in the field.

Essentially communication will be done via Modbus TCP and Autosol will act as an OPC Server which will then talk to Wonderware's OPCLink (Suitelink) which will then relay information back to the HMI.

Here is my problem:

I am having no problem at all reading the correct discrete values from the PLC via autosol. However any real values are coming back incorrect. i.e a setpoint of 7500 is showing as "50" on the graphical HMI.

In AutoSol I have the option to set up a "Register Set", and I'm fairly confident this is where my problem with the real values is occuring from.

Here is a screenshot of what said register set looks like, you'll notice there is only a Float32 in there as I removed the discrete configuration just to isolate only the reals for testing.


And below are the register addresses of the real points within this PLC.


So I am curious, based on my list above with the register addresses of these points, is anyone able to point me in the right direction as far as configuring the register set to conform to this list.

Any help would be extremely appreciated!
 
One of two situations is likely - word order mixup or mixing words from different values.

Usually if you're reading from the correct registers but are interpreting using the wrong word order, the value interpreted is way of reality by many orders of magnitude, because the exponent value is way off.

Your values are close enough this could be the case, but it's not typical.

The other situation is where your single register fetch got the correct word, but for whatever reason, the fetch of a floating point is off by one register. The result is getting one (say, high order) word from one value and another (say low order) word from the value in the adjacent register; which when interpreted gives an incorrect value (as it should).

My approach would be to first try a word order change, because the two dominant floating point/real formats in use differ in their word order (Big Endian vs Little Endian), where the byte order (for the register value) is the same for both formats, but the word order (high/low register) is swapped for each of the formats.

Try word order "low/high. Keep the byte order "high/low" setting, don't change it.
 
Top