Added chopper id command
This commit is contained in:
@ -23,6 +23,7 @@ fileeval $cfPath(motors)/positmotor_configuration.tcl
|
|||||||
fileeval $cfPath(velsel)/velsel.tcl
|
fileeval $cfPath(velsel)/velsel.tcl
|
||||||
fileeval $cfPath(parameters)/parameters.tcl
|
fileeval $cfPath(parameters)/parameters.tcl
|
||||||
fileeval $cfPath(plc)/plc.tcl
|
fileeval $cfPath(plc)/plc.tcl
|
||||||
|
fileeval $cfPath(chopper)/chopper.tcl
|
||||||
fileeval $cfPath(optics)/optics.tcl
|
fileeval $cfPath(optics)/optics.tcl
|
||||||
fileeval $cfPath(counter)/counter.tcl
|
fileeval $cfPath(counter)/counter.tcl
|
||||||
fileeval $cfPath(environment)/temperature/sct_lakeshore_340.tcl
|
fileeval $cfPath(environment)/temperature/sct_lakeshore_340.tcl
|
||||||
|
28
site_ansto/instrument/bilby/config/chopper/chopper.tcl
Normal file
28
site_ansto/instrument/bilby/config/chopper/chopper.tcl
Normal 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
|
Reference in New Issue
Block a user