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: Fri, 10 Jul 2020 15:45:34 +0200 (CEST)
I just tested it with phoebus. The .VAL$ workaround works there, as well. Maybe that could be integrated into the widgets as an option? Or even automated? (I don't know, if phoebus probes the recordtype...)

----- 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

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: Long String support in phoebus Mark Rivers via Tech-talk
Next: Re: Long String support in phoebus Ralph Lange 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 Mark Rivers via Tech-talk
Next: Re: Long String support in phoebus Ralph Lange 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, 10 Jul 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·