EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: New modbus module released
From: "Mark Rivers" <[email protected]>
To: <[email protected]>
Cc: <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>
Date: Mon, 30 Apr 2007 13:38:39 -0500
Folks,

I have released a new EPICS module called "modbus".  This module is
designed to be a general-purpose interface to Modbus using the asyn
module for low-level drivers and for EPICS device support.

It was initially based on the modtcp and plctcp modules from Rolf Keitel
at Triumf.  The following are the main enhancements of modbus compared
to those modules: 

- modbus supports serial RTU and serial ASCII in addition to TCP. modtcp
supports only TCP. 

- modbus supports most Modbus function codes, including 1, 2, 5, and 15
for reading and writing coils (single bits) and 3, 4, 6, and 16 for
reading and writing registers. modtcp supports only Modbus functions 3
(read holding register) and 6 (write holding register). 

- modbus supports pseudo-interrupt mode on inputs. The poller thread
calls device support when there is a new value, so the EPICS records can
have SCAN=I/O Intr and do not need to periodically read the inputs. This
is more efficient. 

- modbus supports array operations on reads and writes using waveform
records. 

- modbus uses asyn for underlying TCP/IP or serial connections. This
reduces the amount of code, and has good debugging and connection
management. 

- modbus uses standard asyn interfaces and asyn device support. This
reduces the amount of code significantly. 

- modbus should run on all EPICS platforms. It has been tested on
linux-x86, vxWorks, win32-x86 (native Windows with VC++ compiler), and
cygwin-x86 (Windows with gcc compiler and Cygwin library). modtcp only
works on Linux and vxWorks. 

- modbus provides EPICS PVs for PLC status and statistics. 


The following are some drawbacks of modbus compared to the modtcp and
plctcp packages from Triumf: 

- modbus only works on EPICS 3.14, not on 3.13. 

- There is no Siemens PLC support. It should be a separate driver, using
drvModbusAsyn.c as a model. Most code in modbus is Modbus specific, so
it is cleaner to write a separate, but similar driver for other
protocols. 

- modbus has one thread per asyn port, which is a group of Modbus
registers or coils. This is more threads than modtcp, which had only 1
thread per PLC. There is an advantage in the modbus design, because each
can poll at a different rate, can have different Modbus function code,
and a different data type. It also allows much finer granularity in
debugging output. But it will lead to somewhat increased resource usage
compared to the modtcp design. 

The documentation is at:

http://cars.uchicago.edu/software/epics/modbusDoc.html 

and

http://cars.uchicago.edu/software/epics/modbus.html
	 
The distribution is at:
	 
http://cars.uchicago.edu/software/pub/modbusR1-1.tgz 

modbus requires the latest (R4-8) version of asyn, which is available
here:

http://www.aps.anl.gov/epics/download/modules/asyn4-8.tar.gz

Cheers,
Mark



Navigate by Date:
Prev: asyn R4-8 released Mark Rivers
Next: Re: RealPlayer complains of file not found for Getting Started with EPICS Lecture Series Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: asyn R4-8 released Mark Rivers
Next: MV1200/dec211x40 end driver auto negotiation bug, Thompson, David H.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·