
DCW20
User Manual rev. 5
Page 15/34
3.5 Modbus
DCW20 communicates through Modbus/RTU as specified
on “
MODBUS over Serial Line
” and
“
MODBUS
APPLICATION
PROTOCOL
SPECIFICATION
”
documents
available
on
http://www.modbus.org/
.
Table 2 contains the field types and Table 3 the mapped fields. For types bigger then 16bit, access all
registers in one transaction (multiple register read or write) to ensure atomic operation.
Type
Modbus
function codes
Description
Read
Write
BIT
1,2
5,15
Single bit with value 0 or 1
SINT16
3,4
6,16
Signed 16 bit value (2’s complement)
UINT16
3,4
6,16
Unsigned 16 bit value
SINT32
3
16
Signed
32 bit value (2’s complement) Composed of 2 consecutive
registers in big-endian order.
UINT32
3
16
Unsigned 32 bit value. Composed of 2 consecutive registers in big-
endian order.
DATE
3
16
Time and date field. Composed of 4 Modbus registers as follows:
Address offset Byte
Description
0
MSB
Reserved, set to 0
LSB
Year-2000
1
MSB
Month (1=January)
LSB
Day of the month
2
MSB
Hour of the day (24h format)
LSB
Minutes
3
MSB
Milliseconds
LSB
Table 2: Modbus types
Address Type
R/W
Unit
Min.
Max.
Description
Common
0x0010
DATE
R/W
R/W
Real time clock.
Settings (see §4.2)
0x1000
UINT16 R/W
1
1
247
Modbus address.
0x1001
UINT16 R/W
1
1
5
Modbus baudrate.
1: 9600 baud
2: 19200 baud
3: 38400 baud
4: 57600 baud
5: 115200 baud
0x1002
UINT16 R/W
1
1
3
Modbus parity.
1: None
2: Even
3: Odd
0x1003
UINT16 R/W
1
1
2
Modbus stop bits.
0x1010
UINT16 R/W
1
1
4
Battery type.
1: Lead
2: Nickel
DCW20_040-02-700-005-EH-1117