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: NTNDArray array filter does not work on value
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: 'Marty Kraimer' <mrkraimer at comcast.net>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 1 Apr 2020 13:44:59 +0000
> mrk> pvget -r 'value[array=0:2]' PVRdoubleArray

Can your proposed syntax work to limit all arrays to N values or do I need to specify it for each array?  If I use the proposed syntax can I get all elements of the NTNDArray while limiting all arrays to N values?

To my naïve thinking this is something that belongs as a simple option in the pvget and pvmonitor client and not something that requires a complex filter expression.  As a user I don't want to have to know the names of the NTNDArray structure elements in advance, I just want to know that the entire structure is called 13SIM1:Pva1:Image which I can determine from the OPI display for NDPluginPva.

Mark


-----Original Message-----
From: Marty Kraimer <mrkraimer at comcast.net> 
Sent: Wednesday, April 1, 2020 8:11 AM
To: tech-talk at aps.anl.gov
Cc: Mark Rivers <rivers at cars.uchicago.edu>
Subject: NTNDArray array filter does not work on value

In thread  "EPICS7 roller-coaster" Mark Rivers asked

On 3/31/20 3:11 PM, Mark Rivers via Tech-talk wrote
> Here is a little feedback, actually something to add to a wish list.
>
>
> pvget and pvmonitor really need a way to limit the output, similar to the -# <count> flag in caget and camonitor.  Since pvget could be returning multiple array fields the simplest implementation would be to use this limit for the number of values to print on each of them.
>
> I often want to do pvget or pvmonitor on an NTNDArray structure.  But I don't want to see all 2+ million values of the image, I just want to see a few values and the rest of the structure.
>
>
> Thanks,
>
> Mark
>

Since areaDetector NTNDArray is implemented via pvDatabaseCPP, I think this is an issue for pvDatabaseCPP.

pvDatabaseCPP has support for an array filter, which currently works on any scalarArray field.
It does NOT work on a union field that is set to be a scalarArray.
I am going to see how to make it work for a union field that is set to be a scalarArray.

Let me give some examples on using the array filter:
The following assumes that exampleCPP/database is used to start an IOC.

mrk> pvinfo PVRdoubleArray
PVRdoubleArray
Server: 10.0.0.11:5075
Type:
     epics:nt/NTScalarArray:1.0
         double[] value
         alarm_t alarm
             int severity
             int status
             string message
         time_t timeStamp
             long secondsPastEpoch
             int nanoseconds
             int userTag

mrk> pvget -r value PVRdoubleArray
PVRdoubleArray []
mrk> pvput PVRdoubleArray [1,2,3,4,5,6,7,8,9,10]
Old : <undefined>              []
New : 2020-04-01 08:59:47.905  [1,2,3,4,5,6,7,8,9,10]
mrk> pvget -r value PVRdoubleArray
PVRdoubleArray [1,2,3,4,5,6,7,8,9,10]
mrk> pvget -r 'value[array=0:2]' PVRdoubleArray
PVRdoubleArray [1,2,3]
mrk> pvput -r 'value[array=0:2]' PVRdoubleArray [100,200,300]
Old : [1,2,3]
New : [100,200,300]
mrk> pvget -r 'value[array=0:2]' PVRdoubleArray
PVRdoubleArray [100,200,300]

But if you try to use an array filter on a union field it does not work
mrk> pvinfo PVRvariantUnion
PVRvariantUnion
Server: 10.0.0.11:5075
Type:
     epics:nt/NTUnion:1.0
         any value
         time_t timeStamp
             long secondsPastEpoch
             int nanoseconds
             int userTag

mrk> pvput -r 'value[array=0:2]' PVRvariantUnion [100,200,300]
Old : structure
     any value
         (none)
value : Error not a scalar array field
Error: Not a scalar array field
New : structure
     any value
         (none)



Replies:
Re: NTNDArray array filter does not work on value Marty Kraimer via Tech-talk
References:
EPICS7 roller-coaster Rolf Keitel via Tech-talk
Re: EPICS7 roller-coaster Michael Davidsaver via Tech-talk
Re: EPICS7 roller-coaster Mark Rivers via Tech-talk
NTNDArray array filter does not work on value Marty Kraimer via Tech-talk

Navigate by Date:
Prev: NTNDArray array filter does not work on value Marty Kraimer via Tech-talk
Next: Re: getting streamDevice exception handler replyTimeout to write to a record [SEC=UNCLASSIFIED] 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: NTNDArray array filter does not work on value Marty Kraimer via Tech-talk
Next: Re: NTNDArray array filter does not work on value Marty Kraimer 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, 01 Apr 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·