128 lines
3.6 KiB
Plaintext
128 lines
3.6 KiB
Plaintext
First run a pvAccess test server (portable channel access server equvivalent) by
|
|
running ./runTestServer in another terminal (or in background).
|
|
|
|
pvget, pvput and eget utilities are delivered by pvAccessCPP (caget and caput equvivalents).
|
|
They are located in pvAccessCPP/bin/$EPICS_HOST_ARCH directory.
|
|
|
|
1. Get the value of a V4 scalar PV
|
|
----------------------------------
|
|
> pvget testValue
|
|
testValue 0
|
|
|
|
|
|
2. Put the value of a V4 scalar PV
|
|
----------------------------------
|
|
> pvput testValue 1.23
|
|
Old : testValue 0
|
|
New : testValue 1.23
|
|
|
|
|
|
3. Get the value of a V4 array PV
|
|
----------------------------------
|
|
> pvget testArray10_1
|
|
testArray10_1 10 0 1 2 3 4 5 6 7 8 9
|
|
|
|
|
|
4. Put the value of a V4 array PV
|
|
----------------------------------
|
|
> pvput testArray10_1 3 11 22 33
|
|
Old : testArray10_1 10 0 1 2 3 4 5 6 7 8 9
|
|
New : testArray10_1 3 11 22 33
|
|
|
|
|
|
5. Get the values of all the fields of V4 record (-r is pvAccess request string)
|
|
--------------------------------------------------------------------------------
|
|
> pvget -r 'field()' testValue
|
|
testValue
|
|
epics:nt/NTScalar:1.0
|
|
double value 1.23
|
|
alarm_t alarm
|
|
int severity 0
|
|
int status 0
|
|
string message
|
|
time_t timeStamp
|
|
long secondsPastEpoch 0
|
|
int nanoseconds 0
|
|
int userTag 0
|
|
display_t display
|
|
double limitLow 0
|
|
double limitHigh 0
|
|
string description
|
|
string format
|
|
string units
|
|
control_t control
|
|
double limitLow 0
|
|
double limitHigh 0
|
|
double minStep 0
|
|
valueAlarm_t valueAlarm
|
|
boolean active false
|
|
double lowAlarmLimit 0
|
|
double lowWarningLimit 0
|
|
double highWarningLimit 0
|
|
double highAlarmLimit 0
|
|
int lowAlarmSeverity 0
|
|
int lowWarningSeverity 0
|
|
int highWarningSeverity 0
|
|
int highAlarmSeverity 0
|
|
double hysteresis 0
|
|
|
|
|
|
6. Get the values of some fields of V4 record (-r is pvAccess request string)
|
|
--------------------------------------------------------------------------------
|
|
> pvget -r 'field(value,timeStamp,alarm)' testValue
|
|
testValue
|
|
structure
|
|
double value 1.23
|
|
time_t timeStamp
|
|
long secondsPastEpoch 0
|
|
int nanoseconds 0
|
|
int userTag 0
|
|
alarm_t alarm
|
|
int severity 0
|
|
int status 0
|
|
string message
|
|
|
|
|
|
6. Monitor the value of a V4 scalar PV
|
|
--------------------------------------
|
|
> pvget -m testCounter
|
|
testCounter 406
|
|
testCounter 407
|
|
testCounter 408
|
|
testCounter 409
|
|
^C
|
|
|
|
|
|
7. Get a NTMatrix and print as a matrix
|
|
---------------------------------------
|
|
> eget -a columns=3 -a rows=5 -s testNTMatrix
|
|
0.677423 0.456543 0.11271
|
|
1.31041 1.10541 1.64136
|
|
2.41162 2.11947 2.01143
|
|
3.06775 3.67029 3.55055
|
|
4.0458 4.71389 4.38239
|
|
|
|
|
|
8. Get a NTMatrix and print its transponse matrix
|
|
-------------------------------------------------
|
|
> eget -a columns=3 -a rows=5 -T -s testNTMatrix
|
|
0.677924 1.66402 2.42248 3.8881 4.22758
|
|
0.874961 1.20251 2.56682 3.21442 4.92651
|
|
0.47145 1.65475 2.4864 3.79319 4.80394
|
|
|
|
|
|
9. Get a NTTable and print as a table
|
|
-------------------------------------
|
|
> eget -a columns=3 -s testNTTable
|
|
column0 column1 column2
|
|
0.6783 1.62252 2.48407
|
|
0.188775 1.72518 2.72885
|
|
0.740506 1.11392 2.75991
|
|
0.679227 1.58597 2.80799
|
|
0.775342 1.3701 2.83385
|
|
0.164793 1.19263 2.52135
|
|
0.680618 1.46619 2.29619
|
|
0.152323 1.28396 2.98274
|
|
0.0926253 1.44459 2.96131
|
|
0.753354 1.23773 2.66854
|