dS378
dS378
User Manual v2.19
Modbus commands
The modbus command set accepts a subset of the standard Modbus-TCP frames as defined in
MODBUS Messaging on TCP/IP Implementation Guide V1.0b
Functions 1, 4, & 5 are supported along with error codes 1, 2 & 3 should they occur.
Function 01 (0x01) Read Coils
This function reads back the 8 relays as coils 1-8 and also the 7 inputs as coils 9-15.
Function 04 (0x04) Read Input Registers
This function reads back the 7 analogue inputs as registers 1-7
Register 8 is always zero
Registers 9-24 are 16 registers representing 8 counter values. As modbus registers are 16-bits
wide and the counters are 32-bit, a counter is stored in 2 16-bit registers, high word first. In
the same way, the 16 registers 25-40 hold the 8 capture values.
Register 9
Counter1 high word
Register 10
Counter1 low word
Register 11
Counter2 high word
Register 12
Counter2 low word
Register 13
Counter3 high word
Register 14
Counter3 low word
Register 15
Counter4 high word
Register 16
Counter4 low word
Register 17
Counter5 high word
Register 18
Counter5 low word
Register 19
Counter6 high word
Register 20
Counter6 low word
Register 21
Counter7 high word
Register 22
Counter7 low word
Register 23
Counter8 high word
Register 24
Counter8 low word
Register 25
Capture1 high word
Register 26
Capture1 low word
Register 27
Capture2 high word
Register 28
Capture2 low word
Register 29
Capture3 high word
Register 30
Capture3 low word
Register 31
Capture4 high word
Register 32
Capture4 low word
Register 33
Capture5 high word
Register 34
Capture5 low word
Register 35
Capture6 high word
Register 36
Capture6 low word
Register 37
Capture7 high word
Register 38
Capture7 low word
Register 38
Capture8 high word
Register 40
Capture8 low word
Function 05 (0x05) Write Single Coil
This function is used to write to a single coil (relay or I/O). Coils 1-8 are the relays 1-8. Coils
9-15 are the I/O's 1-7 remapped to coils 9-15.
Copyright
© 2016-2017,
Devantech Ltd.
All rights reserved.
35
www.pishrobot.com