Experimental Physics and Industrial Control System
|
Hi Irie,
-
On initialisation my asyn parameters are being processed, and then I have a thread that handles the changes and passes them on to the camera. For some of my parameters, processing a change involves getting the
value of another parameter but for a couple of them this other parameter is not yet initialized so it is giving me an asynParamUndefined status.
-
So I had a look into ADCore and I can't figure out what causes the parameters to process on startup, and why the order of initialization is the way it is.
-
So my question is: how is the order of parameter initialisation decided and can it be modified?
I think by “parameters to process on startup” you probably mean that your writeInt32(), writeFloat64() and writeOctet()
methods are being called with those parameters, correct? Those functions are called at iocInit because the output records have PINI=YES and so they process once at iocInit.
That is order is set in EPICS base which I believe does the initialization for each record type in order. The order in which your functions are called can be changed using the
PHAS field of the record.
There are several ways to handle this in your code.
-
You can do nothing if any of the records have not yet processed (getting other parameter value returns asynParamUndefined). By the end of iocInit all records will have processed, so the last one to process
will result in your code writing to the hardware.
-
You can initialize all of the parameters in your constructor (setIntegerParam(), setDoubleParam(), etc.) with “reasonable” values. Then you won’t get asynParamUndefined. As iocInit proceeds the values read
will contain the actual values from the database or from autosave.
Let me know if this does not answer your question.
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Irie Railton - STFC UKRI via Tech-talk
Sent: Monday, June 23, 2025 10:16 AM
To: tech-talk at aps.anl.gov
Subject: areaDetector/asynPortDriver order of parameter initialization
I'm working on an areaDetector driver for PIXCI frame grabbers and associated cameras (ADPixci), and I'm having an issue with accessing uninitialized parameters.
On initialisation my asyn parameters are being processed, and then I have a thread that handles the changes and passes them on to the camera. For some of my parameters, processing a change involves getting the
value of another parameter but for a couple of them this other parameter is not yet initialized so it is giving me an asynParamUndefined status.
So I had a look into ADCore and I can't figure out what causes the parameters to process on startup, and why the order of initialization is the way it is.
So my question is: how is the order of parameter initialisation decided and can it be modified?
Software Engineer
Software Controls Group
CLF Engineering Division
|
- References:
- areaDetector/asynPortDriver order of parameter initialization Irie Railton - STFC UKRI via Tech-talk
- Navigate by Date:
- Prev:
Re: Some questions about CaLab (Dariush Hampai) Dariush Hampai via Tech-talk
- Next:
Re: Some questions about CaLab (Dariush Hampai) Kathryn Baker - STFC UKRI 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:
areaDetector/asynPortDriver order of parameter initialization Irie Railton - STFC UKRI via Tech-talk
- Next:
Issues in MCA module with XFlash detector Abdalla Ahmad 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>
|
ANJ, 24 Jun 2025 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
·
Download
·
Search
·
IRMIS
·
Talk
·
Documents
·
Links
·
Licensing
·
|