Added chopper id command

This commit is contained in:
Ferdi Franceschini
2014-02-03 23:28:56 +11:00
parent 2fc161713a
commit b257413fd0
2 changed files with 29 additions and 0 deletions

View File

@ -23,6 +23,7 @@ fileeval $cfPath(motors)/positmotor_configuration.tcl
fileeval $cfPath(velsel)/velsel.tcl
fileeval $cfPath(parameters)/parameters.tcl
fileeval $cfPath(plc)/plc.tcl
fileeval $cfPath(chopper)/chopper.tcl
fileeval $cfPath(optics)/optics.tcl
fileeval $cfPath(counter)/counter.tcl
fileeval $cfPath(environment)/temperature/sct_lakeshore_340.tcl

View File

@ -0,0 +1,28 @@
namespace eval chopper {
variable sim_mode [SplitReply [chopper_simulation]]
set master_chopper_id_simvar 1
}
::utility::macro::getset int master_chopper_id {args} {
variable sim_mode [SplitReply [chopper_simulation]]
if {$sim_mode == "false"} {
if {$args == ""} {
return "master_chopper_id = [sct_chopper_t0 transact {get master chopper}]"
} else {
sct_chopper_t0 transact "enable chopper selection"
sct_chopper_t0 transact "set master chopper=$args"
sct_chopper_t0 transact "disable chopper selection"
}
} else {
if {$args == ""} {
return master_chopper_id = $::chopper::master_chopper_id_simvar
} else {
set ::chopper::master_chopper_id_simvar $args
}
}
}
sicslist setatt master_chopper_id klass NXdisk_chopper
sicslist setatt master_chopper_id long_name master_chopper_id
sicslist setatt master_chopper_id mutable false