And 02 Function Codes - Waveshare RS485 TO ETH Manual

Hide thumbs Also See for RS485 TO ETH:
Table of Contents

Advertisement

485 TO ETH (B) User Manual
The design method is basically the same as the previous method. The only thing to pay
attention to is that the data format is selected as "Boolean", and then where the Boolean
value is located, bit2 is the json variable in the 03 function code and the bit position in the 00
register. If the register value is 00 20, where 1 is in position 2, please note that you can set
the same Modbus station address, function code, and register for different json keywords.
Different variable contents can be obtained as long as the position of the Boolean value is
different. For example, we designed bit1, bit2, bit8, bit9, bit16, when the register content is
0x8183, we get the following json data return: {"bit1":1,"bit2":1,"bit8":1,"bit9" :1,"bit16":1}

3.4. 01 AND 02 FUNCTION CODES

You can set the JSON node for the bit register of the 01/02 function code, but each
JSON node needs to set the register address once, so the number of bits read each time is
one bit. The difference with the bit of the byte register is: the bit of the byte register is still
read through the 03/04 function code, but only the value of one of the 2 bytes is taken; the
01/02 function code itself is read For bit selection, since only 1 bit is read at a time, the
position of the Boolean value is generally written with 1, if it is 1, it will display '1', otherwise
it will display '0'.
Figure 9 Byte register
14 / 36
www.waveshare.com

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents