![S&A CWFL-4000 Скачать руководство пользователя страница 13](http://html1.mh-extra.com/html/sanda/cwfl-4000/cwfl-4000_user-manual_3093510013.webp)
CWFL-4000 Series
13
<7> MODBUS RS-485 communication
function
This system adapts salve mode of MODBUS-RTU communication,9600 baud rate,
no parity checking,8 data bit,1 stop bit and support MODBUS-RTU 03 (Read
Holding Registers) and 06 (Read Holding Registers) commands. Communication
formats are as below:
1. Command format 03
Host send command
Function code
1 bytes
0x03
Initial address
2 bytes
From 0x0400 to 0x044a, From 0x0100 to 0x0108,
From 0x0800 to 0x0803
Register number
2 bytes
From 1 to 10
Slave response
Function code
1 bytes
0x03
Number of bytes
1 bytes
2*N
(
"N" is the number of registers
)
Register value
N*2 bytes
Error
For example: if the host’s sending address is 1, requests 108-110 command of
slave read register and send 01 03 00 6B 00 03 XX YY,thereinto,01 as slave address,
03 as function code, 00 6B as initial address, 00 03 as register number and XX YY
as the result of CRC verification.
Slave response: 01 03 06 02 2B 00 00 00 64 XX YY, thereinto, 01 as slave address,
03 as function code, 06 as number of bytes, 02 2B 00 00 00 64 corresponding to the
values in 108-110 of register respectively and XX YY as verification code.
If the slave receives wrong data, return to data 01 83 01 XX YY, thereinto, 01 as
slave address. 83 as error code, 01 as exception code and XX YY as check sum.
2. Command format 06
Host send command
Function code
1 bytes
0x06
Register address
2 bytes
From 0x0400 to 0x044a
Register value
2 bytes
From 0x000 to 0xffff
Error code
1 bytes
0x83
Exception code
1 bytes
01 or 02 or 03 or 04