0
|
1 |
# LakeShore 336 Series Streams Protocol File
|
|
2 |
#
|
|
3 |
#####
|
|
4 |
# Interface: ASCII (INET or GPIB)
|
|
5 |
# Four Sensor Inputs/Outputs
|
|
6 |
# Two PID Loops
|
|
7 |
# Two Heater Outputs
|
|
8 |
#
|
|
9 |
# Commands:
|
|
10 |
# *IDN? - ID Query
|
|
11 |
# return: <string>
|
|
12 |
# INTYPE? <input> - Input Type Parameter Query
|
|
13 |
# return: n,n,n,n,n <sensorType>,<autorange>,<range>,<compensation>,<units>
|
|
14 |
# HTR? <output> - Heater Output Query
|
|
15 |
# return: +nnn.n
|
|
16 |
# HTRSET? <output> - Heater Setup Query
|
|
17 |
# return: n,n,+n.nnn,n <htrResistance>,<maxCurrent>,<maxUserCurrent>,<current/power>
|
|
18 |
# HTRST? <output> - Heater Status Query
|
|
19 |
# return: n<error code>
|
|
20 |
# <C/K/S>RDG? <input> - Celcius/Kevin/Sensor Input Reading Query
|
|
21 |
# return: +nnn.n
|
|
22 |
# RDGST? <input> - Input Reading Status Query
|
|
23 |
# return: n <status byte>
|
|
24 |
# SETP <output>,<value> - Control Setpoint Command
|
|
25 |
# SETP? <value> - Control Setpoint Query
|
|
26 |
# return: +nnn.nnn
|
|
27 |
# RANGE <output>,<range> - Heater Range Command
|
|
28 |
# RANGE? <value> - Heater Range Query
|
|
29 |
# return: <0=Off, 1=Low(On), 2=Medium, 3=High
|
|
30 |
# PID <output>,<P>,<I>,<D> - Control Loop Parameters Command
|
|
31 |
# PID? <output> - Control Loop Query
|
|
32 |
# return: <nnn.n>,<nnn.n>,<nnn.n>
|
|
33 |
# RAMP <output>,<off(0)/on(1)>,<rate> - Control Setpoint Ramp Cmd
|
|
34 |
# RAMP? <output> - Control Setpoint Ramp Query
|
|
35 |
# return: <off(0)/on(1)>,<rate>
|
|
36 |
#
|
|
37 |
|
|
38 |
ExtraInput = Ignore;
|
|
39 |
ReplyTimeout = 100;
|
|
40 |
OutTerminator = LF;
|
|
41 |
InTerminator = CR LF;
|
|
42 |
|
|
43 |
getID {
|
|
44 |
out "*IDN?";
|
|
45 |
in "%s";
|
|
46 |
@init {out "*IDN?"; in "%s";}
|
|
47 |
}
|
|
48 |
|
|
49 |
setSETP {
|
|
50 |
out "SETP \$1,%f";
|
|
51 |
wait 100;
|
|
52 |
}
|
|
53 |
|
|
54 |
getSETP {
|
|
55 |
out "SETP? \$1";
|
|
56 |
in "%f";
|
|
57 |
@init {out "SETP? \$1"; in "%f";}
|
|
58 |
}
|
|
59 |
|
|
60 |
|
|
61 |
setMOUT {
|
|
62 |
out "MOUT \$1,%f";
|
|
63 |
wait 100;
|
|
64 |
}
|
|
65 |
|
|
66 |
getMOUT {
|
|
67 |
out "MOUT? \$1";
|
|
68 |
in "%f";
|
|
69 |
@init {out "MOUT? \$1"; in "%f";}
|
|
70 |
}
|
|
71 |
|
|
72 |
|
|
73 |
setOUTMODE {
|
|
74 |
out "OUTMODE \$1,%(\$2:OUT\$1:Mode.RVAL)d,%(\$2:OUT\$1:Cntrl.VAL)d,0";
|
|
75 |
wait 100;
|
|
76 |
}
|
|
77 |
|
|
78 |
|
|
79 |
getOUTMODE {
|
|
80 |
out "OUTMODE? \$1";
|
|
81 |
in "%(\$2:OUT\$1:Mode_RBV.VAL)d,%(\$2:OUT\$1:Cntrl_RBV.VAL)d,%*d";
|
|
82 |
}
|
|
83 |
|
|
84 |
setMODE {
|
|
85 |
out "MODE %d";
|
|
86 |
wait 100;
|
|
87 |
}
|
|
88 |
|
|
89 |
getMODE {
|
|
90 |
out "MODE?";
|
|
91 |
in "%d";
|
|
92 |
}
|
|
93 |
|
|
94 |
setPID {
|
|
95 |
out "PID \$1,%(\$2:P\$1.VAL)f,%(\$2:I\$1.VAL)f,%(\$2:D\$1.VAL)f";
|
|
96 |
wait 100;
|
|
97 |
}
|
|
98 |
|
|
99 |
getPID {
|
|
100 |
out "PID? \$1";
|
|
101 |
in "%(\$2:P\$1_RBV.VAL)f,%(\$2:I\$1_RBV.VAL)f,%(\$2:D\$1_RBV.VAL)f";
|
|
102 |
}
|
|
103 |
|
|
104 |
setInType {
|
|
105 |
out "INTYPE %(\$2:OUT\$1:Cntrl_RBV.VAL)s,%(\$2:IN\$1:Sensor_RBV.VAL)d,%(\$2:IN\$1:AutoRange_RBV.VAL)d,%(\$2:IN\$1:Range_RBV.VAL)d,%(\$2:IN\$1:Comp_RBV.VAL)d,%(\$2:IN\$1:Units.RVAL)d";
|
|
106 |
}
|
|
107 |
|
|
108 |
getInType {
|
|
109 |
out "INTYPE? %(\$2:OUT\$1:Cntrl_RBV.VAL)s";
|
|
110 |
in "%(\$2:IN\$1:Sensor_RBV.VAL)d,%(\$2:IN\$1:Comp_RBV.VAL)d";
|
|
111 |
}
|
|
112 |
|
|
113 |
getInput {
|
|
114 |
out "%(\$2:IN\$1:Units_RBV.VAL)s","RDG? ","%(\$2:OUT\$1:Cntrl_RBV.VAL)s";
|
|
115 |
in "%f";
|
|
116 |
}
|
|
117 |
|
|
118 |
getInName {
|
|
119 |
out "INNAME? %(\$2:OUT\$1:Cntrl_RBV.VAL)s";
|
|
120 |
in "%[_a-zA-Z0-9 -]";
|
|
121 |
}
|
|
122 |
|
|
123 |
getHeater {
|
|
124 |
out "HTR? \$1";
|
|
125 |
in "%f";
|
|
126 |
}
|
|
127 |
|
|
128 |
getRange {
|
|
129 |
out "RANGE? \$1";
|
|
130 |
in "%d";
|
|
131 |
}
|
|
132 |
|
|
133 |
setRange {
|
|
134 |
out "RANGE \$1,%d";
|
|
135 |
wait 100;
|
|
136 |
}
|
|
137 |
|
|
138 |
getAOutput {
|
|
139 |
out "AOUT? \$1";
|
|
140 |
in "%f";
|
|
141 |
}
|
|
142 |
|
|
143 |
setRamp {
|
|
144 |
out "RAMP \$1,%(\$2:OnRamp\$1.VAL)d,%(\$2:RampR\$1.VAL)f";
|
|
145 |
wait 100;
|
|
146 |
}
|
|
147 |
|
|
148 |
getRamp {
|
|
149 |
out "RAMP? \$1";
|
|
150 |
in "%(\$2:OnRamp\$1_RBV.VAL)d,%(\$2:RampR\$1_RBV.VAL)f";
|
|
151 |
}
|
|
152 |
|
|
153 |
|
|
154 |
|