EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20232024  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  <20232024 
<== Date ==> <== Thread ==>

Subject: record with constant input link
From: Gerrit Kühn via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Fri, 3 Nov 2023 11:12:22 +0100
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

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Replies:
Re: record with constant input link Simon Rose via Tech-talk

Navigate by Date:
Prev: Re: Get the type of a PV in C++ API Eusebio Naif Al-Soliman Fuentes via Tech-talk
Next: Re: process multiple lines with streamdevice 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  <20232024 
Navigate by Thread:
Prev: Re: AlliedVision Manta G-235B Miroslaw Dach via Tech-talk
Next: Re: record with constant input link Simon Rose 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  <20232024 
ANJ, 06 Nov 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·