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: NTNDArray array filter does not work on value
From: Marty Kraimer via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Wed, 1 Apr 2020 09:10:53 -0400
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 Mark Rivers 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

Navigate by Date:
Prev: Re: Newport DL325 Mark Rivers via Tech-talk
Next: RE: NTNDArray array filter does not work on value 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: EPICS7 roller-coaster Michael Davidsaver via Tech-talk
Next: RE: NTNDArray array filter does not work on value 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, 01 Apr 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·