Modified some older drivers to use the tcl dict code from gen_sct.py
TODO
sct_keithley_2700.tcl
magneticField/sct_oxford_labview.tcl
magneticField/sct_bruker_BEC1.tcl
temperature/sct_watlow_st4.tcl
temperature/sct_oxford_mercury.tcl
temperature/sct_mercury_pres.tcl
temperature/sct_julabo_lh45.tcl
temperature/sct_lakeshore_340.tcl
temperature/sct_julabo_lh45_gen.tcl
temperature/sct_watlow_rm.tcl
temperature/sct_eurotherm_2000.tcl
temperature/sct_lakeshore_336.tcl
temperature/sct_watlow_pm.tcl
temperature/sct_oxford_itc.tcl
temperature/sct_lakeshore_370.tcl
temperature/west400.tcl
This commit is contained in:
@@ -504,7 +504,7 @@ proc add_oxford_labview { name IP PORT {interval 5} } {
|
|||||||
interval $interval
|
interval $interval
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
# NEW START
|
|
||||||
namespace eval ::scobj::oxford_labview {
|
namespace eval ::scobj::oxford_labview {
|
||||||
set debug_threshold 5
|
set debug_threshold 5
|
||||||
}
|
}
|
||||||
@@ -516,17 +516,30 @@ proc ::scobj::oxford_labview::sics_log {debug_level debug_string} {
|
|||||||
}
|
}
|
||||||
} catch_message ]
|
} 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 {} {
|
proc ::scobj::oxford_labview::read_config {} {
|
||||||
set catch_status [ catch {
|
set catch_status [ catch {
|
||||||
set ns "::scobj::oxford_labview"
|
set ns "::scobj::oxford_labview"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "oxford_labview" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { $enabled == "true" || $enabled == "always" } {
|
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"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
@@ -574,13 +587,3 @@ if { [info exists ::config_dict] } {
|
|||||||
} else {
|
} else {
|
||||||
::scobj::oxford_labview::sics_log 5 "No config dict"
|
::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
|
|
||||||
|
|||||||
@@ -1922,17 +1922,30 @@ proc ::scobj::lakeshore_336::sics_log {debug_level debug_string} {
|
|||||||
}
|
}
|
||||||
} catch_message ]
|
} 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 {} {
|
proc ::scobj::lakeshore_336::read_config {} {
|
||||||
set catch_status [ catch {
|
set catch_status [ catch {
|
||||||
set ns "::scobj::lakeshore_336"
|
set ns "::scobj::lakeshore_336"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "lakeshore_336" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { $enabled == "true" || $enabled == "always" } {
|
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"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
|
|||||||
@@ -2126,17 +2126,30 @@ proc ::scobj::lakeshore_340::sics_log {debug_level debug_string} {
|
|||||||
}
|
}
|
||||||
} catch_message ]
|
} 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 {} {
|
proc ::scobj::lakeshore_340::read_config {} {
|
||||||
set catch_status [ catch {
|
set catch_status [ catch {
|
||||||
set ns "::scobj::lakeshore_340"
|
set ns "::scobj::lakeshore_340"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "lakeshore_340" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { $enabled == "true" || $enabled == "always" } {
|
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"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
|
|||||||
Reference in New Issue
Block a user