(519 KB) Pobierz
October 2009
Modbus Members at
Several Modbus Organization member companies are
exhibiting next week at the ISA EXPO 2009 Show in
Houston, Texas. Need a device that “speaks” Modbus or
advice on a Modbus issue? Experts at these firms are
available to help.
A list of these companies and the booths where they can
be found follows:
Kepware Technologies
Phoenix Contact
ProSoft Technology
Sealevel Systems
Member Companies
Offer Modbus
Learning Tools
Whether you’re a noobie or an old hand, you may be
interested in checking out some of the Modbus tutorials
made freely available by our member companies.
For a nice review of Modbus
implementation, go to
Control Solution’s
The tutorial covers topics such as:
• What is Modbus?
• Where do I start?
• Review of Modbus Register Types
• Review of Modbus Function Codes
• Modbus: When 40001 really means 1,
or 0 really means 1
• If registers are 16-bits, how do I read Floating
Point or 32-bit data?
• How many devices can I have on a Modbus network?
also offers an extensive
Introduction to Modbus TCP/IP
its website (registration required):
For a discussion specific to Modbus RTU,
Real Time
provides a tutorial,
Modbus RTU Unplugged
– An introduction to Modbus RTU
Addressing, Function Codes, and Modbus
RTU Networking
This paper includes topics such as
• Modbus RTU Drawbacks
Reporting by Exception
• Data Object Properties
• Modbus RTU versus Other Protocols
• Difference Between Modbus RTU and Modbus TCP
continued on page 6
modbus-tk: a python
implementation of Modbus
A new project has been listed on the Modbus
s Technical Resource page
( Modbus Test Kit (modbus-
tk ) is an implementation of the Modbus protocol in
Python that supports Modbus RTU and TCP for writing
masters and slaves. The developer
main purpose in
making this tool available is to make the development of
testing tools as easy as possible. (The Python language is
flexible and easy to learn and to use.) Modbus Test Kit is
distributed under GNU LGPL license. Note that
modbus-tk is different from pymodbus, which is an
implementation of the Modbus stack in python.
The site offers links to third-party sites for
Modbus users
and developers
convenience. These are
not under the control of the Modbus Organization, and
we are not responsible for the contents of any linked site
or any changes or updates to such sites. The inclusion of
these links does not imply endorsement of the site by the
Modbus Organization or imply approval of any content,
recommendation or application.
News about the World’s Most Popular Industrial Protocol
Member News • MemberNews
Meet Some of Our Members...
Proportion-Air, Inc.
is a manufacturer
of electronic air pressure regulators
and air flow control valves. Founded in
1985, Proportion-Air offers a large
family of electronic air pressure
regulators and air flow control valves
Located in central
founded in 1983,
and offers a full line
of industrial
controls for the
water and wastewater industry.
MPE’s Station Controller series
(SC1000 & SC2000) are SCADA-ready
pump controllers designed to perform
level control in a wide range of lift
station applications. The SC1000
operates the pumps based on selected
setup values and the wet well level
The source of the level input signal is
menu selectable as either a 4-20 mA
transducer or a 10-point conductance
probe. The SC1000 alternates the
pumps, performs lag pump delays,
provides high and low alarms, and has
a variety of control options available in
the setup menu to customize the
controller to the application.
mission is
straightforward: to offer innovative,
industrial-grade SCADA Gateways for
water meters.
The company’s patent-pending
EtherMeter was developed to erase the
communication barrier between
Encoder Registers and PLCs, RTUs,
and SCADA controllers. The
EtherMeter Gateway is equipped with
two meter interface ports and three
PLC/RTU/SCADA interface ports. It
operates by reading Encoder Registers
using the appropriate AMR protocol
and transmitting the corresponding
totalization and flow data to the
SCADA equipment using industrial
protocols, such as Modbus, DF1,
EtherNet/IP™, raw ASCII, and
SCADAmetrics’ EtherMeter Interfaces
are targeted toward the SCADA,
industrial control, and commercial
submetering arenas. The EtherMeter is
optimized for control system
applications, and contains a plethora of
features for applications in these
that allow you to select the best
product to match your exact
application requirements.
The company recently released a
Modbus version of its electro-
pneumatic pressure control and flow
control valves equipped with Modbus.
Modbus serial communications
capability is available on the popular
QBT, QPV, and QB3 series of
pressure control valves, which operate
as Modbus slaves.
Shouldn’t your company
be a member?
Modbus Newsletter
This is the newsletter of the Modbus
Organization, the international non-
profit organization devoted to the
evolution and support of the Modbus
protocols. For more information about
membership and other services, please
refer to our website:
Newsletter Editor:
Lenore Tracey (
Copyright 2009 by the Modbus
Organization, Inc.
PO Box 628
Hopkinton, MA 01748 USA
ph +1-508-435-7170
fax +1-508-435-7172
The Modbus Organization Mission
The Modbus Organization, Inc. is a group of independent users and suppliers of
automation devices that seeks to drive the adoption of the Modbus communica-
tion protocol suite and the evolution to address architectures for distributed
automation systems across multiple market segments. Modbus Organization also
provides the infrastructure to obtain and share information about the protocols,
their application, and certification to simplify implementation by users resulting in
reduced costs.
Modbus Discussion
Modbus master control...
Luís Soares asked the forum:
I want to know how I can solve the
following situation:
I have one system that communicates
using Modbus protocol and RS485
bus, with some network analyzers. I
would like to put another Master on
the line to make some requests to the
network analyzers too.
The problem is that probably with two
Masters on the line the messages will
get screwed [up] and there will be
collisions for sure.
Is there any hardware device (to which
I can connect both Masters) that I can
use to connect both systems to be able
to manage the requests on the line? This
device would buffer the requests from
the two Masters and avoid problems
on the line.
Or is there another way to solve this
Jerry Miille replied:
The MARC Multii-Port
( is
commonly used for connecting
multiple Modbus Masters to a network
of one or more Modbus Slaves. It
works as you describe by buffering the
messages and only replying to the
Master that made the request. You can
contact me directly if you have any
questions. Jmiille [at]
From the Modbus Discussion Forum…
criders had some thoughts and
some questions:
I think that you would have to find a
way to sync the two Masters somehow.
When one of the Masters is
communicating, then the other one
doesn’t, What type of Masters are you
using, PLCs or PCs? Also are you using
If you are using the RTU framing
protocol, you could extend the silent
interval of one of the Masters. Instead
of a silent interval of 3.5 characters, try
setting one Master’s silent interval to
something like five characters. This
might give you enough of a window
to perform the communications.
I never had to use two Masters before,
so if you try it, please use caution.
Patrick L commented:
HMS makes a gateway that is a
Modbus RTU Slave to Modbus RTU
Slave. Connect one Master to one of
the Slaves and the other Master to the
other Slave. The gateway has a fixed
mapping of 512 Bytes In and 512
Bytes Out.
For more info, go to
or send me an email at: support [at]
Lorne had another suggestion:
Check out the PLC09 Arbitrator
( It was developed for
exactly this application.
Add your commects to this thread
Find the best way to engage...
email to:
plan the optimum strategy for
social media engagement
develop a program to meet
your goals and budgets
Modbus-IDA Discussion Forums
Modbus Discussion
MBLogic Free Soft Logic -
In February, Michael Griffin
The MBLogic Free/Open Source
software project has a new release. The
package, which has been known as
MBServer, now has soft logic
incorporated into it, and as a result is
now known as MBLogic. This has
been the goal of the project from the
This is Free Software released under a
GPL license. You can use it free of
charge, modify it, re-distribute it, etc.
The user-visible parts of the software
have been designed to make it fairly
simple to strip out the “MBLogic”
branding, so if anyone wants to
redistribute this under another brand
name, that should be pretty straight
MBLogic has the following features:
From the Modbus Discussion Forum…
standard MS-Windows newline (CR-
LF) characters in the text files (for easy
editing). The “tar.gz” package will
probably also work on OS/X, but I
don’t have a Mac to test it on, so I can’t
say for sure.
Installation instructions are in a PDF file
located in each package.
The project web site has not been
updated yet (coming soon), but the
packages are online, as well as new
screen shots.
The web-based HMI has been tested
with the following web browsers:
Firefox (Linux and MS-Windows).
Opera (Linux and MS-Windows).
Epiphany (Linux). Google Chrome
(MS-Windows). Apple Safari (MS-
Windows). The HMI does *not* work
with MS Internet Explorer, as that
browser is based on outdated
technologies and does not have the
features needed for a graphical display.
The help and status web pages
however *do* work in MS IE (tested
with version 8). The help and status
web pages, of course, work with all
the other browsers as well.
The new soft logic feature is based on
the MBLogicEngineCk libraries, which
were previously released as a stand
alone library. The instruction set and
addressing are fully documented in the
online help. At present, programming is
IL only (ladder support is in the
planning stages).
The system ships with a demo
program that will run on start up. The
soft logic program now controls the
HMI “tank” demo screen that was
used in the previous MBServer release.
If you modify the sample soft logic
program, the changes will be reflected
in the HMI behavior. The soft logic
and HMI can be changed while the
system is running via the status web
management interface (effectively,
“online programming”).
I would appreciate it if people would
download this and give me feedback.
Recently, Rudi asked:
Can the MBLogic software be adapted
to work with I2C (I²C) and X10? I
would use it to replace the software I
use today in my home automation
If not, could you please point me to
some cheap Modbus I/O systems? I
need about 64 digital outputs and 16
analog inputs.
Michael Griffin responded:
I haven’t implemented any drivers for
I2C or X10, as I don’t have any suitable
hardware to test with. For inexpensive
Modbus TCP hardware, I would
suggest looking at Advantech. I’m
assuming you want the I/O as
distributed blocks, in which case the
ADAM 6000 series is probably the
most suitable.
From Rudi:
I was thinking maybe I can use a
Modbus to I2C converter. Googling
for such a thing I got the idea to maybe
program a micro-controller to do this.
There are some with I2C already on
board. Don’t know if somebody
already did.
Read the rest of this thread and add
your suggestions at
Modbus users & suppliers
get together on the
Modbus Community for:
Knowledge aggregation
Contact with Modbus
users and suppliers
Discussion supported by...
Modbus TCP client and server.
Web-based graphical HMI.
Online (web-based) help (more than
40,000 words). This has been
completely revised since the
previous (MBServer) release.
Online (web-based) status
monitoring. This has been
completely revised since the
previous (MBServer) release.
I am looking for people to use it and
would appreciate feedback.
The MBLogic_2009-02-22 package is
available at:
There are two versions of this
package. The “tar.gz” package is for
Linux, and the “zip” package is for
MS Windows. Both are identical,
except the MS Windows version has
had the files modified to use the non-
Soft logic (PLC) programmability
Networking to field I/O through
Modbus Discussion
More from the Modbus Discussion Forum…
Kepware Modbus TCP with Serial Server...
In September, Jay Banks wrote:
I have an issue and I’m sure someone
has run into this before.
• B&B ESP901 serial server
• Kepware OPC
• Modbus slave sim
• Modbus TestPro
I set up an old IBM laptop with a
Modbus slave simulator configured on
it. Seems to work fine.
Using Kepware OPC, I set up two
different devices: one TCP and one
serial, with the serial using a virtual
comm port.
On Kepware, the TCP poll fails, but
the serial (on the virtual comm) works
fine. The B&B was configured for
multiple connections, so that isn’t the
Using a program called Modbus
TestPro, I can poll the laptop using
TCP and it also works. BUT, I can only
poll it when I select “raw” TCP.
I’m thinking that since it works on my
secondary program, Kepware may be
using normal TCP and the B&B only
works with raw TCP packets.
I can’t find anything on changing these
settings on Kepware or the B&B.
If anyone has run into this, I would be
interested in hearing solutions.
Ryan Plester responded:
With Modbus, there are in general two
ways to communicate via TCP/IP. The
first (which Kepware seems to be
using) is Modbus TCP. This is basically
the regular Modbus serial protocol
with some header information sent via
The second method is usually referred
to as Modbus RTU via TCP. This is
exactly the same as the Modbus serial
protocol except that it is sent via TCP/
IP. This protocol does not have the
additional header information that
Modbus TCP has. This sounds like the
“raw” mode of your other
I am not certain how to set this up in
Kepware’s OPC sever but the
MatrikonOPC server for SCADA
Modbus has this as a selectable option
for each Modbus device you connect
to. Also, the OPC server for Modbus
allows you to specify this by using the
terminal server configuration option.
Contact MatrikonOPC Support at or 780-
Mark (PeakHMI) offered this:
I tested the Modbus TestPro with the
PeakHMI Modbus TCP simulator and
one other simulator. I could only run
Modbus TestPro in demo mode and
the results are the same for both
simulator programs.
Both programs received the same
request and both responded with the
same data and then Modbus TestPro
gives an error “Could not send
outgoing packet.” I assume that is
because it is not registered.
From the help dialog in Modbus
TestPro “raw” means without the TCP
wrapper. I do know the PeakHMI
simulator and the other one I tested
with will not respond to a “raw”
Everest Software also has a Modbus
Master/Slave OPC server (serial and
TCP). You might want to give it a try.
Jay replied:
I will say that Modbus TestPro will
work just fine unregistered. The only
thing it will do is annoy the heck out of
you with a pop-up. Which means you
must have something set up wrong.
I’m no expert on test software, but
Modbus TestPro is very reasonably
priced and one of the best programs I
have used. Or at least I can say, it is
much better than any free Modbus
master I have tried, and much cheaper
than most other commercial software I
The Modbus serial slave sim, on the
other hand, works, but is a little quirky
at times. But hey, it’s free!
Bill Graham (Industrial Thinking)
I am not familiar with the B&B
terminal server but the packets used
for TCP Modbus and serial Modbus
are different.
You can either use a device like a
Lantronix box with Modbus firmware
(UDS1100 may have been superceeded
now) to do the packet adjustment for
you or you can set up a serial Modbus
device in Kepware and tick the use
Ethernet Encapsulation option. This
effectively sends the Modbus packets in
serial format over raw TCP.
Jay answered:
The Ethernet Encapsulation option
worked. I did mess with that yesterday,
but I now see I wasn’t doing it right.
Am I right in thinking that “virtual”
comm ports aren’t the best way to do
things. It seems that in a large setup, you
wouldn’t want to load a large number
of virtual drivers on a system.
Kepware’s Fred Loveless chimed in:
If you set the B&B converter to be a
Modbus TCP to Modbus Serial
converter then you can use the Modbus
TCP driver to talk to the serial devices
and the converter will strip the Modbus
TCP Header and footer from the
message and send a normal serial
If the converter is just configured as a
Serial to Ethernet converter, then you
would use the Modbus Serial driver
and select Etherent Encapsulation. This
sends a raw Modbus serial packet over
Ethernet. Essentially this is what the
virtual comm port is doing as well.
E-mail technical support at Kepware
and they can help trouble shoot it
Add your commects to this thread
Zgłoś jeśli naruszono regulamin