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

Subject: Understand pvget and pvxget
From: "Zhang, Tong via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 7 Jan 2025 19:54:22 +0000
Happy new year, community!

Probably a dummy question here: how to correctly use the "-r <pv
request>" option of `pvxget` or `pvget`?

First of all, the tool versions I'm tested:
$ pvxget -V:
PVXS 1.3.2 (1.3.1-41-g87abad5387c22045cb5e-dirty)
EPICS 7.0.8.1
libevent 2.2.1-alpha-dev

$ pvget -V:
pvAccess 7.1.7
pvData 8.0.6
Base 7.0.8.1

And the record testing against:
record(calc, "pva:test:counter") {
    field(INPA, "pva:test:counter")
    field(CALC, "A+1")
    field(SCAN, "1 second")
}

The default behavior of the two commands are slightly different:
$ pvget pva:test:counter  # just outputs the value, which is I expected
pva:test:counter 2025-01-07 14:39:44.950  2663
$ pvxget pva:test:counter  # outputs the full string, is not I
expected, but    some options may help
pva:test:counter
    struct "epics:nt/NTScalar:1.0"
    value double = 2708
    alarm.severity int32_t = 0
    alarm.status int32_t = 0
    alarm.message string = "NO_ALARM"
    timeStamp.secondsPastEpoch int64_t = 1736278829
    timeStamp.nanoseconds int32_t = 950403289
    timeStamp.userTag int32_t = 0
    display.limitLow double = 0
    display.limitHigh double = 0
    display.description string = ""
    display.units string = ""
    display.precision int32_t = 0
    display.form.index int32_t = 0
    display.form.choices string[] = {7}["Default", "String", "Binary",
"Decimal", "Hex", "Exponential", "Engineering"]
    control.limitLow double = 0
    control.limitHigh double = 0
    control.minStep double = 0
    valueAlarm.active bool = false
    valueAlarm.lowAlarmLimit double = nan
    valueAlarm.lowWarningLimit double = nan
    valueAlarm.highWarningLimit double = nan
    valueAlarm.highAlarmLimit double = nan
    valueAlarm.lowAlarmSeverity int32_t = 0
    valueAlarm.lowWarningSeverity int32_t = 0
    valueAlarm.highWarningSeverity int32_t = 0
    valueAlarm.highAlarmSeverity int32_t = 0
    valueAlarm.hysteresis int8_t = 0

Where I tried applying `-r value` option to the latter, and hoping it
would print only the value field, but it still acts the same. So that
brought up the question at the very beginning.

As per the documentation at
https://urldefense.us/v3/__https://epics-base.github.io/pvxs/overview.html*sub-field-lookup__;Iw!!G_uCfscf7eWS!ZTNZy0ZfewN7Pbf068ihPM9Im5m94ieAKdmc_jbwxEAIt7IA2x4hfw5YGU5OrolGrnUIMQTseB29vj8Q0W6-yqti$ , I
assume the "value" is the one of the *fields* that should be defined in
`-r` option, but I cannot find the precision definition.

Intuitively, I tried `pvget -r "timeStamp" pva:test:counter` hoping to
get only the timestamp info, but it outputs the same as without the `-
r` option. 

So either is my understanding to this *-r option* is wrong, or I passed
the wrong field, that is my understanding to *field* is wrong, or some
issues are with the tools.

Very much appreciate to any hints.

Cheers,
Tong

-- 
Tong Zhang <zhangt at frib.msu.edu>
Facility for Rare Isotope Beams, Michigan State University

Replies:
Re: Understand pvget and pvxget Michael Davidsaver via Tech-talk

Navigate by Date:
Prev: Re: Cross-compiling epics for petalinux Donny Domagoj Cosic via Tech-talk
Next: Re: Understand pvget and pvxget Michael Davidsaver 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  2020  2021  2022  2023  2024  <2025
Navigate by Thread:
Prev: Display Builder symbol monitor Vishnu Patel via Tech-talk
Next: Re: Understand pvget and pvxget Michael Davidsaver 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  2020  2021  2022  2023  2024  <2025
ANJ, 07 Jan 2025 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·