EPICS Home

Experimental Physics and Industrial Control System


 
2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025  Index 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: pC_->doCallbacksEnum() coming too early
From: Torsten Bögershausen via Core-talk <core-talk at aps.anl.gov>
To: Ralph Lange <ralph.lange at gmx.de>, EPICS Core Talk <core-talk at aps.anl.gov>
Date: Thu, 29 Feb 2024 16:06:40 +0100
On 2024-02-29 15: 50, Ralph Lange via Core-talk wrote: > On Thu, 29 Feb 2024 at 15: 10, Mark Rivers <rivers@ cars. uchicago. edu> > wrote: If you only have 20 motors with 1-2 enums then I don't understand > why you don't just
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd

On 2024-02-29 15:50, Ralph Lange via Core-talk wrote:
> On Thu, 29 Feb 2024 at 15: 10, Mark Rivers <rivers@ cars. uchicago. edu> 
> wrote: If you only have 20 motors with 1-2 enums then I don't understand 
> why you don't just use the current "correct" solution which does not 
> require
> ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender
> This message came from outside your organization.
> ZjQcmQRYFpfptBannerEnd
> On Thu, 29 Feb 2024 at 15:10, Mark Rivers <rivers at cars.uchicago.edu 
> <mailto:rivers at cars.uchicago.edu>> wrote:
> 
> 
>     If you only have 20 motors with 1-2 enums then I don't understand
>     why you don't just use the current "correct" solution which does not
>     require a hack to do callbacks.  Just implement the readEnum method. 
> 
> 
> What if the device is not connected at iocInit and becomes available later?
> 
> I know this is a general EPICS Base issue.
> The whole approach of "initialization happens when the IOC boots" lost 
> its appeal since the 1980s/VME. Initialization at any moment, 
> before/during/after the IOC is up, should be the regular case. Btw. PINI 
> is another part of that problem, which is why drivers like Stream and 
> OPC UA have their own handling of (re)initialization.
> 
> IMHO, doing requests after connect and callbacks after the IOC is up is 
> the "correct" solution, while implementing readEnum feels more like a 
> hack. Which is a lot simpler and works in many cases, no doubt about that.
> 
> Cheers,
> ~Ralph

Thanks Mark and Ralph for digging.
It seems as if there are 2 schools here:
1)
- Connect to the PLC/Camera/motionController
- Read all data/enums
- Initialize all records with the enums from the external hardware
2)
- a) Run iocInit
- b) Connect to the PLC/Camera/motionController
- c) Read all data/enums
- d) put them into the records via a callback

In our case a) and b) and c) run all in parallel, kind of.
It may happen that there is a race condition.
Or it may even happen, that the motionController is not even online,
when the IOC is started, since there are 2 different technical groups
involved, with their own time plans, schedules in the daily work.

However, I keep the readEnum() in mind...







References:
pC_->doCallbacksEnum() coming too early Torsten Bögershausen via Core-talk
Re: pC_->doCallbacksEnum() coming too early Johnson, Andrew N. via Core-talk
RE: pC_->doCallbacksEnum() coming too early Mark Rivers via Core-talk
Re: pC_->doCallbacksEnum() coming too early Ralph Lange via Core-talk
Re: pC_->doCallbacksEnum() coming too early Torsten Bögershausen via Core-talk
Re: pC_->doCallbacksEnum() coming too early Mark Rivers via Core-talk
Re: pC_->doCallbacksEnum() coming too early Ralph Lange via Core-talk

Navigate by Date:
Prev: Re: pC_->doCallbacksEnum() coming too early Ralph Lange via Core-talk
Next: Re: pC_->doCallbacksEnum() coming too early Johnson, Andrew N. via Core-talk
Index: 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: pC_->doCallbacksEnum() coming too early Ralph Lange via Core-talk
Next: Re: pC_->doCallbacksEnum() coming too early Johnson, Andrew N. via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025