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  2013  2014  2015  <20162017  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  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Active modbus read function upon request
From: Philippe Laurent <[email protected]>
To: Mark Rivers <[email protected]>, "[email protected]" <[email protected]>
Date: Wed, 3 Feb 2016 07:42:46 +0000

Hi Marks,

 

That sounds great to me and Chistophe Haquin.

 

Best regards.

 

De : Mark Rivers [mailto:[email protected]]
Envoyé : mardi 2 février 2016 21:09
À : Philippe Laurent; [email protected]
Objet : RE: Active modbus read function upon request

 

Hi Philippe,

 

In Modbus R2-5 I added a new drvUser value on the asynInt32 interface called MODBUS_READ.  If you have a bo record, for example, with this drvUser value then when that record processes it will force the driver to do a read, even if the poller is disabled.  The poller can be disabled by calling pasynManager->lockPort().  This was intended to allow atomic read/modify/write operations, as explained in the R2-5 release notes.

 

This has the disadvantage that it only really works from C code, not from the database, because you can’t call pasynManager->lockPort() from the database.  Because it does not actually run the poller it also has the disadvantage that it does not do callbacks for I/O Intr scanned records.

 

However, I think I see a solution that will work for both applications.

 

-        Change the poller so that a poller delay <=0 means sleep until an epicsEvent is signaled.   This means you don’t need to use a huge poller delay, you just use 0.

-        Change the behavior of the MODBUS_READ parameter in writeInt32 so it just calls epicsEventSignal for that event.  This will cause the poller to run once.

 

Does this sound like it will do what you want?

 

Mark

 

From: Philippe Laurent [mailto:[email protected]]
Sent: Tuesday, February 02, 2016 10:47 AM
To: [email protected]; Mark Rivers
Subject: Active modbus read function upon request

 

Hi Marc,

I would like to active some modbus port drivers upon request for retrieving Post Mortem datas.

It is possible to configure database such that the modbus read function is called only when a record is processing ?  (like write function)

If not, what is the best option to temporary desactive the modbus pooling ?

  1. Dynamically start an IOC well configured
  2. Just set an huge POLL DELAY on the modbus port
  3. Disable the asyn port with asyn record, I observe that :
    1.  modbus pooling thread is always active 
    2. trace in ioc shell : drvModbusAsyn::doModbusIO port LBEC-DCCT31:PostMortemRd2 disconnect error=asynManager::queueLockPort queueRequest failed: port LBEC-DCCT31 disabled
  1. Other

 


Préservons notre environnement, n’imprimez ce mail que si nécessaire.
Preserve our environment, print this email only if necessary.


Préservons notre environnement, n’imprimez ce mail que si nécessaire.
Preserve our environment, print this email only if necessary.


Replies:
RE: Active modbus read function upon request Mark Rivers
References:
Active modbus read function upon request Philippe Laurent
RE: Active modbus read function upon request Mark Rivers

Navigate by Date:
Prev: RE: epicsqt question Andrew Rhyder
Next: CSS Boy scripting, clear XY-Graph automatically Christian Pauly
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Active modbus read function upon request Mark Rivers
Next: RE: Active modbus read function upon request Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·