41
6 3
.
Modbus Communication Interface
Control
Setting
Baud Rate
115200
Data Bits
8
Stop Bit
1
Parity
None
Flow Control None
The device supports Modbus RTU with the master-salve principle.
Users are able to read and write parameters of the device through
the protocol, including remote ON/OFF, output voltage/current
setting, etc. During data transfer, please follow the principle of first
sending the Hi byte and then the Lo byte except Error Check
(CRC16 checksum).
Physical Layer setting as below
6.3.1
Communication Timing
Min. request period (Controller to PSU/CHG): 0mSec。
5
Max. response time (PSU/CHG to Controller):
.5mSec。
12
Min. packet margin time (Controller to PSU/CHG):
.5mSec。
12
PSU CAN-RX
(form Controller)
PSU CAN-TX
Request period
(Controller to PSU/CHG)
Response time
(PSU/CHG to Controller)
RX data
TX data
RX data
Packet Margin time
(Controller to PSU/CHG)
6.3.2
Modbus Frame Encapsulation
Modbus RTU consists of Additional Address, Function Code,
Data and Error Check.
Additional address (1byte):
defines PSU/Charger slave ID.
Function code (1byte):
what
The function code is used to tell the slave
kind of action to perform.
Data (N bytes):For data exchange, contents and data length are
dependent on different function codes.
Error Check (2bytes):
utilizes CRC-16.
Additional Address
1 byte
Function Code
1 byte
Data
N bytes
Error Check
2 bytes
6
42
6.3.3
Additional Address Definition
Note:
X
1.
means the address of SHP-10K ( which can be assigned by the
DIP-SW81
, range from 0 ~ 7)
2.
Broadcast is only for command write and not for read
Additional address is the slave ID of the device. Each SHP-10K
unit should have their unique and own device address to
communicate over the bus.
Slave ID
0x8X
0x00
Description
X mean device address (defined by
)
DIP-SW81
Broadcast
6.3.4
Function Code
Description
The main purpose of the function codes is to tell the slave what
kind of action to perform. For example: Function code 03 will
query the slave to read holding registers and respond with the
master their contents.
Table 6-5
ON
OFF
2
1
3
4
Device No.
0
1
2
3
4
5
6
7
ON
1
ON
ON
ON
ON
2
ON
ON
ON
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
ON
ON
ON
ON
OFF
OFF
OFF
OFF
3
DIP switch position
0x03
0x04
0x06
Read Holding Register
Read Input Register
Preset Single Register
Code
Function Code
6