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: Asyn record proccessing( read functions) during PINI=YES |
From: | Patel Jignesh <[email protected]> |
To: | Mark Rivers <[email protected]>, "[email protected]" <[email protected]> |
Date: | Mon, 16 Mar 2015 16:32:22 +0000 |
Dear Mark, Thanks for your reply and info. I am also using PINI filed for output records only. By keeping the drvInfo field different for same type of input and output records i.e. IN_INT8 and OUT_INT8 for INT8 I can distinguish the record types. I have tried other thing, as you have mentioned “bumpless reboot process”, I have checked interruptAccept flag in read function during its value “0” (before iocInit complete), I assume that whatever records are
processed during this time mush have PINI=YES. And if only output records have PINI=YES, than I can identify them now. So please give your comments for this method. Thanks and best regards, Jignesh
From: Mark Rivers [mailto:[email protected]]
Hi Jignesh, Generally I don’t use PINI=YES on input records, I set them to SCAN=I/O Intr and then as long as your driver does callbacks on them in the constructor they will process
at least once when the IOC boots. If an output record is processing because of PINI=YES then it will NOT call the read function in your driver, it will call the write function. However, it will call
the read function in your driver prior to the PINI=YES phase of iocInit when it attempts to read back the value from the driver to support “bumpless reboots”. I think you can probably distinguish whether the read is being called for an input record or an
output record by querying EPICS base to find out what phase of iocInit is being executed.
However, I think that is more complex than necessary, and I suggest that if you need to distinguish between output and input records then the simplest way is to use a
different drvInfo field in the record and a different parameter for input and output. Like the following: record(bo, "$(P)$(R)SetGate") { field(PINI, "YES") field(DTYP, "asynInt32") field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))GATE_OUT") } record(bi, "$(P)$(R)GetGate") { field(PINI, "YES") field(DTYP, "asynInt32") field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))GATE_IN") } Mark From:
[email protected]
[mailto:[email protected]]
On Behalf Of Patel Jignesh Hi, In Asyn driver, for any record processing read function, during PINI=YES processing, can we distinguish between input and output records ? I want to put some checks for address limits (i.e. typical db offset for PLC communication) which may be different for input and output records. So during PINI processing, I want to check these limits for output records. Can we use asynUser details, which may be different but not sure ? as its void pointer so difficult to use. Thanks and best regards, Jignesh
|