User guide

Chapter 5
Setup and Configuration
RUGGEDCOM ROS
User Guide
118 Message Packetization
Section 5.4.1.6
Message Packetization
The serial server buffers received characters into packets to improve network efficiency and demarcate
messages.
The server uses three methods to decide when to packetize and forward the buffered characters to the network:
Packetize on a specific character
Packetize on timeout
Packetize on a specific packet size
If configured to packetize on a specific character, the server will examine each received character and will
packetize and forward upon receiving the configured character. The character is usually a <CR> or an <LF>
character, but may be any 8 bit (0 to 255) value.
If configured to packetize on a timeout, the server will wait for a configurable time after receiving a character
before packetizing and forwarding. If another character arrives during the waiting interval, the timer is restarted.
This method allows characters transmitted as part of an entire message to be forwarded to the network in a
single packet, when the timer expires after receiving the very last character of the message.
NOTE
Some polling software packages that perform well under DOS have been known to experience
problems when used with Windows-based software or port redirection software. If the operating system
does not expedite the transmission of characters in a timely fashion, pauses in transmission can be
interpreted as the end of a message. Messages can be split into separate TCP packets. A locally
attached server or a port redirector could packetize and forward the message incorrectly. Solutions
include tuning the operating system to prevent the problem or increasing the packetizing timer.
Finally, the server will always packetize and forward on a specific packet size, specifically when the number of
characters received from the serial port reaches a configured value.
Section 5.4.2
Modbus Concepts
The following sections describe some of the concepts related to Modbus and the implementation of serial
protocols in ROS:
Section 5.4.2.1, “Modbus Server Client Applications”
Section 5.4.2.2, “Modbus TCP Performance Determinants”
Section 5.4.2.3, “Turnaround Delay”
Section 5.4.2.1
Modbus Server Client Applications
Modbus Server and Client applications are used to transport Modbus requests and responses across IP
networks.
The Modbus Client application accepts Modbus polls from a master and determines the IP address of the
corresponding Remote Terminal Unit (RTU). The client then encapsulates the message in Transmission Control
Protocol (TCP), respecting the Modbus TCP protocol, and forwards the frame to a Server Gateway or native
Modbus TCP RTU. Returning responses are stripped of their TCP headers and issued to the master.