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

Subject: RE: pyepics autosave
From: "Engbretson, Mark S. via Tech-talk" <[email protected]>
To: "Johnson, Andrew N." <[email protected]>, "Rivers, Mark L." <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Fri, 6 Sep 2019 14:49:37 +0000
FYI - And unless you are using a version of caqtdm later than 4.2.3, it also flags pv's containing {} as errors .


-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Johnson, Andrew N. via Tech-talk
Sent: Friday, September 6, 2019 8:14 AM
To: Rivers, Mark L. <[email protected]>
Cc: [email protected]
Subject: Re: pyepics autosave

The AppDevGuide also says in section 6.4.11.2:

> The record name. This must be composed out of only the following characters:
> a-z A-Z 0-9 _ - + : [ ] < > ;

Neither description includes the ‘{}’ characters that NSLS-2 introduced into their record naming convention without realizing that they weren’t permitted according to the documentation. However IIRC the IOC code will actually accept any character string that doesn’t contain ‘.’ or space characters for a record name (I vaguely remember adding some checks to the parser, but that may have just been for dots and spaces).

Also I should note that the above only concerns the characters in the record name itself, the CA (and I think PVA) protocols actually have no limitations except for '\0’ which marks the end of string. After the first ‘.’ the IOC allows more characters, pretty much any printable character except space and the control chars should be permitted to get through (field modifiers after the ‘.’ can be JSON objects).

- Andrew


> On Sep 6, 2019, at 2:58 PM, Mark Rivers via Tech-talk <[email protected]> wrote:
> 
> Hi Matt,
> 
> 
>> Is there a published regex expression for valid PV names?
> 
> 
> The Applications Developer's Guide (https://epics.anl.gov/base/R3-15/6-docs/AppDevGuide.pdf) says this:
> 
> 
> **********************
> 
> 6.3.2 Unquoted Strings
> 
> In the summary section, some values are shown as quoted strings and some unquoted. The actual rule is that any string consisting of only the following characters does not need to be quoted unless it contains one of the above keywords:
> 
> a-z A-Z 0-9 _ + - : . [ ] < > ;
> 
> These are all legal characters for process variable names, although . is not allowed in a record name since it separates the record from the field name in a PV name. Thus in many cases quotes are not needed around record or field names in database files. Any string containing a macro does need to be quoted though.
> 
> **********************
> 
> 
> So it lists characters that are allowed in PV names, although it is in the section on unquoted strings.
> 
> 
> I am quite sure that NSLS-II is using { and } in PV names which are not on the above list. It works but there was at least one case where it caused problems.
> 
> 
> Mark
> 
> 
> 
> ________________________________
> From: [email protected] <[email protected]> on 
> behalf of Matt Newville via Tech-talk <[email protected]>
> Sent: Friday, September 6, 2019 7:45 AM
> To: Sandeep Kumar Malu - UKRI STFC
> Cc: [email protected]
> Subject: Re: pyepics autosave
> 
> Hi Sandeep,
> 
> On Fri, Sep 6, 2019 at 4:46 AM Sandeep Kumar Malu - UKRI STFC via Tech-talk <[email protected]<mailto:[email protected]>> wrote:
> Hi,
> 
> I am trying to save some of the PVs following the link 
> https://cars9.uchicago.edu/software/python/pyepics3/autosave.html
> 
> However when I try to save PVs which has hyphen ("-") e.g .  Z-CAM:WARNING thows an exception "Expected end of line, found '-' ". But all other PVs autosave works fine. Any way to fix it?
> 
> 
> Oh, yes, I see that this module is making bad assumptions about what a 
> PV name can be.  This is at
> https://github.com/pyepics/pyepics/blob/master/epics/autosave/save_res
> tore.py#L184
> 
> which currently reads:
>    pv_name = Word(alphanums+":._$()")
> 
> That would definitely need a '-' added.    For now, you could just add that to the `epics/autosave/save_restore.py` file on your system to see if that fixes the problem.
> 
> I believe this should also allow '{' and '}', but I'm not sure if there are other characters that should be allowed.
> 
> Is there a published regex expression for valid PV names?
> 
> --Matt
> 
> 



References:
pyepics autosave Sandeep Kumar Malu - UKRI STFC via Tech-talk
Re: pyepics autosave Matt Newville via Tech-talk
Re: pyepics autosave Mark Rivers via Tech-talk
Re: pyepics autosave Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: Re: pyepics autosave Matt Newville via Tech-talk
Next: Re: pyepics autosave J. Lewis Muir 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  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: pyepics autosave Matt Newville via Tech-talk
Next: Re: pyepics autosave J. Lewis Muir 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  <20192020  2021  2022  2023  2024 
ANJ, 06 Sep 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·