diff --git a/site_ansto/instrument/config/environment/magneticField/sct_oxford_labview.tcl b/site_ansto/instrument/config/environment/magneticField/sct_oxford_labview.tcl index 4ba20241..28ca6165 100644 --- a/site_ansto/instrument/config/environment/magneticField/sct_oxford_labview.tcl +++ b/site_ansto/instrument/config/environment/magneticField/sct_oxford_labview.tcl @@ -504,7 +504,7 @@ proc add_oxford_labview { name IP PORT {interval 5} } { interval $interval }] } -# NEW START + namespace eval ::scobj::oxford_labview { set debug_threshold 5 } @@ -516,17 +516,30 @@ proc ::scobj::oxford_labview::sics_log {debug_level debug_string} { } } catch_message ] } + +clientput "file evaluation of sct_lakeshore_336.tcl" +::scobj::lakeshore_336::sics_log 9 "file evaluation of sct_lakeshore_336.tcl" + proc ::scobj::oxford_labview::read_config {} { set catch_status [ catch { set ns "::scobj::oxford_labview" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "oxford_labview" } { - if { $enabled == "true" || $enabled == "always" } { + if { !([dict exists $v "driver"]) } { + continue + } + if { [string equal -nocase [dict get $v "driver"] "lakeshore_336"] } { + if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } { if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue" @@ -574,13 +587,3 @@ if { [info exists ::config_dict] } { } else { ::scobj::oxford_labview::sics_log 5 "No config dict" } -# NEW END -#OLD START -# if { [ info exists ::config_dict ] && [ dict get $::config_dict 12tmagnet enabled ] } { -# set IP [dict get $::config_dict 12tmagnet ip] -# set PORT [dict get $::config_dict 12tmagnet port] -# set NAME [dict get $::config_dict 12tmagnet name] -# puts "MAGNET: add_oxmag $NAME $IP $PORT" -# add_oxmag $NAME $IP $PORT -# } -#OLD END diff --git a/site_ansto/instrument/config/environment/temperature/sct_lakeshore_336.tcl b/site_ansto/instrument/config/environment/temperature/sct_lakeshore_336.tcl index 19d64690..a7a201dd 100644 --- a/site_ansto/instrument/config/environment/temperature/sct_lakeshore_336.tcl +++ b/site_ansto/instrument/config/environment/temperature/sct_lakeshore_336.tcl @@ -1922,17 +1922,30 @@ proc ::scobj::lakeshore_336::sics_log {debug_level debug_string} { } } catch_message ] } + +clientput "file evaluation of sct_lakeshore_336.tcl" +::scobj::lakeshore_336::sics_log 9 "file evaluation of sct_lakeshore_336.tcl" + proc ::scobj::lakeshore_336::read_config {} { set catch_status [ catch { set ns "::scobj::lakeshore_336" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "lakeshore_336" } { - if { $enabled == "true" || $enabled == "always" } { + if { !([dict exists $v "driver"]) } { + continue + } + if { [string equal -nocase [dict get $v "driver"] "lakeshore_336"] } { + if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } { if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/config/environment/temperature/sct_lakeshore_340.tcl b/site_ansto/instrument/config/environment/temperature/sct_lakeshore_340.tcl index a92ce74e..eb678312 100644 --- a/site_ansto/instrument/config/environment/temperature/sct_lakeshore_340.tcl +++ b/site_ansto/instrument/config/environment/temperature/sct_lakeshore_340.tcl @@ -2126,17 +2126,30 @@ proc ::scobj::lakeshore_340::sics_log {debug_level debug_string} { } } catch_message ] } + +clientput "file evaluation of sct_lakeshore_336.tcl" +::scobj::lakeshore_336::sics_log 9 "file evaluation of sct_lakeshore_336.tcl" + proc ::scobj::lakeshore_340::read_config {} { set catch_status [ catch { set ns "::scobj::lakeshore_340" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "lakeshore_340" } { - if { $enabled == "true" || $enabled == "always" } { + if { !([dict exists $v "driver"]) } { + continue + } + if { [string equal -nocase [dict get $v "driver"] "lakeshore_340"] } { + if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } { if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"