Files
sics/site_ansto/instrument/config/beamline/aerolas_doppler.sct
2014-12-02 16:16:36 +11:00

64 lines
1.2 KiB
Tcl

# vim: ft=tcl ts=8 sts=2 sw=2 expandtab autoindent smartindent nocindent
driver aerolas_doppler = {
protocol = modbus_ap;
class = instrument;
simulation_group = motor_simulation;
group = {
readable = 1;
writeable = 1;
type = int;
fetch_function = getInteger;
read_function = rdInteger;
write_function = wrInteger;
var run_cmd = {
allowed = "0,1";
read_command = "1";
write_command = "1";
}
type = float;
fetch_function = getFloat;
read_function = rdFloat;
write_function = wrFloat;
var amplitude = {
read_command = "2";
write_command = "2";
}
var velocity = {
type = float;
read_command = "4";
write_command = "4";
}
}
code fetch_function getFloat = {
@TCL
set cmd "1:3:${cmd_str}:1:F32"
@END
}
code read_function rdFloat = {
@TCL
@END
}
code write_function wrFloat = {
@TCL
set cmd "1:16:${cmd_str}:1:F32:${par}"
@END
}
code fetch_function getInteger = {
@TCL
set cmd "1:3:${cmd_str}:1:U16"
@END
}
code read_function rdInteger = {
@TCL
@END
}
code write_function wrInteger = {
@TCL
set cmd "1:16:${cmd_str}:1:U16:${par}"
@END
}
}