0
|
1 |
##########################################################################
|
|
2 |
# Copyright (c) 2011 Lawrence Berkeley National Laboratory, Accelerator
|
|
3 |
# Technology Group, Engineering Division
|
|
4 |
# This code is distributed subject to a Software License Agreement found
|
|
5 |
# in file LICENSE that is included with this distribution.
|
|
6 |
##########################################################################
|
|
7 |
|
1
|
8 |
#@writetimeout { disconnect; }
|
|
9 |
#replytimeout { disconnect; }
|
|
10 |
#readtimeout { disconnect; }
|
|
11 |
#mismatch { disconnect; }
|
0
|
12 |
|
1
|
13 |
ReplyTimeout = 600;
|
|
14 |
ReadTimeout = 100;
|
0
|
15 |
InTerminator = "\n";
|
|
16 |
OutTerminator = "\n";
|
|
17 |
|
|
18 |
getIDN {
|
|
19 |
out "*IDN?";
|
|
20 |
in "%\$1[^\r\n]";
|
|
21 |
ExtraInput = Ignore;
|
|
22 |
}
|
|
23 |
cmd {
|
|
24 |
out "\$1";
|
|
25 |
}
|
|
26 |
|
1
|
27 |
setArmCount {
|
|
28 |
out "\$1 %d";
|
|
29 |
# @init { out "\$1?"; in "%d"; }
|
|
30 |
}
|
|
31 |
|
|
32 |
getArmCount {
|
|
33 |
out "\$1?";
|
|
34 |
in "%d";
|
|
35 |
ExtraInput = Ignore;
|
|
36 |
}
|
|
37 |
|
0
|
38 |
setD {
|
|
39 |
out "\$1 %d";
|
|
40 |
@init { out "\$1?"; in "%d"; }
|
|
41 |
}
|
1
|
42 |
|
0
|
43 |
getD {
|
|
44 |
out "\$1?";
|
|
45 |
in "%d";
|
|
46 |
ExtraInput = Ignore;
|
|
47 |
}
|
|
48 |
|
|
49 |
setF {
|
|
50 |
out "\$1 %f";
|
|
51 |
@init { out "\$1?"; in "%f"; }
|
|
52 |
}
|
|
53 |
getF {
|
|
54 |
out "\$1?";
|
|
55 |
in "%f";
|
|
56 |
ExtraInput = Ignore;
|
|
57 |
}
|
|
58 |
|
|
59 |
setRange {
|
|
60 |
out "RANG 2E-%d";
|
|
61 |
@init { out "RANG?"; in "%*[^E]E-%d"; }
|
|
62 |
}
|
|
63 |
getRange {
|
|
64 |
out "RANG?";
|
|
65 |
in "%*[^E]E-%d";
|
|
66 |
ExtraInput = Ignore;
|
|
67 |
}
|
|
68 |
|
|
69 |
setArmSource {
|
|
70 |
out "ARM:SOUR %{IMM|BUS|TIM|MAN|TLIN|NST|PST|BST}";
|
|
71 |
@init { out "ARM:SOUR?"; in "%{IMM|BUS|TIM|MAN|TLIN|NST|PST|BST}"; }
|
|
72 |
}
|
|
73 |
getArmSource {
|
|
74 |
out "ARM:SOUR?";
|
|
75 |
in "%{IMM|BUS|TIM|MAN|TLIN|NST|PST|BST}";
|
|
76 |
ExtraInput = Ignore;
|
|
77 |
}
|
|
78 |
setTriggerSource {
|
|
79 |
out "TRIG:SOUR %{IMM|TLIN}";
|
|
80 |
@init { out "TRIG:SOUR?"; in "%{IMM|TLIN}"; }
|
|
81 |
}
|
|
82 |
getTriggerSource {
|
|
83 |
out "TRIG:SOUR?";
|
|
84 |
in "%{IMM|TLIN}";
|
|
85 |
ExtraInput = Ignore;
|
|
86 |
}
|
|
87 |
cancel {
|
|
88 |
out "\030ABOR\r";
|
|
89 |
in "%*s";
|
|
90 |
ExtraInput = Ignore;
|
|
91 |
}
|
|
92 |
|
|
93 |
#
|
|
94 |
# Measure current
|
|
95 |
#
|
|
96 |
measureCurrent {
|
1
|
97 |
ReplyTimeout = 800;
|
0
|
98 |
out "READ?";
|
|
99 |
in "%f";
|
|
100 |
ExtraInput = Ignore;
|
|
101 |
@init { out "FORM:ELEM READ;CONF:CURR:DC"; }
|
|
102 |
}
|
|
103 |
fetchBuffered {
|
|
104 |
ReplyTimeout = 10000;
|
|
105 |
Separator = ",";
|
|
106 |
out "FETC?";
|
|
107 |
in "%f";
|
|
108 |
ExtraInput = Ignore;
|
|
109 |
}
|
|
110 |
|
|
111 |
#
|
|
112 |
# Source
|
|
113 |
#
|
1
|
114 |
#not on 6485
|
|
115 |
#setIlimit {
|
|
116 |
# out "SOUR:VOLT:ILIM 2.5E-%d";
|
|
117 |
# @init { out "SOUR:VOLT:ILIM?"; in "2.5%*[^E]E-%d"; }
|
|
118 |
#}
|
|
119 |
#getIlimit {
|
|
120 |
# out "SOUR:VOLT:ILIM?";
|
|
121 |
# in "2.5%*[^E]E-%d";
|
|
122 |
# ExtraInput = Ignore;
|
|
123 |
#}
|
|
124 |
#setSourceRange {
|
|
125 |
# out "SOUR:VOLT:RANGE %d";
|
|
126 |
# @init { out "SOUR:VOLT:RANGE?"; in "%{1.000000E+01|5.000000E+01|5.000000E+02}"; }
|
|
127 |
#}
|
|
128 |
#getSourceRange {
|
|
129 |
# out "SOUR:VOLT:RANGE?";
|
|
130 |
# in "%{1.000000E+01|5.000000E+01|5.000000E+02}";
|
|
131 |
# ExtraInput = Ignore;
|
|
132 |
#}
|
0
|
133 |
|