|
Subject: |
autosave: pass-0 and pass-1 with a custom device support |
|
From: |
Andrea Celentano via Tech-talk <[email protected]> |
|
To: |
[email protected] |
|
Date: |
Wed, 28 May 2025 13:49:02 +0200 |
Dear colleagues,
I have an analog output record, with a custom device support.
The record reads:
record(ao,
"$(HOST):C0:IOB:set")
{
field(DRVH, "31")
field(DRVL, "0")
field(DTYP, "WAVEBOARD_ZYNQ")
field(FLNK, "$(HOST):C0:FanOut")
field(OUT, "@writeIOB_0")
info(autosaveFields, "VAL")
}
The init_record function is reported below. I am not modifying
here in any way the prec->val.
static long
init_record_ao(void *arg) {
aoRecord *prec = (aoRecord*) (arg);
printf("init record_ao %s start (eventual value: %f)\n",
prec->name,prec->val);
std::string str;
if (!AxiMM.GetInitialized()) {
printf("AXI controller not initialized! Exiting...\n");
return -1;
}
str = std::string(prec->out.value.constantStr);
struct privRecordData *priv = new privRecordData;
/*A.C. here we need to decode the string "str", that should
be: COMMAND_CHANNEL - or just COMMAND*/
priv->raw=str;
getCommandChannel(str, priv->command, priv->channel);
prec->dpvt = priv;
return 0;
}
I am experimenting with the autosave module. The value to be
retrieved is 13.
If I set VAL to be retreived at pass-1 (AFTER record
initialization), I see in the output:
init
record_ao waveboard201:C0:IOB:set start (eventual value:
0.000000)
while if I set it at pass-0, I see:
init
record_ao waveboard201:C0:IOB:set start (eventual value:
13.000000)
This is expected, and I understand this: pass-0 means before
record initialization, hence the value is available to
init_record_ao.
However, if I set VAL to be retrieved at pass-0, the value of
this PV, at the end of record initialization, as obtained from
caget is 0. I do not understand this - is it there a default
initialization step occurring after my init_record_ao function is
called, but before the instant at which pass-1 variables are
retrieved?
Thanks,
Bests,
Andrea
- Navigate by Date:
- Prev:
Communicating with Bechoff I/O through EPICS Sibylle Ducroizé via Tech-talk
- Next:
Re: Communicating with Bechoff I/O through EPICS Jörn Dreyer 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>
2026
- Navigate by Thread:
- Prev:
Re: Communicating with Bechoff I/O through EPICS Jure Varlec via Tech-talk
- Next:
Epics Driver for Hamamatsu X-ray Source 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>
2026
|