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  <20212022  2023  2024  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  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: PINI field for lsi record doesn't seem to work?
From: "Wang, Andrew via Tech-talk" <tech-talk at aps.anl.gov>
To: "Johnson, Andrew N." <anj at anl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Fri, 18 Jun 2021 18:11:41 +0000

Hi Andrew,

 

Tried it on EPICS 7 on another machine and it worked beautifully! For some odd reason, I decided to use EPICS 3 today…

 

Thank you,

Andy

 

From: Johnson, Andrew N. <anj at anl.gov>
Sent: Friday, June 18, 2021 11:03 AM
To: Wang, Andrew <wang126 at llnl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Re: PINI field for lsi record doesn't seem to work?

 

EPICS 7 will fix it. If you need that for an earlier EPICS version I can try to work out a way. You could also try this:

 

record(lsi, "lsi") {

  field(SIZV, 80)

  field(INP, ["This is a long string with more than 40 characters”,])

}

 

The difference is a trailing comma after the literal, which some earlier EPICS 7.0.x versions needed.

 

- Andrew

 



On Jun 18, 2021, at 12:58 PM, Wang, Andrew <wang126 at llnl.gov> wrote:

 

Actually, I just realized I’m using EPICS 3. Let me try it on EPICS 7.

 

From: Johnson, Andrew N. <anj at anl.gov> 
Sent: Friday, June 18, 2021 10:44 AM
To: Wang, Andrew <wang126 at llnl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Re: PINI field for lsi record doesn't seem to work?

 

Hi Andy, 

 

On Jun 18, 2021, at 12:31 PM, Wang, Andrew via Tech-talk <tech-talk at aps.anl.gov> wrote:


 

I have a simple lsi record shown below.

 

record(lsi, “joke_record”) 

{

              field(SIZV,  128)

              field(VAL,  "If you read this, tell me a funny joke")

              field(PINI, “YES”)

}

 

When I start up the IOC and do a caget on “joke_record”, I do not get the initial value. Feel like there is something very simple I forgot…

 

The VAL field of an lsi record is an array, which gets allocated at record initialization time. That happens during iocInit, which is some time after the .db file has been loaded so there’s nowhere for the IOC to actually store your string. The PINI field is irrelevant to that.

 

The simplest way to initialize an lsi record’s VAL field is to set its INP field like this:

 

record(lsi, "lsi") {

  field(SIZV, 80)

  field(INP, ["This is a long string with more than 40 characters"])

}

 

The square brackets around the string literal ensure that the IOC doesn’t assume that what you’re giving it is a PV name. Without them the IOC would make the INP field a link to a record called “This”, either locally or over CA.

 

There is no need to set PINI, the initialization of the VAL field will happen during iocInit.

 

HTH,

 

- Andrew

 

-- 

Complexity comes for free, simplicity you have to work for.

 

-- 

Complexity comes for free, simplicity you have to work for.

 


References:
PINI field for lsi record doesn't seem to work? Wang, Andrew via Tech-talk
Re: PINI field for lsi record doesn't seem to work? Johnson, Andrew N. via Tech-talk
RE: PINI field for lsi record doesn't seem to work? Wang, Andrew via Tech-talk
Re: PINI field for lsi record doesn't seem to work? Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: Re: PINI field for lsi record doesn't seem to work? Johnson, Andrew N. via Tech-talk
Next: Re: PINI field for lsi record doesn't seem to work? Johnson, Andrew N. 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  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: PINI field for lsi record doesn't seem to work? Johnson, Andrew N. via Tech-talk
Next: Using autosave to restore device settings after a reset without rebooting IOC Mark Rivers 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  <20212022  2023  2024 
ANJ, 19 Jun 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·