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  <20182019  2020  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  <20182019  2020 
<== Date ==> <== Thread ==>

Subject: Pushing values to device on (re)connection to IOC
From: Eric Norum <wenorum@lbl.gov>
To: EPICS Tech-Talk <tech-talk@aps.anl.gov>
Date: Fri, 23 Mar 2018 10:38:26 -0700
An issue I’ve encountered is a device that requires some configuration or initialization on IOC startup that happens to power up after the IOC has started and PINI processing has finished.  The same issue arises when a device power cycles or resets itself during IOC operation — the output records in the IOC may no longer match the values in the device  I use the following arrangement to handle these conditions. The technique seems to work o.k. but I wonder if there’s a better mechanism for this.

First, there’s a record that periodically reads from the device.  It forward links to a ‘connection check’ record.
record(mbbi, "$(P)$(R)StatusRbk") {
    field(DESC, "System status")
    field(DTYP, "stream")
    field(INP,  "@devChiller4100.proto getD(F) $(PORT) $(A)")
    ...
    field(FLNK, "$(P)$(R)connCheck_")
}


Here’s the connection check — it watches for the device going back into the ‘no error’ state and then triggers a chain of fanout records.
###############################################################################
# Push values to chiller on reconnection.
# Monitor the status readback to detect reconnection.
record(calcout, "$(P)$(R)connCheck_") {
    field(DESC, "Push on reconnect")
    field(INPA, "$(P)$(R)StatusRbk.STAT NPP")
    field(INPD, "0")
    field(CALC, "(A=0&&D!=0));D:=A")
    field(OOPT, "When Non-zero")
    field(OUT,  "$(P)$(R)reconnA_.PROC”)
}


And here’s the start of the records that trigger writing of values from the initialization or output records to the device – I have as many of these forward-linked as needed to push all initialization and output values to the device.  It would be nice to have a fanout with more than six links!
record(fanout, "$(P)$(R)reconnA_") {
    field(LNK1, "$(P)$(R)OffOn")
    field(LNK2, "$(P)$(R)Setpoint")
    ...


-- 
Eric Norum
wenorum@lbl.gov


Replies:
Re: Pushing values to device on (re)connection to IOC Andrew Johnson

Navigate by Date:
Prev: RE: How to start EPICS IOC via LabVIEW on cRIO Baily, Scott A
Next: Re: Pushing values to device on (re)connection to IOC Andrew Johnson
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  <20182019  2020 
Navigate by Thread:
Prev: measComp R2-0 released Mark Rivers
Next: Re: Pushing values to device on (re)connection to IOC Andrew Johnson
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  <20182019  2020 
ANJ, 23 Mar 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·