Guidance on Modbus TCP Floating Point Values


I have created an instance of a UDT that is supposed to read current and voltage from a power meter. The meter is connected to Ignition via Modbus TCP. The memory map for this devices states that the current and voltage values are floats. The register address for avg current is 16408. I have toggled the Zero-Based Addressing and Reverse Word Order options in the device connections but I am having no luck reading the right values. For reference the correct value for avg current should be 16-17 Amps. In Ignition, I am reading values like 51E33 or -30E14 or even 0 sometimes.

If Zero-Based Addressing is selected (true), the values are always around 0.001646 or smaller. If Zero-based Addressing is not selected (default) and Reverse Word Order is played with, the values are wrong and very big like above.

OPC Item Path is designated as [{DeviceName}]{SlaveAddress}.HRF16408.

Could someone please point out what I am doing wrong?
TagEditor Screenshot attached for reference.

Thank you.


Are you sure you just don't need to read them as integers and scale them? Leave your datatype as Float, but change your item path to read it as a 32-bit integer instead (HRI16408) and see what value you get. It could just need divided by10, 100, or 1000 to get the value you want.

If that doesn't work, share more details about the device--a link to its manual, perhaps.

I tried this method. The values now vary from -2 billion to 2 billion. Dividing by 10, 100 or even 1000 would not yield the correct result. The meter's webpage (IP address) shows settings for current as positive and values displayed on the webpage are ranging from 15-17 Amps.

Here is the link.

On page 209/210, it calls out that the default communicated mode is secondary mode, which doesn't correspond directly to the actual value, but to a calculated value, which you'd have to do the math to get back out the right value.

Edit: Or switch the mode to primary mode to make life easier (as long as it doesn't mess with other functioning of the meter, which searching the manual, it looks like it only changes the Modbus comms reading format).

1 Like

Switching mode worked. Thank you very much