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  <20102011  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  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Timeout errors with ASYN Modbus Driver 2.0
From: "Mark Rivers" <[email protected]>
To: "David Dudley" <[email protected]>, "EPICS tech-talk" <[email protected]>
Date: Mon, 11 Oct 2010 17:58:57 -0500
Title: Timeout errors with ASYN Modbus Driver 2.0

Hi David,

 

You said:

 

>  All devices in the modbus chain are scanned once per second, and during the time that the errors are –not- occuring, the data stream retrieved is valid.  

 

This is from your st.cmd file (with an edit by me to change the argument description for modbusInterposeConfig, you still had the old slaveAddress argument in the comment)

 

#modbusInterposeConfig(const char *portName, modbusLinkType linkType, int timeoutMsec)

modbusInterposeConfig("s7",1,1000)

 

# Read the Input Register set

#drvModbusAsynConfigure( const char *portName, const char *tcpPortName, int slaveAddress, int modbusFunction, int modbusStartAddress, int modbusLength, int modbusDataType, int pollMsec, const char * plcType)

drvModbusAsynConfigure("OM_Lab","s7", 1, 4,  0, 14, 0, 10000, "Siemens S7 Modbus")

 

So you are actually only reading the devices once every 10 seconds because pollMsec is 10000.  

 

You have a timeout of 1 second (timeoutMsec=1000).

 

Can you try increasing the timeout from 1 second to 2 or 4 seconds to see if the errors go away?

 

Mark

 

 

 


From: [email protected] [mailto:[email protected]] On Behalf Of David Dudley
Sent: Monday, October 11, 2010 1:41 PM
To: EPICS tech-talk
Subject: Timeout errors with ASYN Modbus Driver 2.0

 

Mark,

We’re having problems with the Modbus 2 driver for ASYN

I have 2 sets of Modbus networks.  One network has a single device, connected from a MOXA 5130 RS-485 converter to a Siemens S7-200 PLC.   The other has the same Moxa 5130 MOXA converter with RS-485, connected to a Mirion Radiation monitor and a Apantec Radiation monitor.

Originally, I was using Modbus version 1.3 on the system with the S7-200 PLC.  It worked for almost a year before upgrading to Modbus 2.  After that system had been operating successfully, with no errors, for an extended period, I needed to upgrade the driver so that I could have 2 Modbus devices daisy-chained on a connection.  At the same time, in order to limit the number of software revisions in the field, the S7-200 PLC network was upgraded as well.

Occasionally, we get error messages similar to the following:

-----------------------------------------------------------------------

epics> 2010/10/11 14:30:05.262 drvModbusAsyn::doModbusIO port LPDU3 error calling writeRead, error=radmon5.nsls2.bnl.gov:4001 TCP timeout: Resource temporarily unavailable, nwrite=6/6, nread=0
2010/10/11 14:30:05.262 B-725:VUV<RadMon:2a>Dosage:2 devAsynInt32 process read error
2010/10/11 14:30:05.262 B-725:VUV<RadMon:2b>Dosage:2 devAsynInt32 process read error
2010/10/11 14:30:06.262 drvModbusAsyn::doModbusIO port LPDU3 has I/O error
2010/10/11 14:34:42.310 drvModbusAsyn::doModbusIO port RM1W error calling writeRead, error=radmon5.nsls2.bnl.gov:4001 TCP timeout: Resource temporarily unavailable, nwrite=6/6, nread=0
2010/10/11 14:34:42.310 B-725:VUV<RadMon:1>Dosage:2 devAsynInt32 process read error
2010/10/11 14:34:42.387 modbusInterpose::readIt, CRC error
2010/10/11 14:34:42.387 drvModbusAsyn::doModbusIO port LPDU3 error calling writeRead, error=radmon5.nsls2.bnl.gov:4001 TCP timeout: Resource temporarily unavailable, nwrite=6/6, nread=0
2010/10/11 14:34:42.387 B-725:VUV<RadMon:2a>Dosage:2 devAsynInt32 process read error
2010/10/11 14:34:42.387 B-725:VUV<RadMon:2b>Dosage:2 devAsynInt32 process read error
2010/10/11 14:34:43.310 drvModbusAsyn::doModbusIO port RM1W has I/O error
2010/10/11 14:34:43.387 drvModbusAsyn::doModbusIO port LPDU3 has I/O error
-----------------------------------------------------------------------

This only happens occasionally, and happens on both modbus networks, at asynchronous times.  All devices in the modbus chain are scanned once per second, and during the time that the errors are –not- occuring, the data stream retrieved is valid.  I’ve verified that data is being transmitted, but it looks like occasionally data is not being received and processed correctly.

Oh, and also, it only happens if the IOC is using Modbus 2.  Modbus 1.3 works without errors, but can only address a single device on each modbus network.

Any ideas of where to start looking?

David

--
"... The Crossbow Project. There's No Defense Like a Good Offense. " - Real Genius (1985)

Don't think it exists?  Google the Air Force X-37B project.


References:
Timeout errors with ASYN Modbus Driver 2.0 David Dudley

Navigate by Date:
Prev: Re: No HomeStatus and No Motion with OMS MAXv : Motor 6.5.1 / VxWorks 6.8 / base 3.14.11 Daron Chabot
Next: No motion and No homeStatus motor:6.51/VxWorks:6.8/base 3.14.11: No change with a new motor.h Jerome HOSSELET
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Timeout errors with ASYN Modbus Driver 2.0 David Dudley
Next: No motion and No homeStatus motor:6.51/VxWorks:6.8/base 3.14.11: No change with a new motor.h Jerome HOSSELET
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 12 Oct 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·