![Acromag Bus Works 900EN Series User Manual Download Page 37](http://html1.mh-extra.com/html/acromag/bus-works-900en-series/bus-works-900en-series_user-manual_2841160037.webp)
BusWorks® Model 989EN U
ser’s Manual Modbus TCP/IP Digital I/O & Counters
_________________________________________________________________________________
_______________________________________________________________________________________
Acromag, Inc. Tel:248-295-0880 Fax:248-624-9234 Email:
36
Modbus TCP/IP actually refer to a set of complimentary protocols that
operate on your data. Modbus itself is the
application protocol
and it defines
the rules for organizing and interpreting the data. TCP is the
transport
protocol
, responsible for transmitting and receiving the data (a message
received via TCP, will get a response via TCP). IP is a
network protocol
,
responsible for addressing and delivering the data.
Referring to the OSI Network Model (a simplified model is shown at left), we
see that these protocols reside at different layers, with the application layer
at the top. As data is transmitted, each lower layer adds its own header
information to the front of the packet that it receives from the next higher
layer. The higher layer data is essentially encapsulated by the lower layers,
according to the different protocols that operate at these levels and whose
service is requested. With respect to Modbus TCP/IP, the application layer
data of Modbus is encapsulated by the transport layer data of TCP, which is
then encapsulated by the network layer data of IP. This process of wrapping
outgoing messages with layer frames as the message is passed down the
stack changes to a process of peeling back the layer frames at each layer
for a received message as it is subsequently passed up the stack to the
application layer.
For the 989EN modules, Modbus serves as the
application protocol
and it
defines the rules for organizing and interpreting the data. It is essentially a
messaging structure that is independent of an underlying physical layer. The
transport layer resides just below this application layer and is responsible for
the transmission, reception, and error checking of the data. While there are
a number of transport layer protocols that may operate at this layer, the
primary one of interest to us is TCP.
TCP is a connection-oriented transport layer protocol. By connection-
oriented, we mean that TCP establishes a secure connection between two
network stations for the duration of the data transmission. TCP works via
the Client-Server communication model. That is, whichever network station
takes the initiative and establishes the connection is referred to as the
TCP
Client
. The station to which the connection is made is called the
TCP
Server.
The server does nothing on its own, but just waits for the client to
make contact with it. The client then makes use of the service offered by the
server (depending on the service, one server may accommodate several
clients at one time).
TCP verifies the sent user data with a checksum and assigns a sequential
number to each packet sent. The receiver of a TCP packet will use the
checksum to verify having received the data correctly. Once the TCP server
has correctly received the packet, it uses a predetermined algorithm to
calculate an acknowledgement number from the sequential number. The
acknowledgement number is returned to the client with the next packet it
sends as an acknowledgement. The server also assigns a sequential
number to the packet it sends, which is then subsequently acknowledged by
the client with an acknowledgement number. This process helps to ensure
that any loss of TCP packets will be noticed and that if needed, they can
then be re-sent in the correct sequence.
ABOUT MODBUS
TCP/IP
SIMPLIFIED TCP/IP STACK
LAYER REFERENCE MODEL
TX
LAYER
RX
5
↓ Application
↑ 5
4
↓ Transport
↑ 4
3
↓ Internet/Network ↑ 3
2
↓ Data Link
↑ 2
1
→ Physical
→1
A transmitted message is
wrapped at each layer as it
passes down the stack, while
the received message is
unwrapped at each layer as it
passes up the stack.