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  <20242025  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  <20242025 
<== Date ==> <== Thread ==>

Subject: Re: Process Record at ioc initialization with OPCUA module
From: Ralph Lange via Tech-talk <tech-talk at aps.anl.gov>
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Date: Thu, 12 Dec 2024 09:26:43 +0100
Hi Vivien,

On Thu, 12 Dec 2024 at 08:51, LORIOT Vivien <VIVIEN.LORIOT at cea.fr> wrote:

 

Ok thanks for your help, I think well understand the difference now between the PINI field, which does not seem to be implemented with the OPCUA driver and the bini option.


The PINI field made a lot of sense back in the distant past, when the IOC was always running in the controller slot of a VME crate. Powering on the crate meant powering on the I/O and the IOC - this was always happening at the same time. PINI could be used to initialize the I/O, bring it to a safe state etc.
With intelligent remote controllers, IOC and device can power up and down independently, network can go away and come back. The device may not be connected when the IOC is initializing and instead be available at any time later. The device may go down while the IOC is running and come back later. The IOC may reboot while the device continues to work perfectly fine. The network might make the device unavailable at any moment for any time.

As a result, in many if not most cases, PINI will not run when it should and will not do what you want it to do. So I shut it off and introduced `bini` as a way of specifying behavior at device connect.
If you look at, e.g., StreamDevice, which is also handling remote intelligent controllers, its `@init` exception handler is implementing a similar concept. https://paulscherrerinstitute.github.io/StreamDevice/processing.html#init
Almost always, reading the current value from the device is what you want to happen whenever the device appears (or re-appears), and that's why `bini=read` is the default for the OPC UA support.

Cheers,
~Ralph


References:
TR: Process Record at ioc initialization with OPCUA module LORIOT Vivien via Tech-talk
Re: Process Record at ioc initialization with OPCUA module Ralph Lange via Tech-talk
RE: Process Record at ioc initialization with OPCUA module LORIOT Vivien via Tech-talk

Navigate by Date:
Prev: RE: Process Record at ioc initialization with OPCUA module LORIOT Vivien via Tech-talk
Next: ADSpinnaker::grabImage error GetImageStatus Mrinal Bera 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  <20242025 
Navigate by Thread:
Prev: RE: Process Record at ioc initialization with OPCUA module LORIOT Vivien via Tech-talk
Next: runtime error Pierrick M Hanlet 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  <20242025