Hi Gerrit -
The INP link is meant to be the record that the stringin record fetches data from, which it would then write into the VAL field. You can see this by creating a second (e.g. stringout) record with the name "test", and then processing your stringin record at which point it will fetch the value from the stringout record.
What you should do for this purpose is exactly as you noted: use the VAL field and not the INP field.
That said, if this is meant to be a constant string used by other resources, it would likely be better-suited as a stringout record; stringin records are for reading input from another source.
Cheers,
Simon Rose
Software Engineer
ESS
On 2023-11-03, 11:12, "Tech-talk on behalf of Gerrit Kühn via Tech-talk" <tech-talk-bounces at aps.anl.gov <mailto:tech-talk-bounces at aps.anl.gov> on behalf of tech-talk at aps.anl.gov <mailto:tech-talk at aps.anl.gov>> wrote:
Hello,
I have a (probably very simple, but I fail to see the answer) question on
records with constant input:
What I'd like to have is a stringin record that is initialised with a
constant value that can later be changed with caput. From the
documentation on the stringin record I get
"The INP field determines where the string input record gets its string.
It can be a database or channel access link, or a constant. If constant,
the VAL field is initialized with the constant and can be changed via
dbPuts."
which sounds exactly like what I need.
However, when trying a record like
record (stringin, "$(P):$(T)-$(B)_$(R)_$(D)_$(UN)_UID")
{ field (DESC, "Device Identifier for $(U)")
field (DTYP, "Soft Channel")
field (INP, "test")
}
this does not work for me. I don't see any error messages, but I get an
empty record:
---
epics@epics-appl:~$ caget A0:PEM-3405_106_TF1_DO1_UID
A0:PEM-3405_106_TF1_DO1_UID
---
What is even more strange (I think) is that I get an error message when
trying to write a value to this record:
---
epics@epics-appl:~$ caput A0:PEM-3405_106_TF1_DO1_UID
test
Old : A0:PEM-3405_106_TF1_DO1_UID
CA.Client.Exception...............................................
Warning: "Channel write request failed"
Context: "New : A0:PEM-3405_106_TF1_DO1_UID test
op=1, channel=A0:PEM-3405_106_TF1_DO1_UID, type=DBR_STRING, count=1,
ctx="A0:PEM-3405_106_TF1_DO1_UID"" Source File: ../oldChannelNotify.cpp
line 159 Current Time: Fri Nov 03 2023 11:04:49.636763495
..................................................................
---
The write appears to succeed anyway, though, the value is updated.
It looks like I can get the desired behaviour when using the VAL field
instead of INP in the record definition. While this is fine by me, it
feels like I misunderstand how the constant INP field is supposed to work
as described in the manual above. Could anyone shed a light on this mor me?
cu
Gerrit
- Replies:
- Re: record with constant input link Gerrit Kühn via Tech-talk
- References:
- record with constant input link Gerrit Kühn via Tech-talk
- Navigate by Date:
- Prev:
Re: process multiple lines with streamdevice Gerrit Kühn via Tech-talk
- Next:
Sequencer interpretation of PV names with {,} characters Ivashkevych, Oksana 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
- Navigate by Thread:
- Prev:
record with constant input link Gerrit Kühn via Tech-talk
- Next:
Re: record with constant input link Gerrit Kühn 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
|