-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDEMO
More file actions
105 lines (86 loc) · 2.86 KB
/
DEMO
File metadata and controls
105 lines (86 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
First run a pvAccess server providing access to EPICS V3 channels via pvAccess protocol by
running ./runV3Channel 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 V3 scalar PV
----------------------------------
> pvget double01
double01 0
2. Put the value of a V3 scalar PV
----------------------------------
> pvput double01 1.23
Old : double01 0
New : double01 1.23
3. Get the value of a V3 array PV
----------------------------------
> pvget doubleArray01
doubleArray01 0
(returns an array with zero elements)
4. Put the value of a V3 array PV
----------------------------------
> pvput doubleArray01 3 11 22 33
Old : doubleArray01 0
New : doubleArray01 3 11 22 33
5. Get the values of all the fields of V3 record (-r is pvAccess request string)
--------------------------------------------------------------------------------
> pvget -r 'field()' double01
double01
epics:nt/NTScalar:1.0
double value 1.23
alarm_t alarm
int severity 2
int status 0
string message LOLO
time_t timeStamp
long secondsPastEpoch 1353588502
int nanoSeconds 133410000
int userTag 0
display_t display
double limitLow 0
double limitHigh 10
string description
string format %f
string units Counts
control_t control
double limitLow -0.1
double limitHigh 9.9
double minStep 0
valueAlarm_t valueAlarm
boolean active false
double lowAlarmLimit 2
double lowWarningLimit 4
double highWarningLimit 6
double highAlarmLimit 8
int lowAlarmSeverity 0
int lowWarningSeverity 0
int highWarningSeverity 0
int highAlarmSeverity 0
double hysteresis 0
6. Get the values of some fields of V3 record (-r is pvAccess request string)
--------------------------------------------------------------------------------
> pvget -r 'field(value,timeStamp,alarm)' double01
double01
epics:nt/NTScalar:1.0
double value 1.23
alarm_t alarm
int severity 2
int status 0
string message LOLO
time_t timeStamp
long secondsPastEpoch 1353588502
int nanoSeconds 133410000
int userTag 0
6. Monitor the value of a V3 scalar PV
--------------------------------------
> pvget -m counter01
counter01 4
counter01 5
counter01 6
^C
7. Scalar unsigned support (accessing V3 scalar PV as unsigned)
--------------------------------------------------------------
> pvput ubyte01 255
Old : ubyte01 0
New : ubyte01 255
> pvget ubyte01
ubyte01 255