AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Operation via Ethernet IP (Modbus/TCP)
26.9.2013
79
12. Operation via Ethernet IP (Modbus/TCP)
The AS-i/Gateway acts as a 1 or 2 complete Master for the AS-i and as a 256 bit
digital I/O module for Ethernet. All possibilities offered by AS-i can be used via
Ethernet TCP/IP.
The used Modbus/TCP protocol is similar to the Modbus protocol. Specifically, it
covers the use of Modbus messaging in an Intranet or Internet environment using
TCP/IP protocols. The only differences to the Modbus protocol are the form of any
"framing" sequence, error check pattern and address interpretation.
All requests are sent via TCP on registered port 502.
12.1 Message Structure
Telegrams from the Modbus-Master (query-messages) and answers of the Mod-
bus slaves have the same structure:
The request and response are prefixed by 6 bytes as follows:
Data addresses in Modbus messages
All data addresses in Modbus messages are referenced to zero. The first occurrence
of a data item is addressed as item number zero.
For example:
The coil known as "coil 1" in a programmable controller is addressed as coil 0000 in
the data address field of a Modbus message.
Coil 127 decimal is addressed as coil 007E hex (126 decimal).
Holding register 40001 is addressed as register 0000 in the data address field of the
message. The function code field already specifies a "holding register" operation.
Therefore the "4XXXX reference is implicit.
Holding register 40108 is addressed as register 006B hex (107 decimal).
T1
high
T2
low
P1
high
P2
low
B1
high
B2
low
UI F D1
high
D2
low
... Dn
low
Transaction identifier T
1
,T
2
: usually 0 - copied by server.
protocol identifier P
1
,P
2
:0
length field B
1
: upper byte of the length field = 0 (since all messages
are smaller then 256)
length field B
2
: lower byte of the length field = number of bytes follow-
ing
unit identifier UI: value to indentifying the client
funktion code F: Code of Modbus-function to be executed by the slave.
Under certain circumstances the slave could answer
with an error-telegram. In this case the function-code in
the response-message is increased by 128.
data bytes D
1
... D
n
: Field to hold user-data.
The number of bytes is variable