diff --git a/site_ansto/instrument/bilby/config/chopper/chopper.tcl b/site_ansto/instrument/bilby/config/chopper/chopper.tcl index 80394e93..b1225105 100644 --- a/site_ansto/instrument/bilby/config/chopper/chopper.tcl +++ b/site_ansto/instrument/bilby/config/chopper/chopper.tcl @@ -36,3 +36,17 @@ if {$sim_mode == false} { sicslist setatt t0_chopper_id klass NXdisk_chopper sicslist setatt t0_chopper_id long_name t0_chopper_id sicslist setatt t0_chopper_id mutable true + +if [dict exists $::config_dict disk_chopper name] { + set ch_name [dict get $::config_dict disk_chopper name] +} else { + clientput ERROR: Chopper configuration is missing +} +::utility::macro::getset float t0_chopper_freq [subst { {chopper $ch_name} }] { + set cid [SplitReply [t0_chopper_id]] + set rpm [hval /instrument/$chopper/disk_$cid/aspeed] + return [expr $rpm / 60.0] +} +sicslist setatt t0_chopper_freq klass NXdisk_chopper +sicslist setatt t0_chopper_freq long_name t0_chopper_freq +sicslist setatt t0_chopper_freq mutable true