56 lines
1.5 KiB
Plaintext
56 lines
1.5 KiB
Plaintext
# Stanford Research Systems SR630 Thermocouple Monitor
|
|
# vim: ts=8 sts=2 sw=2 expandtab nocindent autoindent smartindent
|
|
driver stanford_sr630 = {
|
|
vendor = StanfordResearchSystems; device=SR630;
|
|
protocol = std;
|
|
class = environment;
|
|
simulation_group = environment_simulation;
|
|
|
|
group = {
|
|
priv = user;
|
|
var id = {
|
|
readable = 10;
|
|
type = text;
|
|
fetch_function = fetch_id;
|
|
read_function = read_id;
|
|
read_command = "@";
|
|
value = "UNKNOWN";
|
|
}
|
|
type = float;
|
|
fetch_function = getSensor;
|
|
read_function = readSensor;
|
|
var sensor_01 = { readable = 1; read_command = "1"; }
|
|
var sensor_02 = { readable = 60; read_command = "2"; }
|
|
var sensor_03 = { readable = 60; read_command = "3"; }
|
|
var sensor_04 = { readable = 60; read_command = "4"; }
|
|
var sensor_05 = { readable = 60; read_command = "5"; }
|
|
var sensor_06 = { readable = 60; read_command = "6"; }
|
|
var sensor_07 = { readable = 60; read_command = "7"; }
|
|
var sensor_08 = { readable = 60; read_command = "8"; }
|
|
var sensor_09 = { readable = 60; read_command = "9"; }
|
|
var sensor_10 = { readable = 60; read_command = "10"; }
|
|
}
|
|
code fetch_id = {
|
|
@TCL
|
|
if {[hval [sct]] == "UNKNOWN"} {
|
|
set cmd "[clock format [clock seconds] -format "DATE %m,%d,%Y;TIME %H,%M,%S;*IDN?"]"
|
|
} else {
|
|
set cmd "*IDN?;DATE?;TIME?"
|
|
}
|
|
@END
|
|
}
|
|
code read_id = {
|
|
@TCL
|
|
@END
|
|
}
|
|
code getSensor = {
|
|
@TCL
|
|
set cmd "UNIT ${cmd_str},ABS;MEAS? ${cmd_str}"
|
|
@END
|
|
}
|
|
code readSensor = {
|
|
@TCL
|
|
@END
|
|
}
|
|
}
|