16 Bit Integer to 2, 8 Bit Single Integer

Hi, can anyone help, I am Reading 16 Bit Integer Value in one of modbus register, where there are 2 value 0-7 bit (1 byte for 1st Value) 8-15 bit (2nd byte for 2nd Value) how to convert 16 bit integer to 2 8 bit SINT

In what platform? This is posted under Ewon Cosy, which is just a remote access device, so I don’t understand the context where this would be necessary.

Hi Kyle,
this is for eWon flexi 202,
i am using serial port for modbus communication.
communication is healthy and i am able to communicate the only issue if 1 of my 16 bit register is having 2 Values with 2 byte so how to separate 1 16 bit register into 2 8 bit register inside ewon Flexi

Hi,
Look at page number 15
rg-0007-00-en-reference-guide-io-servers.pdf (1.9 MB)

OK, I understand now. Modbus does not have support for 8-bit integers, so you have to read the 8-bit integer as a 16-bit integer (or read the individual bits). See Modbus Data Types.

Then you would have to use BASIC code (or JAVA) to parse each byte (or compile the bits) and put it into its own integer tag.

For more information about how to do this, please refer to the BASIC programming manual. You can also check the Ewon Programmers Forum or create a case at support.hms-networks.com.