Can't read Modbus INT32 (long integers) Ci867
Hello
I have a problem reading modbus registers of data type 32 bit integer. I can read 2 separate registers (4,5 in attached screen shot) of the type UINT (16 bits) but I don't know how to combine them to a INT32.
*Long integers (‘Unsigned INT32’ or ‘INT32’)
These require 32 bits, and are implemented as two consecutive 16-bit registers. The range is 0 to 4294967295, which is called ‘unsigned INT32’
see attached screen shot for more details

I have a problem reading modbus registers of data type 32 bit integer. I can read 2 separate registers (4,5 in attached screen shot) of the type UINT (16 bits) but I don't know how to combine them to a INT32.
*Long integers (‘Unsigned INT32’ or ‘INT32’)
These require 32 bits, and are implemented as two consecutive 16-bit registers. The range is 0 to 4294967295, which is called ‘unsigned INT32’
see attached screen shot for more details

Answers
I hope below implementation will cover your requirement. I just read through manuals and got the below but not tested. please try and post the result so that i shall be shared with others.
1.In Mread block, RD[1] datatype shall be int. Read the Integer register 4, 5 separately using two Mread Block.
2. Confirm with the PLC vendor from whom you are reading whether it is big endian or little endian . if big endian then in words to real block , please make it true for Big endian parameter

1.In Mread block, RD[1] datatype shall be int. Read the Integer register 4, 5 separately using two Mread Block.
2. Confirm with the PLC vendor from whom you are reading whether it is big endian or little endian . if big endian then in words to real block , please make it true for Big endian parameter

Add new comment