Download Please click here to specification

Transcript
www.batteryspace.com
AA Portable Power Corp.
Field Name
Byte length
Example Value
Slave Address
1
1~200
Function Code
1
0x01
Starting Address
2
0~0xFFFF
N0. of Points
2
1~16
CRC Error Check
2
Read Coil Status Example Normal Response
Filed Name
Byte length
Example Value
Slave Address
1
1~200
Function Code
1
0x01
Byte Count
1
1~2
Data(Coil Status)
n
CRC Error Check
2
Read Coil Status Example Abnormal Response
Field Name
Byte length
Slave Address
1
Example Value
1~200
Function Code
1
0x81
Abnormal Code
1
01~04
CRC Error Check
2
For example:
The following example reads the load input state (ISTATE) of Coil at slave device address 0x01.
From table 4.8.7.1, we know that the ISTATE address is 0x0510.
Query: 0x01 0x01 0x05 0x10 0x00 0x01 0xFC 0xC3
The Corresponding Nomal Response: 0x01 0x01 0x01 0x48 0x51 0xBE, among which, 0x48 is the
read-back data and its lowest bit is 0, this means the input state ISTATE is OFF.
2. Force Single Coil (0x05)
Force Single Coil Example Query
Field Name
Byte length
Slave Address
1
Example Value
1~200
Function Code
1
0x05
Coil Address
2
0~0xFFFF
Force Data (Coil Status)
2
0x0000 or xFF00
CRC Error Check
2
Force Single Coil Example Normal Response
Field Name
Byte length
Slave Address
1
Example Value
1~200
Function Code
1
0x01
Coil Address
2
0~0xFFFF
Force Data (Coil Status)
2
0x0000 or 0xFF00
CRC Error Check
2
33