Author Topic: Reading a FLOAT32 register, convert it to decimal and display it  (Read 423 times)

kpagoudis1982

  • Newbie
  • *
  • Posts: 1
    • View Profile
Hello All,

I am new to this and have a very little experience.

I have created a project priamrly to make checks on Medium Voltage substations.

We use a ModbusTCP coupler with I/Os modules to read Switched status and to perform On-OFF via DOs.

We also have ModbusTCP communication with Protection Relays and Power Analyzers.

Any register that is in 1-bit format or integer i can understand how to implement it,

But other formats I can not understand how to convert them.

For example, power analyzers give the active energy value in FLOAT32 on register 402700 (logicaly it is 2 points INT16).

I use ModbusView to try and see what the registers turn in as values.

Lets say the actual value on the Power Analyzer is 23308.684kwh

In ModbusView if I read this as a  Holding Register - Float point it reads : 2,33807+E004

as holding register integer it reads : 18102 (402700) and 6494 (402701)

If I insert a DigitalPanelMeter and asign 402700 as PLCvalue it displays 18102 as expected.

My question is how can I display this in its proper format?

Thanx in advance

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5341
    • View Profile
    • AdvancedHMI
Re: Reading a FLOAT32 register, convert it to decimal and display it
« Reply #1 on: December 16, 2024, 04:12:18 PM »
The Modbus drivers use what is referred to as address modifiers. In earlier version it used a letter in front of the address. In the latest versions and going forward the preferred method is an @ symbol followed by the modifier letter.

In your example, you would use 402700@F

You can read about the address modifiers here:

https://advancedhmi.com/documentation/index.php/ModbusRTUCom