How to Read 32 Bit Float Registers?

I am connecting a T3-TB to another device which has Holding Registers that are formated as 32 Bit Floating Point. Modbus TCP/IP connection.

I wish to read this data and store it as a VARxx variable for further use. VAR variables seem to be formated as 32 bit signed integer x 1000.

How can I accomplish the data format conversion required to do this?

VAR1 = 107.40.MB_REG_FLOAT_ABCD410
107 is T3-TB panel number
40 is another device connect to T3-TB
410 is the start register address (32 Bit)

BAC_FLOAT_ABCD
BAC_FLOAT_CDAB
BAC_FLOAT_BADC
BAC_FLOAT_DCBA

The links below can give you some ideas
https://forums.temcocontrols.com/t/modbus-poll-vs-temco-modbus-poll-for-external-devices/1009/10

1 Like

Thanks Fance,

This is not working for me.

I have register 100 on my non-Temco device as 32 bit float, big endian. I have placed the value of 1 in this register.

If I use code:

VAR25 = 19.1.MB_REG100 I see the following in register 8140 on T3-TB: 16256000

If I use code:

VAR25 = 19.1.MB_REG_FLOAT_ABCD100 I see the following in register 8140 on T3-TB: 16256000 Same thing.

If I use code:

VAR25 = 19.1.MB_REG_FLOAT_CDAB100

I see the following in register 8140 on T3-TB: 0

If I use code:

VAR25 = 19.1.MB_REG_FLOAT_BADC100

I see the following in register 8140 on T3-TB: 0
If I use code:

VAR25 = 19.1.MB_REG_FLOAT_DCBA100

I see the following in register 8140 on T3-TB: 0

Am i doing something incorrect here?

  1. Basic information
    A device connect to T3-Controller’s RS485 port working at modbus protocol ,
    We can get correct data when set right data display format .

图片
图片

  1. Build a program to read the register 72& regiater73 value of device (Tstat10) and convert to float format data.

T3-Controller Panel Number: 92

图片

Device : Tstat10 Modbus ID 250
图片

Four float data conversion command
MB_REG_FLOAT_ABCD;
MB_REG_FLOAT_CDAB;
MB_REG_FLOAT_BADC;
MB_REG_FLOAT_DCBA;

10 VAR1 = 92.250.MB_REG72 // read TSTAT10 reg72 unsigned integer
30 VAR2 = 92.250.MB_REG73 // read TSTAT10 reg73 unsigned integer
20 VAR3 = 92.250.MB_REG_FLOAT_DCBA72 // The command is to read the specified 16-bit register and its next register and then converted to float data in the specified format , here read from register 72 and 73 .

The status of T3000->Network Points are OK .
图片

T3000->Variables can get all values .
图片