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  2016  2017  2018  2019  <20202021  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  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: calcout record, CP link, Cached Puts
From: "Hu, Yong via Tech-talk" <tech-talk at aps.anl.gov>
To: Michael Davidsaver <mdavidsaver at gmail.com>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 24 Nov 2020 21:49:34 +0000
Michael,

I tested those records in 3.14.12, 3.15.6, and 7.0.4.1, the same result. Although I set the reprocessing field RPRO to 1, the asynchronous calcout record is not reprocessed after the asynchronous delay is completed.

I enabled the field "TPRO" and I added a few debugging messages in the EPICS base, trying to figure out how the link option CP works. The call chain seems to be like this: whenever the value of "PMStatus-I" changes, dbCa.c/eventCallback() is called, then dbScan.c/scanOnce() is called; scanOnce gives out "onceSem" which is received by oneTask(); oneTask() calls dbAccess.c/dbProcess() which eventually calls the record support routine "process" if the record's PACT is not TRUE.    

The comment " /* If already active dont process */" and the codes in the function dbAccess.c/dbProcess() explain the results of the asynchronous caclout record: during the delay period, when a monitor occurs (it is INPA in my case), it indeed requests the calcout record be processed, but dbProcess() does not fulfill the request because the calcout's PACT is TRUE.   
       
------------------------------------------------------------------------
record(bi, "PMStatus-I") {
    field(DESC,"Post-Mortem status")
    field(ZNAM,"PM Ready")
    field(ONAM,"PM Detected")
}
record(calcout,"PM-Calc_") {
    field(INPA,"PMStatus-I CP")
    field(CALC,"A")
    field(OOPT,"Transition To Non-zero")
    field(OUT, "PM-Cmd PP")
    field(ODLY, "15")
    field(RPRO,"1")
    field(MDEL,"-1")
}
record(bo, "PM-Cmd") {
    #field(DTYP,"Launcher")
    #field(OUT, "@python /epics/iocs/postmortem/save_pmdata.py")
    field(ZNAM,"Idle")
    field(ONAM,"Setting")
    field(HIGH,"1")
}
------------------------------------------------------------------------
The original thread: https://epics.anl.gov/tech-talk/2020/msg02102.php 

On 11/21/20, 10:54 AM, "Michael Davidsaver" <mdavidsaver at gmail.com> wrote:

    What version of Base is involved?

    I did some work related to queuing of processing when an asynchronous
    record appears in the middle of a chain, which is applicable to your database.
    This appeared in 7.0.2.1.


Replies:
Re: calcout record, CP link, Cached Puts Michael Davidsaver via Tech-talk
References:
calcout record, CP link, Cached Puts Hu, Yong via Tech-talk
Re: calcout record, CP link, Cached Puts Michael Davidsaver via Tech-talk

Navigate by Date:
Prev: Re: ADEiger for EIGER2 Mark Rivers via Tech-talk
Next: Re: ADEiger for EIGER2 John Dobbins via Tech-talk
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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: calcout record, CP link, Cached Puts Michael Davidsaver via Tech-talk
Next: Re: calcout record, CP link, Cached Puts Michael Davidsaver via Tech-talk
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  <20202021  2022  2023  2024 
ANJ, 26 Nov 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·