Modbus TCP/IP read 32 bit value
MBTCPRead block reads value from modbus slave and starts from provided start address. As far as int/dint which are 16 bit, it seems fine. e.g 400001 is int and 400002 is 2nd int and Rd will contain value in 400001 register and Rd will contain 400002. What about real value which is 32 bit? As one value is 400001 and 400002 is being used by same tag to make it 32-bit.
In this case, will Rd 400001 and 400002 combined? and Rd will represent 400003 and 400004? Do I need to make any configuration?
Voted best answer
Merging answer from duplicate thread posted and deleted now.
Modbus TCP supports Real values using Function Code 30. So you shouldnt have to do anything if the remote PLC sends real values.
However, if the PLC sends a 32 Bit value as 2 dwords ( which is also how many PLCs sends real values on Modbus Serial ) then you can use the "words_to_real" function to convert 2 * 16bit words to one 32 bit floating point real
-By Rob Lyon "