haquin wrote:
Hi Tim,
Thank you for your proposal but:
I looked in the genSub record code and I think that what I do should
work ...
After deeper investigations, it turns out that when I initialize the
INPH field type with FTH=STRING or CHAR it is then assigned a CA_LINK
type ((*plinkin).type)==CA_LINK instead of CONSTANT ...
That's why the Constant string is not copied at init.
When FTH=LONG then ((*plinkin).type)==CONSTANT
How can I force it to be a CONSTANT
I think the only way to make the link type CONSTANT is to make the
link value entirely numeric. As I read the code, FTH should have no
effect on the link type, because the EPICS code that makes the decision
doesn't look at anything other than the link value.
Tim Mooney a écrit :
haquin wrote:
Hi,
I initialize the INPH (with macro substitution) of a gensub record
with a string,
but it is never transferred to the corresponding H variable ...
in the IOC shell I use the commands:
epics> dbgf MyGensub.INPH
DBR_STRING: MyString NPP NMS
epics> dbgf MyGensub.H
DBR_STRING:
The behaviour is different if I use LONG instead of STRING ...
Can someone tell me how to do retreive MyString in MyGensub.H ?
You can use a stringout record to hold the string, like so:
record(stringout, "myStringInit") {
field(VAL, "$(MYSTRINGMACRO)")
field(UDF, "0")
}
record(aSub, "myASub") {
....
field(INPH, "myStringInit")
....
}
Then, dbLoadRecords("myDatabase.db", "MYSTRINGMACRO=MyString")
--
Tim Mooney ([email protected]) (630)252-5417
Beamline Controls & Data Acquisition Group
Advanced Photon Source, Argonne National Lab.
- References:
- can't initialize record field with string haquin
- Re: can't initialize record field with string Tim Mooney
- Re: can't initialize record field with string haquin
- Navigate by Date:
- Prev:
Re: can't initialize record field with string haquin
- Next:
Re: can't initialize record field with string Andrew Johnson
- 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
- Navigate by Thread:
- Prev:
Re: can't initialize record field with string haquin
- Next:
Re: can't initialize record field with string Andrew Johnson
- 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
|