
Modbus Commands
C-2
TIWAY I Gateway User Manual
C.1 Modbus Protocol Overview
This
appendix describes the Modbus protocol in detail. For each of the
Modbus functions described, examples of requests and responses are given.
T
able C-1 describes the Modbus functions supported by the Gateway
.
T
able C-1
Modbus Functions Supported
Code Type Description
01 Read Coil Status Get current status of a group of coils.
02 Read Input Status Get current status of a group of discrete
inputs.
03 Read Holding Register Get current values from holding registers.
04 Read Input Register Get current values from input registers.
05 Force a Single Coil Change the state of a logic coil to On or
Off, forced On or forced Off, or unforced.
06 Write a Single Register Write a value into a holding register.
07 Read Exception Status Get the 8 internal status coil values.
08 Execute Diagnostics Send diagnostic tests to a slave.
11 Get Communications
Event Counter
Enable the success or failure of a query to
be determined.
12 Get Communications
Event Log
Get the communications log for Modbus
network transactions.
15 Write Multiple Coils Change a number of consecutive coils.
16 Write Multiple Registers Write values into a series of consecutive
holding registers.
The
TIW
A
Y I Gateway operates in the RTU transmission mode. The RTU
mode determines the start and finish of a message based on a time period of
silence (no transmission) equivalent to the time it would take to transmit
3.5 characters at the chosen baud rate. The RTU transmission frame is
shown in Figure C-1.
8
bits
8 bits
n x 8 bits
16 bits
Address Function Data Checksum
T1 T2 T3
T1 T2 T3 . . . represents a time of 3.5 characters at given baud rate.
I000000
No data
Figur
e C-1
RTU
T
ransmission Frame
The R
TU
T
ransmission Frame
Comentários a estes Manuais