| Modbus
response timeouts |
|
| Modbus in a nutshell |
|
| Modbus
is the one of the world’s most popular
protocols for communication between industrial
devices. Originally designed for serial
interfaces, Modbus has been successfully
adapted to Ethernet technology and continues
to play a major role in ever more advanced
systems and architectures. However, it is
important that Modbus integrators be familiar
with certain issues that arise as legacy
systems are upgraded or integrated into
modern networks. In particular, determining
the appropriate response timeout setting
is a surprisingly difficult task that is
often misunderstood or overlooked.
According to the Modbus
protocol, all devices are classified as
either a master or a slave. Masters initiate
all communication and communicate only by
sending requests to slaves. Slaves are passive
and respond only to a master’s request.
Every request that a master sends to a slave
must be accompanied by a response from the
slave back to the master, except in the
case of broadcast requests. Masters can
send a broadcast request to all slaves,
in which case each slave simply obeys and
no response is given.
Normal
The master
sends a request to the slave. The
slave sends a response with the
requested information.
Exception
The master
sends a request to the slave. The
slave may not support the command
or an error is detected, so it sends
an exception to the master.
Broadcast
The
master sends a broadcast command,
such as a reset command. Every
slave on the network complies
with the command, and no response
is sent to the master.
|
The original Modbus
protocol was not designed for simultaneous
requests or simultaneous masters, so only
one request on the network can be handled
at a time. When a master sends a request
to a slave, no other communication may be
initiated until after the slave responds.
The Modbus protocol
specifies that masters use a response
timeout function to identify when a slave is nonresponsive due
to device or line failure. This function allows a
master to give up on a request if no response
is received within a certain amount of time.
To allow for a wide range of devices, baudrates,
and line conditions, actual response timeout
values are left open for manufacturers to
determine.
Response
Timeout
The master
sends a request. The slave is unresponsive
for the amount of time specified
by the response timeout function.
The master gives up on the request
and resumes operation, allowing
another request to be initiated.
|
By not specifying
a standard for the response timeout, the
Modbus protocol can accommodate a wide range
of devices and systems. However, the absence
of timeout standards introduces additional
challenges for system integrators working
with legacy or proprietary devices.
>>
Back to top
|
|
|
| How
a single value leads to big headaches |
|
| Determining
the optimal response timeout value is essential
to a system’s operational efficiency.
If the timeout is set too low, a master
may give up on a request too quickly, not
giving the slave enough time to respond.
With repeated failure to complete requests,
the system becomes unusable. The slave may
respond after the master has already initiated
another request, causing unforeseen problems.
Likewise, if the timeout value is set too
high, valuable system resources are wasted
if a master ends up waiting for a disconnected
or malfunctioning slave to respond. With
the inherent problem of network traffic
and lag, it is even more critical to set
effective timeout values so Modbus serial
devices can interact properly with Ethernet
devices.
Each slave device
requires a different amount of time to process
a master’s request, depending on how
the device is designed. For example, a simple
RTU may provide an immediate response if
it simply needs to report the current reading
of an attached sensor. However, a more sophisticated
RTU may take longer to respond if several
elements must be coordinated or if the data
requires additional manipulation. For this
reason, a device’s recommended response
time is usually provided by the manufacturer,
based on processing requirements and speeds.
In order to determine a master’s appropriate
timeout setting, system integrators take
the recommended response times of each slave
and apply further calculations based on
baudrates and application requirements.
With up to 31 slaves on a single serial
line, finding the correct timeout setting
for the master device can be a painstaking,
laborious process.
Integrators face additional
complications when dealing with devices
that have a proprietary design. When a device
is designed for a closed system, the manufacturers
may have the optimal timeout settings already
hard coded into the device. In this case,
the recommended timeout values may not be
provided, leaving integrators with no way
to calculate the timeout value if the system
needs to be maintained, expanded, or upgraded.
Even for systems that
are not based on proprietary designs, integrators
run into problems due to poor or unavailable
technical documentation. As aging Modbus
networks are upgraded, recommended timeout
settings may be difficult to find due to
documentation that was discarded or filed
in a long-forgotten place. A time-consuming
search through different archives may be
required to locate the documentation or
determine whether it even exists. Even if
the documentation is found, it may be equally
or more difficult to sift through the material
for the recommended timeout value.
>> Back
to top
|
|
|
| How
integrators handle response timeout problems |
|
|
The
response timeout is often neglected when
integrators troubleshoot problems with a
Modbus installation, and many integrators
may not even know what the response timeout
is. Instead, the system’s baudrate
may be lowered or other adjustments made
until the system is finally operational.
However, making this kind of compromise, which can lead to a degradation of system
performance, could be avoided if
the response timeout was set correctly.
If an integrator does
not have the documentation required to determine
the optimal response timeout setting, systematic
trial and error must be used. With experience,
Modbus integrators can often rely on intelligent
estimates that are based on commonly used
settings and an understanding of the likely
cause of timeout errors. However, repeated
testing and adjustment is still required
to find the optimal value.
An alternative approach to response timeout
values has been proposed as a feature in
Modbus gateways, which connect Modbus TCP
networks to Modbus RTU/ASCII networks. In
a typical application, the Modbus gateway
sits between the two networks and allows
TCP masters to send requests to RTU slaves.
Instead of requiring integrators to figure
out the response timeout value, the gateway
would automatically track response times
as it forwards requests from TCP masters
to RTU slaves, and dynamically update
its own response timeout setting as it receives
responses from RTU slaves. While this approach
is easier for the integrator since the timeout
value is automatically set by the Modbus
gateway, there are some drawbacks. Since
response times are only tracked for requests
that are received, some slaves may not be
represented in the calculation of the response
timeout value. In addition, a slave’s response
time can fluctuate wildly depending on the
nature of the request sent, so the timeout
setting may be too optimistic. Furthermore,
every time the Modbus gateway is powered
up, it would initially have no data to set
the response timeout value and would need
to start tracking response times all over
again.
>>
Back to top
|
|
|
| A promising new approach |
|
|
Until now, the task of determining the
appropriate response timeout value for a
Modbus system has been frustratingly
difficult. Modbus experts essentially had
three choices for figuring out the timeout
value:
| 1. |
Complicated
calculation with many variables, and
the need to search through old documentation |
| 2. |
Time-consuming, systematic
trial and error |
| 3. |
Giving up and settling
for degraded system performance |
However,
a brand-new line of Modbus gateways now offers a new and effective solution.
This new approach
tracks all response times at once, and uses
a proprietary formula developed by MOXA's R&D engineers (patent pending) to derive the recommended
response timeout value. The integrator simply
clicks a button, and the Modbus gateway
sends a universally recognized Modbus command
to every single slave device in the system.
Each slave’s response time is tracked,
and the Modbus gateway’s response
timeout value is then configured according
to a carefully tuned formula. Although this
method requires some time to complete, it
only needs to be completed during initial
installation or if a new slave device is
added to the system. The gateway retains
the setting when it is powered off and does
not need to track response times again after being turned back on.
More importantly, this new approach
makes it easy for integrators to find the
perfect response timeout setting for any
Modbus system, saving a great deal of time
and grief.
The response timeout
setting has been a deceptively difficult
issue for Modbus integrators. Without realizing
it, many integrators may have allowed improper
timeout settings to hurt system performance.
Figuring out the right value to use has
traditionally been a difficult and time-consuming
process, even when the necessary documentation
is readily available. However, with greater
understanding and the development of a promising
new approach, integrators may finally be
able to handle this issue more effectively.
NOTE:
MOXA's new line of Modbus gateways will
be available starting at the beginning of
April. Please contact a MOXA sales representative
for more information about these products.
>> Back
to top |
|
|
|
|
New!
World's leading industrial video encoder with
full D1 and dual codecs ready in early April
|
|
|
The
MOXA VPort 351, an industrial video encoder
with Full Motion and Dual Codecs, will be
ready for sale at the beginning of April. The
VPort 351 is a high performance, 1-channel
industrial video encoder that provides up
to full D1 (NTSC: 720 x 480; PAL: 720 x
576) resolution @ 30 FPS and supports a
dual MJPEG4/MJPEG algorithm, making it especially
well suited for use with distributed surveillance
systems in critical industrial applications.
The VPort 351 can help you move your video
over IP surveillance system into the industrial
world!
The VPort 351 features
DIN-Rail mounting capability, 12/24 VDC
or 24 VAC redundant power inputs, and IP30
protection to meet the requirements of industrial
environments. An extended temperature model
with operating temperature range of -40
to 75°C is also available for outdoor
and harsh environments such as roadways,
refineries, and power plants. In addition,
the VPort 351 has received important industrial
and safety approvals, such as UL508, Class1,
Div. 2, making it suitable for transportation,
utility, and manufacturing systems. The
VPort 351 has enclosure, EMI, and surge protection
to protect against harmful interference.
VPort 351
Key Features
- MPEG4/MJPEG Dual Codecs
- Full D1 (720 x 480/576) @ up to 30/25
FPS
- 2-way audio for voice over IP communication
- Pre-alarm recording function for better
event recording
- Industrial rugged design with 12/24
VDC, 24 VAC redundant power Inputs, IP30
form factor, and DIN-Rail mounting
- Optional fiber optic Ethernet port
(multi mode or single mode) and wide operating
temperature range (-40 to 75°C)
- Industrial and safety approvals, such
as UL508, and Class 1, Div. 2 for hazardous
environments
Ordering Information
|
VPort
351 |
1-ch
MPEG4/MJPEG Industrial Video Encoder
with 24 VDC power input, 0 to 60°C |
VPort
351-M-SC |
1-ch
MPEG4/MJPEG Industrial Video Encoder
with 24 VDC power input, 1 multi mode
100BaseFX port, SC connector, 0 to
60°C |
VPort
351-S-SC |
1-ch
MPEG4/MJPEG Industrial Video Encoder
with 24 VDC power input, 1 single
mode 100BaseFX port, SC connector,
0 to 60°C |
VPort
351-T |
1-ch
MPEG4/MJPEG Industrial Video Encoder
with 24 VDC power input, -40 to 75°C |
VPort
351-M-SC-T |
1-ch
MPEG4/MJPEG Industrial Video Encoder
with 24 VDC power input, 1 multi mode
100BaseFX port, SC connector, -40
to 75°C |
VPort
351-S-SC-T |
1-ch
MPEG4/MJPEG Industrial Video Encoder
with 24 VDC power input, 1 single
mode 100BaseFX port, SC connector,
-40 to 75°C |
Detailed product information
is available on MOXA's global website at
http://www.moxa.com/product/VPort_351.htm.
>>
Back to top
|
|
|
|
Active
Ethernet I/O strengthens remote data acquisition
in NI LabVIEW |
|
|
ioLogik E2000 Active Ethernet I/O servers
are now compatible with NI LabVIEW 8.
Active Ethernet I/O
is a powerful new concept in remote data
acquisition where I/O events trigger customized
messages that are instantly sent to host
computers. Active Ethernet I/O supports
traditional Modbus/TCP for maximum compatibility
with existing applications.
"NI LabVIEW is
very popular in the fields of monitoring,
testing, and measurement," said Andy
Cheng, Division Manager of Active Ethernet
I/O products. "Active Ethernet I/O
is an opportunity to extend LabVIEW's remote
monitoring capability." LabVIEW's built-in
Modbus library can easily be used to connect
to an Active Ethernet I/O server. LabVIEW
also has a passive TCP software component
that can instantly receive TCP/UDP messages
from Active Ethernet I/O servers, without
incurring any additional costs.
The application guide
for using ioLogik E2000 I/O servers with
LabVIEW is now available for download on
MOXA's web site. For more information, please
refer to http://www.moxa.com/Zones/Active_Ethernet_IO/index.htm

>>
Back to top
|
|
|
|
New
TCF-142-M/S V3.1 converters provide even better
performance |
|
|
The
new TCF-142 V3.1 serial-to-fiber converter
offers even greater transmission distances
than V3.0 models. The converter comes in
different models to transform serial signals
into single-mode or multi-mode fiber, with
each model equipped to handle RS-232 or
RS-422/485 serial interfaces. For multi-mode
models, fiber optic transmission distance
has been improved to 5 km (originally 2
km), and for single-mode models, transmission
distance is now 40 km (originally 20 km).
On the new models, the power budget has
been effectively doubled to provide higher
data transmission distance and stability.
Also, special models are available by request
with different fiber optic connectors, such
as SC/FC type connectors, or an even higher
power budget (40 dB /80 km).
Click
here for product details and ordering
information.
>>
Back to top
|
|
|
|
Industry's
best warranty now offered on entire line of
serial port-powered products |
|
|
MOXA
has experienced tremendous success with
the TCC-80I, the world's first isolated
high-speed port-powered converter, and the
TCF-90/M/S, our high-performance port-powered
serial-to-fiber optic converter. As a result,
the warranty period for all serial port-powered
products will be extended from 2 years to
5 years, which is the most generous warranty offered in the industry.
This new warranty period applies to the
entire family of serial port-powered converters,
including the TCC-80, TCC-80I, TCC-80, TCF-90-M,
and TCF-90S. Whereas other manufacturers
are still providing only a 1-year warranty
or none at all, MOXA is the only manufacturer
providing a 5-year warranty on all serial
converters.
Quality and confidence
allows us to provide better service for
our customers. This is why the new warranty
period applies not only to new purchases,
but also to current users of our products.
Now, both current and new users can enjoy
even greater benefits when using MOXA serial
port-powered converters.
Click
here for product details and ordering
information.
>>
Back to top
|
|
|
|
| TCF-142-S-T
V3.1 expands airport radio control system |
|
| As
the volume of air traffic grows, airports
continue to expand their hardware and software
to serve more customers. One of the most
important systems is the radio system, which
supports airport operations such as fleet,
freight, logistics, and emergency management.
Whether it is between the tower and the
runways, or between the hangar and the terminals,
voice communication at an airport usually
involves a radio microphone.
The amount of territory
occupied by airports has also grown, and
as a result, buildings, terminals and other
operational offices can be more than 25
km away from each other. Airport radio control
systems must be upgraded to handle the increased
distances between controllers, but it is
challenging and expensive.
Typically, this problem
is addressed by using media converters and
fiber optic cables to extend transmission
of the RS-422 serial signals.
A simple and cost-effective
approach involves using MOXA's TCF-142
converters arranged in a fiber optic network.
In the MOXA solution, most of the controllers
are connected by pairs of TCF-142-S V3.1
converters, each of which extends RS-422
signals up to 40 km, which is farther than
any other converter. In addition, the TCF-142-S-T
V3.1 can operate in extreme temperatures
from -40 to 75°C, making it ideal for
use in exposed outdoor cabinets.
By using this approach,
the cost to upgrade and maintain the radio
control system is immediately and dramatically
reduced. The fiber optic communication allows
data to travel over longer distances, and
also provides EMI protection. In addition, installation is
much easier since no configuration is required.
As opposed to the 20 km supported by other
converters, MOXA's TCF-142-S V3.1 can transmit
over a distance of 40 km. These advantages
make the TCF-142-S V3.1 the perfect solution
for extending communication between radio
controllers over long distances.

Advantages
of TCF-142 converters:
- Both ring and point-to-point
transmission supported
- Up to 40 km extension
of serial signals (TCF-142-S V3.1)
- Up to 921.6 Kbps
baudrate
- 12 to 48 VDC input
- Wide operating
temperature range from -40 to 75°C
- Small size
For more information,
please contact your MOXA sales representative.
>>
Back to top
|
|
|
SCADA
system made efficient and cost-effective with
UC-7110 |
|
|
Digital CCTV is a common component of reliable
SCADA systems. However, it requires the
attachment of many encoders and decoders
to the system, and data must be transmitted
according to the IEC 60870-5-104 protocol.
It is difficult and often expensive to establish
an efficient management tool to control
camera parameters such as sequence, positions,
and text.
A company in Europe
decided to use MOXA's UC-7110
embedded computer to construct a reliable
SCADA system. With two RS-232/422/485 serial
ports and two LAN ports, the UC-7110 was
able to connect many devices such as controllers,
encoders, and decoders to the SCADA system.
The UC-7110 offers stable communication
with reliable data flow control, and it
reduces the effort required to duplicate
remote devices. Furthermore, the flexibility
and power provided by the UC-7110 is helpful
in reducing cable complexity, simplifying
system architecture, enhancing functionality,
and controlling data flow. With the well-designed
software tools that are provided, programmers
can turn the UC-7110 into a customized solution
by developing software for protocol conversion
and data transmission.

Using the UC-7110
in this SCADA application brings the following
benefits:
- Small size with fanless design
- Less cabling
- Less management effort
- Programmable for customized applications
- Easy protocol conversion
- Optimized data flow
Click
here for more information on UC-7110
embedded computers.
Click
here for more information on MOXA embedded
computers
>>
Back to top
|
|
|
| Concrete
production plants get smarter with Active
Ethernet I/O |
|
|
Developing countries rely heavily on the
building construction industry, and the
availability of concrete can be a critical
factor in a nation's development. To achieve
more efficient concrete production, companies
have increasingly relied on automated systems.
An excellent solution involves using MOXA's
I/O servers as part of a smart concrete
production plant, and different product
lines are specially designed for different
systems. The ioLogik
4000 series is designed for high density
environments, whereas the ioLogik
2000 line is ideal for distributed environments.
Whichever ioLogik server is used, the powerful
DLL library provided by MOXA makes it easier
for programmers to develop robust applications
for their specific needs.
Architecture
Requirements
- Flexible I/O combination
- Easier wiring for high density environments
- Free PC-based DLL library
- Ethernet communication
- Counter mode for digital input
Why Moxa?
- Easy-to-use VB, VC++, and BCB libraries
for Windows, WinCE, and Linux platforms
- 16 digital input and output channels
for easy wiring
- Expandable I/O design
- Counter mode for digital input

|
|
|
| MOXA
EDS switches chosen by industry leader in
filling and packing |
|
|
Introduction
One of the world's leading machine builders
specializes in providing complete production
lines for filling, labeling, and packaging.
As an innovator in Ethernet-controlled machine
automation, this company is leading a paradigm
shift in machine control where an industrial
network is essentially grafted onto a single
machine or set of machines. By relying on
Ethernet, the builder's line-up of integrated
machine solutions can enjoy many advantages
in areas such as stretch blow-molding technology,
filling and closing technology, labeling
and dressing technology, inspection and
monitoring technology, process engineering,
brewing technology, and much more. One of
their flagship solutions is a complete soft
drink bottling production line that comprises
three primary machines—a filling machine,
a labeling machine, and a packaging machine.
The company needed several best-in-class,
industrial-grade Ethernet switches that
would be used for the internal network in
this and other integrated machine solutions.
System Description
Each machine combines PLC controllers, an
HMI control panel, and numerous I/Os, relays,
sensors, and counters, all of which are Ethernet-based.
The machine builder needed a proven, reliable
Ethernet switch to form the internal communication
network between these devices at the system
(machine) level. The network also needed
to port out to the factory floor to integrate
with other process machinery and allow remote
monitoring and control. Since the company
designs and builds machinery for the food
packaging industry, sanitation and maintenance
requirements are also critical factors in
system design. Machinery must be built to
withstand high-pressure, high-temperature
washings, as well as the cleaning solvents
used for sterilization.
The builder selected
MOXA's EDS-305-M-SC, EDS-308-M-SC, and EDS-316-M-SC
unmanaged Ethernet switches. These rugged
Ethernet switches are specially designed
to withstand the range of temperatures,
vibration, and electrical noise typical
of industrial environments. Each of these
models includes one multi-mode fiber optic
port capable of transmitting data up to
5 kilometers to provide reliable, high-speed data
transfer between machines or to the central
control room. Redundant DC power inputs
and an operating temperature range of 0
to 60°C are standard, and special models
are available that can operate between -40
and 75°C. Each switch also has a 5-year
warranty and comes with relay contacts that
activate an alarm when the power fails or
a port link breaks. By using watertight
sensors and enclosed EDS Ethernet switches,
the builder was able to design solutions
that meet the demanding system requirements.

Benefits of
EDS-305-M-SC, EDS-308-M-SC, and EDS-316-M-SC:
- EDS Ethernet switches have a rugged
design and IP30-rated casing for resistance
to temperature, vibration, and electrical
noise, making them suitable for applications
in harsh environments.
- These EDS models can transmit up to
5 km over multi-mode fiber, meeting the
long-haul transmission requirements of
large-scale factories.
- "-T" models are available
for reliable operation in extreme temperatures,
from -40 to 75°C.
- The fanless, low-power design ensures
a high MTBF for long-term, trouble-free
operation and lower maintenance requirements.
- The built-in hardware relay output
can activate an alarm during a power failure
or port break, providing field engineers
with a real-time warning system.
|
|
|
| Evaluation
system for GSM, CDMA, UMTS, and TD-SCDMA networks |
|
| Background
Wireless service providers rely on network
optimization and evaluation systems, many
of which are installed in vehicles for mobility,
to ensure reliable, uninterrupted service.
Frequent onsite maintenance by a technician
is required for maximum effectiveness. However,
many pieces of equipment must be managed
using a serial console, and lugging a PC
between sites is not feasible.
Solution
To keep technicians mobile, a laptop is
used instead of a PC for serial console
connections. Since laptops typically come
with USB ports instead of COM ports, a USB-to-serial
hub is a critical accessory.
MOXA's UPort
1410 is a USB-to-serial hub that adds
four RS-232 ports through one USB port.
The hub is the size of a paperback novel,
giving the laptop maximum mobility and functionality.
With UPort installed, technicians can be
both mobile and well-equipped to perform
tests such as handset quality, dial, MOS,
C/I, scanner CW, pilot scanning, spectrum,
and UMTS video call tests.
Benefits
- Enables easy maintenance and high mobility
with USB design
- Overcomes physical limitations of small
form factor PC's

>>
Back to top |
|
|
|
| New
website section shows MOXA embedded computers in embedded
applications |
|
|
MOXA is pleased
to announce the launch of the Embedded Applications
Site, which explores how our embedded computer
products are used in different vertical
markets.
Many software partners
have already developed applications for
our ready-to-run embedded
computers, which provide reliable operation
over wide temperature ranges. The new website
presents the different ways that our products
are used in embedded applications. System
integrators and software partners now have
an excellent tool to introduce our embedded
computers and solutions to various vertical
markets, such as power, transportation,
POS, environmental monitoring, manufacturing
automation, and medicine.
Our embedded solutions
are designed for industrial applications
and are easy to implement with different
operating systems. They offer a user-friendly
environment for both Linux and Windows CE
programmers, and allow software partners
to develop applications with ease.
The Embedded Applications
Site is located at the following URL:
http://www.moxa.com/Zones/Embedded_Computing/
Embedded_Applications/index.htm
If you have
any comments or suggestions, please contact
us at info.sys@moxa.com.
>>
Back to top
|
|
|
|
| See MOXA at 2007 Hannover Messe
|
|
|
MOXA
is pleased to announce our participation
at the 2007 Hannover Messe tradeshow in
Hannover, Germany, from April 16 to 20,
2007. Three key themes will be the focus
of the MOXA exhibit: gigabit solutions,
wireless solutions, and Active Ethernet
I/O solutions. Our full line of products
will also be displayed, including Active
Ethernet I/O servers, industrial Ethernet
switches, serial device servers, embedded
computers, GPRS modem/routers, USB to serial
hubs, and industrial video servers. Everyone
is encouraged to come to the 2007 Hannover
Messe and visit us at the MOXA at Booth.
Staff will be on hand and happy to answer
your questions.
MOXA will also be presented at the Modbus-IDA booth at Hall 9, Stand A59. The Modbus-IDA exhibit will focus on Modbus applications that rely on wireless connections. One of their featured products will be MOXA MGate MB3000 Modbus gateway, which makes it easy to integrate Modbus serial with Modbus Ethernet. The MGate MB3000 features automatic calibration of response timeouts and smart routing of TCP requests to serial slaves. It is designed to integrate Modbus networks seamlessly, without altering existing system architectures.
Hannover Messe is renowned as one of the world leading showcases for industrial technology, and provides an excellent opportunity to learn about MOXA newest product offerings and the latest developments in industrial communication technology.
>> Back
to top |
|
|
|
|
|