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

Subject: Re: Long String support in phoebus
From: "Nonn, Patrick via Tech-talk" <tech-talk at aps.anl.gov>
To: Mark Rivers <rivers at cars.uchicago.edu>
Cc: tech-talk <tech-talk at aps.anl.gov>
Date: Mon, 13 Jul 2020 11:08:37 +0200 (CEST)
Hi everyone,

I would like to clarify, that you have to address the VAL field of a PV specifically and add a $ to that. "caput -S <pv_name>$" will not work. (Because caput addresses <pv_name>$.VAL, that way.) The same is true for CSS, incl. phoebus. I'm mentioning that, because I actually found some old tech-talk entry before I started this thread, where it was also mentioned that you have to add a $ to the pv name, which did not work for that reason.

Let me summarize, what to do, if your lso/lsi won't hold more than 40 characters:

- check the field SIZV, it defaults to 41 (=40 characters)
- check the environment variables EPICS_CA_MAX_ARRAY_BYTES and EPICS_CA_AUTO_ARRAY_BYTES
  For more information, check: https://epics.anl.gov/base/R3-16/1-docs/RELEASE_NOTES.html
- for caput/caget: make sure you use the -S option
- for caput/caget and CSS: Address the pv as <pv_name>.VAL$
- for CSS, incl. Phoebus: check the "max_array_bytes"-setting
- for CSS Phoebus: make sure to set the format property to "String"

Have I forgotten something?

Best Regards,
Patrick

----- Original Message -----
From: "Mark Rivers" <rivers at cars.uchicago.edu>
To: "Patrick Nonn" <patrick.nonn at desy.de>
Cc: "tech-talk" <tech-talk at aps.anl.gov>
Sent: Friday, 10 July, 2020 15:34:24
Subject: Re: Long String support in phoebus

Hi Patrick,


I just tested the waveform and lso records for long string behavior, and the result surprised me.


I loaded this database which has an lso and waveform record each capable of holding 2048 characters.


###################
record(lso, "test_lso") {
  field(SIZV, "2048")
}

record(waveform, "test_wf") {
  field(FTVL, "CHAR")
  field(NELM, "2048")
}
###################

This is a caput of 60 characters to the waveform record using the -S flag.  It works fine.

corvette:~>caput -S test_wf 01234567890234567890123456789012345678901234567890123456789
Old : test_wf
New : test_wf 01234567890234567890123456789012345678901234567890123456789

This is a caput of 60 characters to the lso record with no flags to caput.  Note that it only wrote 40 characters.

corvette:~>caput test_lso 01234567890234567890123456789012345678901234567890123456789
Old : test_lso
New : test_lso                       012345678902345678901234567890123456789

This is a caput of 60 characters to the lso record with the -S flag to caput.  It generates an error.

corvette:~>caput -S test_lso 01234567890234567890123456789012345678901234567890123456789
Old : test_lso
Error from put operation: Invalid element count requested

This is a caput of 60 characters to the lso record .VAL$ field with the -S flag to caput.  It works.

corvette:~>caput -S test_lso.VAL$ 01234567890234567890123456789012345678901234567890123456789
Old : test_lso.VAL$
New : test_lso.VAL$ 01234567890234567890123456789012345678901234567890123456789

This result surprised me.  I thought an lso record and a waveform record would work the same way.  But in order to write to an lso record which has SIZV > 41 you must use the .VAL$ syntax.

cainfo shows that the reason is that an lso record native data type is DBF_STRING while the waveform record is DBF_CHAR.

corvette:~>cainfo test_wf
test_wf
    State:            connected
    Host:             164.54.160.82:40035
    Access:           read, write
    Native data type: DBF_CHAR
    Request type:     DBR_CHAR
    Element count:    2048
corvette:~>cainfo test_lso
test_lso
    State:            connected
    Host:             164.54.160.82:40035
    Access:           read, write
    Native data type: DBF_STRING
    Request type:     DBR_STRING
    Element count:    1


It would probably be good to mention that the .VAL$ syntax is required in the lso record documentation here:
https://epics.anl.gov/base/R7-0/4-docs/lsoRecord.html

Mark












________________________________
From: Nonn, Patrick <patrick.nonn at desy.de>
Sent: Friday, July 10, 2020 7:08 AM
To: Mark Rivers
Cc: tech-talk
Subject: Re: Long String support in phoebus

Using caput does the same, using caput -S fails with "Error from put operation: Invalid element count requested".

----- Original Message -----
From: "Mark Rivers" <rivers at cars.uchicago.edu>
To: "Patrick Nonn" <patrick.nonn at desy.de>
Cc: "tech-talk" <tech-talk at aps.anl.gov>
Sent: Friday, 10 July, 2020 14:05:41
Subject: Re: Long String support in phoebus

What happens if you use caput?


________________________________
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Nonn, Patrick via Tech-talk <tech-talk at aps.anl.gov>
Sent: Friday, July 10, 2020 6:57 AM
To: tech-talk
Subject: Long String support in phoebus

Hi everyone,

I try to write an lso record with a text entry widget. The string is cut at 40 characters. Is there something to be taken into account, apart from:

preference "org.phoebus.pv.ca/max_array_bytes" set to a high enough number
field SIZV set to a high enough number

Greetings
Patrick

Replies:
Re: Long String support in phoebus Mark Rivers via Tech-talk
Re: Long String support in phoebus Johnson, Andrew N. via Tech-talk
References:
Long String support in phoebus Nonn, Patrick via Tech-talk
Re: Long String support in phoebus Mark Rivers via Tech-talk
Re: Long String support in phoebus Nonn, Patrick via Tech-talk
Re: Long String support in phoebus Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: : Integrating picoscopes into the EPICS control system [SEC=UNOFFICIAL] Sebastian Meuren via Tech-talk
Next: Re: Long String support in phoebus 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Long String support in phoebus Johnson, Andrew N. via Tech-talk
Next: Re: Long String support in phoebus 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  <20202021  2022  2023  2024 
ANJ, 13 Jul 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·