Change the byte order and start addresses for the doppler modbus driver
This commit is contained in:
@ -3,7 +3,8 @@ driver aerolas_doppler = {
|
|||||||
protocol = modbus_ap;
|
protocol = modbus_ap;
|
||||||
class = instrument;
|
class = instrument;
|
||||||
simulation_group = motor_simulation;
|
simulation_group = motor_simulation;
|
||||||
group = {
|
make_args = "{testing false}"
|
||||||
|
group ctrl = {
|
||||||
readable = 1;
|
readable = 1;
|
||||||
writeable = 1;
|
writeable = 1;
|
||||||
type = int;
|
type = int;
|
||||||
@ -12,25 +13,26 @@ driver aerolas_doppler = {
|
|||||||
write_function = wrUShort;
|
write_function = wrUShort;
|
||||||
var run_cmd = {
|
var run_cmd = {
|
||||||
allowed = "0,1";
|
allowed = "0,1";
|
||||||
read_command = "1";
|
read_command = "0";
|
||||||
write_command = "1";
|
write_command = "0";
|
||||||
|
lowerlimit = 0; upperlimit = 1;
|
||||||
}
|
}
|
||||||
type = float;
|
type = float;
|
||||||
fetch_function = getFloat;
|
fetch_function = getFloat;
|
||||||
read_function = rdFloat;
|
read_function = rdFloat;
|
||||||
write_function = wrFloat;
|
write_function = wrFloat;
|
||||||
var amplitude = {
|
var amplitude = {
|
||||||
read_command = "2";
|
read_command = "1";
|
||||||
write_command = "2";
|
write_command = "1";
|
||||||
lowerlimit = 0; upperlimit = 75;
|
lowerlimit = 0; upperlimit = 75;
|
||||||
units = "mm";
|
units = "mm";
|
||||||
}
|
}
|
||||||
var velocity = {
|
var velocity = {
|
||||||
type = float;
|
type = float;
|
||||||
read_command = "4";
|
read_command = "3";
|
||||||
write_command = "4";
|
write_command = "3";
|
||||||
lowerlimit = 0; upperlimit = 4700;
|
lowerlimit = 0; upperlimit = 4.700;
|
||||||
units = "mm/S";
|
units = "m/S";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
group read_write = {
|
group read_write = {
|
||||||
@ -40,21 +42,21 @@ driver aerolas_doppler = {
|
|||||||
fetch_function = getUShort;
|
fetch_function = getUShort;
|
||||||
read_function = rdUShort;
|
read_function = rdUShort;
|
||||||
write_function = wrUShort;
|
write_function = wrUShort;
|
||||||
var move_profile = {
|
var profile = {
|
||||||
allowed = "0,1";
|
allowed = "0,1";
|
||||||
read_command = "7";
|
read_command = "6";
|
||||||
write_command = "7";
|
write_command = "6";
|
||||||
}
|
}
|
||||||
fetch_function = getULong;
|
fetch_function = getULong;
|
||||||
read_function = rdULong;
|
read_function = rdULong;
|
||||||
write_function = wrULong;
|
write_function = wrULong;
|
||||||
var te_ok_cycles = {
|
var te_ok_cycles = {
|
||||||
read_command = "8";
|
read_command = "7";
|
||||||
write_command = "8";
|
write_command = "7";
|
||||||
}
|
}
|
||||||
var te_ok_time = {
|
var te_ok_time = {
|
||||||
read_command = "10";
|
read_command = "9";
|
||||||
write_command = "10";
|
write_command = "9";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
group read_only = {
|
group read_only = {
|
||||||
@ -63,31 +65,66 @@ driver aerolas_doppler = {
|
|||||||
type = int;
|
type = int;
|
||||||
fetch_function = getUShort;
|
fetch_function = getUShort;
|
||||||
read_function = rdUShort;
|
read_function = rdUShort;
|
||||||
var run_state = { read_command = "1001"; }
|
var run_state = { read_command = "1000"; }
|
||||||
var arc_state = { read_command = "1017"; }
|
var arc_state = { read_command = "1016"; }
|
||||||
var version_number = { read_command = "1019"; }
|
var version_number = { read_command = "1018"; }
|
||||||
fetch_function = getULong;
|
fetch_function = getULong;
|
||||||
read_function = rdULong;
|
read_function = rdULong;
|
||||||
var move_error_code = { read_command = "1004"; }
|
var move_rel_counter = { read_command = "1003"; }
|
||||||
var move_abs_counter = { read_command = "1006"; }
|
var move_abs_counter = { read_command = "1005"; }
|
||||||
var move_abs_counter = { read_command = "1006"; }
|
|
||||||
var calc_error_code = { read_command = "1020"; }
|
|
||||||
type = float;
|
type = float;
|
||||||
fetch_function = getFloat;
|
fetch_function = getFloat;
|
||||||
read_function = rdFloat;
|
read_function = rdFloat;
|
||||||
var move_amplitude_min = { read_command = "1008"; }
|
var move_amplitude_min = { read_command = "1007"; }
|
||||||
var move_amplitude_max = { read_command = "1010"; }
|
var move_amplitude_max = { read_command = "1009"; }
|
||||||
var move_velocity_min = { read_command = "1012"; }
|
var move_velocity_min = { read_command = "1011"; }
|
||||||
var move_velocity_max = { read_command = "1014"; }
|
var move_velocity_max = { read_command = "1013"; }
|
||||||
var braking_distance = { read_command = "1022"; }
|
}
|
||||||
var velocity_ratio = { read_command = "1024"; }
|
group testing = {
|
||||||
var continuous_acceleration = { read_command = "1026"; }
|
conditional = "${testing}";
|
||||||
var maximum_acceleration = { read_command = "1028"; }
|
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 = {
|
code fetch_function getFloat = {
|
||||||
@TCL
|
@TCL
|
||||||
set cmd "1:3:${cmd_str}:1:F32"
|
set cmd "1:3:${cmd_str}:1:F32\[2,3,0,1\]"
|
||||||
@END
|
@END
|
||||||
}
|
}
|
||||||
code read_function rdFloat = {
|
code read_function rdFloat = {
|
||||||
@ -96,7 +133,7 @@ driver aerolas_doppler = {
|
|||||||
}
|
}
|
||||||
code write_function wrFloat = {
|
code write_function wrFloat = {
|
||||||
@TCL
|
@TCL
|
||||||
set cmd "1:16:${cmd_str}:1:F32:${par}"
|
set cmd "1:16:${cmd_str}:1:F32\[2,3,0,1\]${par}"
|
||||||
@END
|
@END
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +154,7 @@ driver aerolas_doppler = {
|
|||||||
|
|
||||||
code fetch_function getULong = {
|
code fetch_function getULong = {
|
||||||
@TCL
|
@TCL
|
||||||
set cmd "1:3:${cmd_str}:1:U32"
|
set cmd "1:3:${cmd_str}:1:U32\[2,3,0,1\]"
|
||||||
@END
|
@END
|
||||||
}
|
}
|
||||||
code read_function rdULong = {
|
code read_function rdULong = {
|
||||||
@ -126,7 +163,7 @@ driver aerolas_doppler = {
|
|||||||
}
|
}
|
||||||
code write_function wrULong = {
|
code write_function wrULong = {
|
||||||
@TCL
|
@TCL
|
||||||
set cmd "1:16:${cmd_str}:1:U32:${par}"
|
set cmd "1:16:${cmd_str}:1:U32\[2,3,0,1\]${par}"
|
||||||
@END
|
@END
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user