Port new Aerolas Doppler driver from RELEASE-3_1

This commit is contained in:
Douglas Clowes
2015-01-07 10:29:07 +11:00
parent 51026a09af
commit 679838eac3
2 changed files with 4623 additions and 0 deletions

View File

@ -0,0 +1,170 @@
# 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;
make_args = "{testing false}"
group ctrl = {
readable = 1;
writeable = 1;
type = int;
fetch_function = getUShort;
read_function = rdUShort;
write_function = wrUShort;
var run_cmd = {
allowed = "0,1";
read_command = "0";
write_command = "0";
lowerlimit = 0; upperlimit = 1;
}
type = float;
fetch_function = getFloat;
read_function = rdFloat;
write_function = wrFloat;
var amplitude = {
read_command = "1";
write_command = "1";
lowerlimit = 0; upperlimit = 75;
units = "mm";
}
var velocity = {
type = float;
read_command = "3";
write_command = "3";
lowerlimit = 0; upperlimit = 4.700;
units = "m/S";
}
}
group read_write = {
readable = 1;
data = false; nxsave = false; mutable = false;
type = int;
fetch_function = getUShort;
read_function = rdUShort;
write_function = wrUShort;
var profile = {
allowed = "0,1";
read_command = "6";
write_command = "6";
}
fetch_function = getULong;
read_function = rdULong;
write_function = wrULong;
var te_ok_cycles = {
read_command = "7";
write_command = "7";
}
var te_ok_time = {
read_command = "9";
write_command = "9";
}
}
group read_only = {
readable = 1;
data = false; nxsave = false; mutable = false;
type = int;
fetch_function = getUShort;
read_function = rdUShort;
var run_state = { read_command = "1000"; }
var arc_state = { read_command = "1016"; }
var version_number = { read_command = "1018"; }
fetch_function = getULong;
read_function = rdULong;
var move_rel_counter = { read_command = "1003"; }
var move_abs_counter = { read_command = "1005"; }
type = float;
fetch_function = getFloat;
read_function = rdFloat;
var move_amplitude_min = { read_command = "1007"; }
var move_amplitude_max = { read_command = "1009"; }
var move_velocity_min = { read_command = "1011"; }
var move_velocity_max = { read_command = "1013"; }
}
group testing = {
conditional = "${testing}";
group shorts = {
readable = 30;
data = false; nxsave = false; mutable = false;
type = int;
fetch_function = getUShort;
read_function = rdUShort;
%exec
exec_output = []
for i in range(0,30):
exec_output += ["var short_%04d = { read_command = '%d'; }" % (i, i)]
exec_output += ["var short_%04d = { read_command = '%d'; }" % (1000+i, 1000+i)]
%end
}
group longs = {
readable = 30;
data = false; nxsave = false; mutable = false;
type = int;
fetch_function = getULong;
read_function = rdULong;
%exec
exec_output = []
for i in range(0,30):
exec_output += ["var long_%04d = { read_command = '%d'; }" % (i, i)]
exec_output += ["var long_%04d = { read_command = '%d'; }" % (1000+i, 1000+i)]
%end
}
group floats = {
readable = 30;
data = false; nxsave = false; mutable = false;
type = float;
fetch_function = getFloat;
read_function = rdFloat;
%exec
exec_output = []
for i in range(0,30):
exec_output += ["var float_%04d = { read_command = '%d'; }" % (i, i)]
exec_output += ["var float_%04d = { read_command = '%d'; }" % (1000+i, 1000+i)]
%end
}
}
code fetch_function getFloat = {
@TCL
set cmd "1:3:${cmd_str}:1:F32\[2,3,0,1\]"
@END
}
code read_function rdFloat = {
@TCL
@END
}
code write_function wrFloat = {
@TCL
set cmd "1:16:${cmd_str}:1:F32\[2,3,0,1\]${par}"
@END
}
code fetch_function getUShort = {
@TCL
set cmd "1:3:${cmd_str}:1:U16"
@END
}
code read_function rdUShort = {
@TCL
@END
}
code write_function wrUShort = {
@TCL
set cmd "1:16:${cmd_str}:1:U16:${par}"
@END
}
code fetch_function getULong = {
@TCL
set cmd "1:3:${cmd_str}:1:U32\[2,3,0,1\]"
@END
}
code read_function rdULong = {
@TCL
@END
}
code write_function wrULong = {
@TCL
set cmd "1:16:${cmd_str}:1:U32\[2,3,0,1\]${par}"
@END
}
}

File diff suppressed because it is too large Load Diff