EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Modbus R2-5 available
From: Mark Rivers <[email protected]>
To: "[email protected]" <[email protected]>
Date: Wed, 2 Oct 2013 14:31:25 +0000
Folks,

Release R2-5 of the EPICS "modbus" module is now available. This is from the release notes:

- Fixed a mutex issue with the input poller. Previous versions had a potential problem with input records which did not use Scan=I/O Intr. In this case there was no mutex protecting access to the read buffer between the device support thread and the poller thread that was reading the Modbus data. It is likely that this problem was rarely if ever encountered because input records were almost always I/O Intr scanned. The fix was to remove the existing mutex in the driver and to simply call pasynManager->lockPort() for the entire duration of the polling cycle. This fix has a positive side effect: it is now possible for external clients, for example other drivers that call the Modbus driver, to temporarily disable the poller by calling pasynManager->lockPort(). This can be used to allow atomic sequences of Modbus read/write operations with no possibility of interference from the poller. 

- The above fix means that Modbus input drivers can now block on read operations, because they may need to wait for the poller to complete. These drivers are thus now created with the ASYN_CANBLOCK flag, and the documentation has been changed to state that input drivers are now asynchronous, not synchronous. 

- Changed the wait for interruptAccept in the poller thread. It now works to have a very long polling time, but still having one initial read cycle and callback on I/O Intr scanned records. 

- Added a new command to the Modbus driver, which has the drvUser string "MODBUS_READ". This command is implemented on the asynInt32 interface. Calling asynInt32->write() with this command causes a Modbus I/O cycle for this driver. It will typically be used to force a Modbus input driver to do a read operation independent of the poller thread. 

- Added a new test driver called testModbusSyncIO.cpp. This driver is derived from asynPortDriver. It is designed to demonstrate using another asyn driver to communicate through the Modbus driver. This concept is currently being used to have a motor driver that communicates through the Modbus driver. It demonstrates two types of communication: 

  - Using pasynInt32SyncIO calls to make "synchronous" calls to the Modbus driver. These calls are blocking and are queued. 

  - Doing an atomic "read/modify/write" cycle using the following sequence of operations. This uses pasynManager->lockPort to disable the poller and allow this thread to directly call the asynInt32->write() and asynInt32->read() functions. 

- This new example driver can be tested with the new files iocBoot/iocTest/sim3.cmd and sim3.substitutions. 

- Minor change to structure packing declarations to allow building on ARM architecture with GCC 4.2.1


The release notes are here:
http://cars.uchicago.edu/software/epics/modbusReleaseNotes.html

The documentation is here:
http://cars.uchicago.edu/software/epics/modbusDoc.html

The tar file is here:
http://cars.uchicago.edu/software/pub/modbusR2-5.tgz


Cheers,
Mark



Navigate by Date:
Prev: Re: how to issue a shell command from EPICS record ? Dirk Zimoch
Next: Re: how to issue a shell command from EPICS record ? Konrad, Martin
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: EPICS Device Support for PowerPMAC, Attocube and SSH Philip Taylor
Next: Sending alarm warnings via email and text L. C. De Silva
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·