1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 <2016> 2017 2018 2019 2020 2021 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 <2016> 2017 2018 2019 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Active modbus read function upon request |
From: | Mark Rivers <[email protected]> |
To: | "'Philippe Laurent'" <[email protected]>, "[email protected]" <[email protected]> |
Date: | Tue, 2 Feb 2016 20:08:41 +0000 |
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]]
Hi Marc,
Préservons notre environnement, n’imprimez ce mail que si nécessaire. |