EPICS Home

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  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: Help with bumpless IOC reboot, record linking and initialization concepts
From: "Johnson, Andrew N. via Tech-talk" <tech-talk at aps.anl.gov>
To: Marco Filho <marco.filho at ess.eu>, EPICS Tech Talk <tech-talk at aps.anl.gov>, Ralph Lange <ralph.lange at gmx.de>
Date: Thu, 18 Sep 2025 14:54:27 +0000
Hi Marco,

Many of our IOCs use one or more “dbpf” commands in their startup script (sometimes after an epicsThreadSleep) to enable processing after iocInit. Another approach is that the calcout record has a field for each of its input links that indicates whether the link is connected or not. You could try making use of that to wait until the connection is known to be up instead of inserting a fixed delay, and it should even be possible to handle disconnections and later reconnections for links to remote IOCs if you want to do that.

HTH,

- Andrew


-- 

Complexity comes for free, Simplicity you have to work for.


On 9/18/25, 5:55 AM, "Tech-talk" <tech-talk-bounces at aps.anl.gov> wrote:

Hi, Ralph, thanks for the help!

I added the record

record(bo, "DISBOOT") {
field(DESC, "Disable on IOC boot")
field(ONAM, "DISABLE")
field(ZNAM, "ENABLE")
field(VAL, "1")
field(PINI, "RUNNING")
field(HIGH, "5")
}

And the field

field(SDIS, "DISBOOT")

To the forwarder record (Not the local nor the global one) and it solved the problem.

It bothers me a bit to add a magic sleep time in the IOC instead of waiting for a known state to complete, but it's the best solution so far without removing the functionality of having hundreds of Local records following what is set in a single global record - without needing at least tens of fanouts or dfanouts.
Also, if I'm not mistaken even if I had fanouts I would still have this same process-at-initialization problem to solve.

Well, the IOC works without changing the hardware state at boot time now.

Thanks a lot!

Marco


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Ralph Lange via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, September 17, 2025 20:42
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Subject: Re: Help with bumpless IOC reboot, record linking and initialization concepts
 
Every CP/CPP input link sets up a local CA monitor.
When you create a CA monitor, you get an initial update when the connection is made.
That initial update on CP/CPP input links processes the record (as CP/CPP means "process on every update").
Multiple CP/CPP input links (e.g., on a calc record) process the record multiple times. (!)

Using the disable mechanism is a possible workaround. Point all the records that you want to quiet down with their SDIS links to a single disable-after-boot control record, and have that control record enable the others after the CP/CPP links have connected - time-based (= after a little while) is the simplest way.

Cheers,
~Ralph


Replies:
Re: Help with bumpless IOC reboot, record linking and initialization concepts Michael Davidsaver via Tech-talk
Re: Help with bumpless IOC reboot, record linking and initialization concepts Marco Filho via Tech-talk
References:
Re: Help with bumpless IOC reboot, record linking and initialization concepts Ralph Lange via Tech-talk
Re: Help with bumpless IOC reboot, record linking and initialization concepts Marco Filho via Tech-talk

Navigate by Date:
Prev: Re: Help with bumpless IOC reboot, record linking and initialization concepts Marco Filho via Tech-talk
Next: Problem with drvAsynIPPortConfigure Dariush Hampai 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  2020  2021  2022  2023  2024  <2025
Navigate by Thread:
Prev: Re: Help with bumpless IOC reboot, record linking and initialization concepts Marco Filho via Tech-talk
Next: Re: Help with bumpless IOC reboot, record linking and initialization concepts 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  2020  2021  2022  2023  2024  <2025