N4IOA01 modbus rtu protocol

Function code

RS485 address

(Station address)

(1)

Function (1)

Register address (2)

Read number (2)

CRC16 (2)

 

03  Read

 

 

 

 

06  Write

 

 

 

 

Read / write register; Read function code is 03 ,Write function code is 06

Register address

Register contents

Number of bytes

Units

Remarks

0x0000

Current  value

2

0.01MA

such as:

Input 0X0320

Decimal 800

Output= 800 * 0.01 = 8.00MA

0x0007

Current ratio

2

0.1%

millesimal

This value can be corrected when the Actual output Current is greater than 1%, such as:

1000 means 1:1

1010: 1% increase

990: 1% decrease

0x000E

RS485 address

(Station address)

2

 

Read Address 0XFF

Write Address 1-247

0x000F

Baud rate

2

 

0~4     0:1200

1:2400  2:4800

3:9600(default)

4:19200

5: Factory reset

 

 

Serial baud rate:9600(default),N,8,1

 

Modbus RTU Communication protocol:

Read the output Current value of channel 1, the unit is 0.01MA

1.      Read Current value

Send data

RS485 address

(Station address)

(1)

Function (1)

Register address (2)

Read number (2)

CRC16(2)

 

Returns data

RS485 address

(Station address)

(1)

Function (1)

Number of bytes  (1)

data (n)

CRC16(2)

RS485 address(Slave ID) : 0x01~0xFE

   Function code 0x03

   Register address:0x0000, Indicates 1-channel value

Read number:0x0001

 

For example:

Send data(RS485 address is 1):01 03 00 00 00 01 84 0A ; 00 means channel 1

Returns data:01 03 02 03 E8 B8 FA

01 RS485 address,03 Function,02 length, B8 FA crc16

03E8 is the Output Current value, it is converted to decimal = 1000, 1000/100=10.00MA;

 

 

2.      Set Output Current value

Set the output Current value of channel 1, the unit is 0.01MA

Send data

RS485 address

(Station address)

(1)

Function (1)

Register address (2)

Setting Content  (2)

CRC16(2)

 

Returns data

RS485 address

(Station address)

(1)

Function (1)

Register address

  (2)

Register value  (2)

CRC16(2)

 

RS485 address(Slave ID) : 0x01~0xFE

Function code 0x06

 

Register address:0x0000; Indicates 1 channel value

Setting value: 2 bytes, unit 0.01MA. The Current  range set for channel 1 is 0.5-20MA.

 

For example 1: Let CH1 output 12MA Current. Input value 1200 and convert it to hexadecimal 04B0

Send frame: 01 06 00 00 04 B0 8A BE

Return frame: 01 06 00 00 04 B0 8A BE

3.      Read Current ratio:

Send data

RS485 address

(Station address)

(1)

Function (1)

Register address (2)

Read number (2)

CRC16(2)

 

Returns data

RS485 address

(Station address)

(1)

Function (1)

Number of bytes  (1)

data (n)

CRC16(2)

RS485 address(Slave ID) : 0x01~0xFE

   Function code 0x03

Register address:0x0007 ; Indicates 1 channel value

Read number:0x0001

Return data: 0.1%  millesimal

The Current ratio can be corrected by this value when the Current reading deviation is greater than 1%. The default value is 1000 (3E8).

For example 1:

Send data(RS485 address is 1):01 03 00 07 00 01 35 CB;  07 is Channel 1

Returns data:01 03 02 03 E8 B8 FA 

03E8 is the Current ratio, which is 1000 in decimal and divided by 1000=1; indicating that channel 1 does not need to modify the Current value.

 

For example 2:

send data(RS485 address is 1):01 03 00 07 00 01 35 CB ; 07 is Channel 1 

Returns data:01 03 02 03 DE 38 EC

03DE is the voltage ratio, which is 990 in decimal and divided by 1000=0.99; Indicates that channel 1 reads 0.99 times the actual acquisition value.

 

4.      Set Current ratio

When the actual output voltage deviation is greater than 1%, it can be corrected by this value, the default is 1000 (03E8)

Send data

RS485 address

(Station address)

(1)

Function (1)

Register address (2)

Setting Content  (2)

CRC16(2)

Returns data

RS485 address

(Station address)

(1)

Function (1)

Register address

  (2)

Register value  (2)

CRC16(2)

RS485 address(Slave ID) : 0x01~0xFE

   Function code 0x06

Register address:0x0007 ; Indicates 1 channel value

Setting Content:2Bytes

 

Setting value: 2 bytes, unit 0.1%. When this value is set to 1000 (3E8), the voltage value does not change.

 

For example 1: Set the channel 1 to 10.00MA, but the actual output Current is 9.90MA. Output deviation: 10/9.9=1.010. Input 1010 (0X03F2) to correct the output error

Send frame: 01 06 00 07 03 F2 B9 7E

Return frame: 01 06 00 07 03 F2 B9 7E

 

For example 2: Set the channel 1 to 4.00MA, but the actual output voltage is 4.10MA. Output deviation: 4/4.1=0.975. Input 975 (0X03CF) to correct the output error

Send frame: 01 06 00 07 03 CF 78 AF

Return frame: 01 06 00 07 03 CF 78 AF

 

 

5.      Read RS485 address

Send data

RS485 address

(Broadcast address)

(1)

Function (1)

Register address (2)

Read number (2)

CRC16(2)

 

Returns data

RS485 address

( Broadcast address )

(1)

Function (1)

Number of bytes  (1)

data (n)

CRC16(2)

 

Broadcast address 0xff

   Function code 0x03

Register address:0x000E

Read number:0x0001

 

For example:

send data:FF 03 00 0E 00 01 F0 17

Returns data:FF 03 02 00 01 50 50

FF Broadcast address,03 Function,02 length,01 is the current module RS485 address , 50 50 crc16

Note: When using this command, only one temperature module can be connected to the RS485 bus, more than one will be wrong!

 

 

6.      Write RS485 address

Send data

RS485 address

(Station address)

(1)

Function (1)

Register address (2)

Setting Content  (2)

CRC16(2)

 

Returns data

RS485 address

(Station address)

(1)

Function (1)

Register address

  (2)

Register value  (2)

CRC16(2)

RS485 address(Slave ID) : 0x01~0xFE

   Function code 0x06

Register address:0x000E

Setting Content:2Bytes(1-247)

 

 

For example, The current RS485 address is 1, We need to change the RS485 address to 3:

send data(RS485 address is 1):01 06 00 0E 00 03 A8 08

Returns data:01 06 00 0E 00 03 A8 08

 

7.      Read baud rate

Send data

RS485 address

(Station address)

(1)

Function (1)

Register address (2)

Read number (2)

CRC16(2)

 

Returns data

RS485 address

(Station address)

(1)

Function (1)

Number of bytes  (1)

data (n)

CRC16(2)

RS485 address(Slave ID) : 0x01~0xFE

   Function code 0x03

Register address:0x000F

Read number:0x0001

For example:

send data(RS485 address is 1):01 03 00 03 00 01 74 0A

Returns data:01 03 02 00 03 F8 45

01 RS485 address,03 Function,02 length,F8 45 crc16

   03 means the current baud rate is 9600bps

Baud rate corresponds to the number: 0: 1200  1: 2400  2: 4800  3: 9600  4: 19200

 

8.      Write baud rate

Send data

RS485 address

(Station address)

(1)

Function (1)

Register address (2)

Setting Content  (2)

CRC16(2)

 

Returns data

RS485 address

(Station address)

(1)

Function (1)

Register address

  (2)

Register value  (2)

CRC16(2)

RS485 address(Slave ID) : 0x01~0xFE

   Function code 0x06

Register address:0x000F

Setting Content:2Bytes(0-4)

 

For example, Change the baud rate to 4800bps:

send data(RS485 address is 1):01 06 00 0F 00 02 38 08

Returns data:01 06 00 0F 00 02 38 08

Baud rate corresponds to the number: 0: 1200  1: 2400  2: 4800  3: 9600  4: 19200

5: Factory reset

Note: 1 The baud rate will be updated when the module is powered up again!

     2 The factory setting can be restored when the baud rate corresponding to the number is 5. For example: 01 06 00 0F 00 05 79 CA

 

 

MODBUS commands you can use "Modbus Poll" input, as shown below

(CRC check generated automatically)

 

You can also use HyperTerminal serial input, as shown below

(Manually add CRC check)