Add permlink to 5T magnet driver and load the driver in the quokka config.
This commit is contained in:
@ -263,8 +263,8 @@ proc ::scobj::tsi_smc::setValue {tc_root nextState cmd_str} {
|
|||||||
handle_exception ${catch_status} ${catch_message}
|
handle_exception ${catch_status} ${catch_message}
|
||||||
}
|
}
|
||||||
|
|
||||||
proc ::scobj::tsi_smc::mkDriver { sct_controller name } {
|
proc ::scobj::tsi_smc::mkDriver { sct_controller name id } {
|
||||||
::scobj::tsi_smc::sics_log 9 "::scobj::tsi_smc::mkDriver for ${name}"
|
::scobj::tsi_smc::sics_log 9 "::scobj::tsi_smc::mkDriver ${sct_controller} ${name} ${id}"
|
||||||
set ns "[namespace current]"
|
set ns "[namespace current]"
|
||||||
set catch_status [ catch {
|
set catch_status [ catch {
|
||||||
|
|
||||||
@ -303,6 +303,8 @@ proc ::scobj::tsi_smc::mkDriver { sct_controller name } {
|
|||||||
hsetprop ${scobj_hpath}/value data true
|
hsetprop ${scobj_hpath}/value data true
|
||||||
hsetprop ${scobj_hpath}/value mutable false
|
hsetprop ${scobj_hpath}/value mutable false
|
||||||
hsetprop ${scobj_hpath}/value nxsave true
|
hsetprop ${scobj_hpath}/value nxsave true
|
||||||
|
hsetprop ${scobj_hpath}/value permlink data_set "B[format "%02d" ${id}]S01"
|
||||||
|
hsetprop ${scobj_hpath}/value @description "B[format "%02d" ${id}]S01"
|
||||||
hsetprop ${scobj_hpath}/value oldval 0.0
|
hsetprop ${scobj_hpath}/value oldval 0.0
|
||||||
hsetprop ${scobj_hpath}/value sdsinfo "::nexus::scobj::sdsinfo"
|
hsetprop ${scobj_hpath}/value sdsinfo "::nexus::scobj::sdsinfo"
|
||||||
hsetprop ${scobj_hpath}/value type "part"
|
hsetprop ${scobj_hpath}/value type "part"
|
||||||
@ -416,6 +418,7 @@ proc ::scobj::tsi_smc::mkDriver { sct_controller name } {
|
|||||||
hsetprop ${scobj_hpath}/b/Lower oldval 0.0
|
hsetprop ${scobj_hpath}/b/Lower oldval 0.0
|
||||||
hsetprop ${scobj_hpath}/b/Lower sdsinfo "::nexus::scobj::sdsinfo"
|
hsetprop ${scobj_hpath}/b/Lower sdsinfo "::nexus::scobj::sdsinfo"
|
||||||
hsetprop ${scobj_hpath}/b/Lower type "part"
|
hsetprop ${scobj_hpath}/b/Lower type "part"
|
||||||
|
hsetprop ${scobj_hpath}/b/Lower units "A"
|
||||||
hsetprop ${scobj_hpath}/b/Lower nxalias "${name}_b_Lower"
|
hsetprop ${scobj_hpath}/b/Lower nxalias "${name}_b_Lower"
|
||||||
|
|
||||||
hfactory ${scobj_hpath}/b/Pause plain user int
|
hfactory ${scobj_hpath}/b/Pause plain user int
|
||||||
@ -488,9 +491,9 @@ namespace eval ::scobj::tsi_smc {
|
|||||||
namespace export mkDriver
|
namespace export mkDriver
|
||||||
}
|
}
|
||||||
|
|
||||||
proc add_tsi_smc {name IP port} {
|
proc add_tsi_smc {name IP port {id 1}} {
|
||||||
set catch_status [ catch {
|
set catch_status [ catch {
|
||||||
::scobj::tsi_smc::sics_log 9 "add_tsi_smc ${name} ${IP} ${port}"
|
::scobj::tsi_smc::sics_log 9 "add_tsi_smc ${name} ${IP} ${port} ${id}"
|
||||||
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
|
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
|
||||||
if {[string equal -nocase "aqadapter" "${IP}"]} {
|
if {[string equal -nocase "aqadapter" "${IP}"]} {
|
||||||
::scobj::tsi_smc::sics_log 9 "makesctcontroller sct_${name} aqadapter ${port}"
|
::scobj::tsi_smc::sics_log 9 "makesctcontroller sct_${name} aqadapter ${port}"
|
||||||
@ -502,8 +505,8 @@ proc add_tsi_smc {name IP port} {
|
|||||||
} else {
|
} else {
|
||||||
::scobj::tsi_smc::sics_log 9 "[environment_simulation] => No sctcontroller for tsi_smc"
|
::scobj::tsi_smc::sics_log 9 "[environment_simulation] => No sctcontroller for tsi_smc"
|
||||||
}
|
}
|
||||||
::scobj::tsi_smc::sics_log 1 "::scobj::tsi_smc::mkDriver sct_${name} ${name}"
|
::scobj::tsi_smc::sics_log 1 "::scobj::tsi_smc::mkDriver sct_${name} ${name} ${id}"
|
||||||
::scobj::tsi_smc::mkDriver sct_${name} ${name}
|
::scobj::tsi_smc::mkDriver sct_${name} ${name} ${id}
|
||||||
} catch_message ]
|
} catch_message ]
|
||||||
handle_exception ${catch_status} ${catch_message}
|
handle_exception ${catch_status} ${catch_message}
|
||||||
}
|
}
|
||||||
@ -561,10 +564,25 @@ proc ::scobj::tsi_smc::read_config {} {
|
|||||||
${asyncqueue} timeout "[dict get $v "timeout"]"
|
${asyncqueue} timeout "[dict get $v "timeout"]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
set arg_list [list]
|
||||||
|
set missing_list [list]
|
||||||
|
foreach arg {id} {
|
||||||
|
if {[dict exists $u $arg]} {
|
||||||
|
lappend arg_list "[dict get $u $arg]"
|
||||||
|
} elseif {[dict exists $v $arg]} {
|
||||||
|
lappend arg_list "[dict get $v $arg]"
|
||||||
|
} else {
|
||||||
|
${ns}::sics_log 9 "Missing configuration value $arg"
|
||||||
|
lappend missing_list $arg
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if { [llength $missing_list] > 0 } {
|
||||||
|
error "$name is missing configuration values $missing_list"
|
||||||
|
}
|
||||||
if { [string equal -nocase ${asyncqueue} "sct"] } {
|
if { [string equal -nocase ${asyncqueue} "sct"] } {
|
||||||
add_tsi_smc ${name} ${IP} ${PORT}
|
add_tsi_smc ${name} ${IP} ${PORT} {*}$arg_list
|
||||||
} else {
|
} else {
|
||||||
add_tsi_smc ${name} "aqadapter" ${asyncqueue}
|
add_tsi_smc ${name} "aqadapter" ${asyncqueue} {*}$arg_list
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@ driver tsi_smc = {
|
|||||||
device = Superconducting_Magnet_Controller;
|
device = Superconducting_Magnet_Controller;
|
||||||
protocol = std;
|
protocol = std;
|
||||||
class = environment; simulation_group = environment_simulation;
|
class = environment; simulation_group = environment_simulation;
|
||||||
|
add_args = '{id 1}';
|
||||||
|
make_args = 'id';
|
||||||
|
|
||||||
group = {
|
group = {
|
||||||
priv = user;
|
priv = user;
|
||||||
@ -13,7 +15,7 @@ driver tsi_smc = {
|
|||||||
data = true;
|
data = true;
|
||||||
nxsave = true;
|
nxsave = true;
|
||||||
|
|
||||||
var 'value';
|
var 'value' = {permlink = 'B.S01'};
|
||||||
var setpoint = {
|
var setpoint = {
|
||||||
writeable = 1;
|
writeable = 1;
|
||||||
write_function = setGauss;
|
write_function = setGauss;
|
||||||
|
@ -63,7 +63,7 @@ fileeval $cfPath(commands)/commands.tcl
|
|||||||
fileeval $cfPath(anticollider)/anticollider.tcl
|
fileeval $cfPath(anticollider)/anticollider.tcl
|
||||||
fileeval $cfPath(environment)/temperature/sct_julabo_lh45.tcl
|
fileeval $cfPath(environment)/temperature/sct_julabo_lh45.tcl
|
||||||
fileeval $cfPath(environment)/temperature/sct_qlink.tcl
|
fileeval $cfPath(environment)/temperature/sct_qlink.tcl
|
||||||
#fileeval $cfPath(environment)/magneticField/sct_oxford_ips.tcl
|
fileeval $cfPath(environment)/magneticField/sct_tsi_smc.tcl
|
||||||
fileeval $cfPath(environment)/temperature/sct_oxford_itc.tcl
|
fileeval $cfPath(environment)/temperature/sct_oxford_itc.tcl
|
||||||
fileeval $cfPath(environment)/magneticField/oxford_labview.tcl
|
fileeval $cfPath(environment)/magneticField/oxford_labview.tcl
|
||||||
fileeval $cfPath(environment)/magneticField/sct_bruker_BEC1.tcl
|
fileeval $cfPath(environment)/magneticField/sct_bruker_BEC1.tcl
|
||||||
|
Reference in New Issue
Block a user