Load drivers which have been enabled in the SICS config ini files.
Lakeshore 336 drivers with known IP addresses have been added to the ini files with unique IDs. All entries in the ini files now have unique IDs The wombat ini now has radio buttons to select sample stage motor configurations.
This commit is contained in:
@@ -238,7 +238,7 @@ namespace eval ::scobj::lh45 {
|
||||
return idle
|
||||
}
|
||||
|
||||
proc mk_sct_julabo_lh45 {sct_controller klass tempobj tol} {
|
||||
proc mk_sct_julabo_lh45 {sct_controller klass tempobj tol CID CTYPE} {
|
||||
if {[ catch {
|
||||
set ns ::scobj::lh45
|
||||
|
||||
@@ -258,6 +258,7 @@ namespace eval ::scobj::lh45 {
|
||||
hsetprop $scobj_hpath/setpoint writestatus UNKNOWN
|
||||
hsetprop $scobj_hpath/setpoint type drivable
|
||||
hsetprop $scobj_hpath/setpoint setpoint_pending 0
|
||||
hsetprop $scobj_hpath/setpoint permlink data_set ${CTYPE}${CID}SP1
|
||||
# Drive adapter interface
|
||||
hsetprop $scobj_hpath/setpoint checklimits ${ns}::check $scobj_hpath
|
||||
hsetprop $scobj_hpath/setpoint checkstatus ${ns}::drivestatus $scobj_hpath
|
||||
@@ -285,6 +286,7 @@ namespace eval ::scobj::lh45 {
|
||||
hsetprop $scobj_hpath/sensor/value rdValue ${ns}::rdValue "double"
|
||||
hsetprop $scobj_hpath/sensor/value oldval UNKNOWN
|
||||
hsetprop $scobj_hpath/sensor/value units "C"
|
||||
hsetprop $scobj_hpath/sensor/value permlink data_set ${CTYPE}${CID}S1
|
||||
|
||||
hfactory $scobj_hpath/sensor/bathtemp plain internal float
|
||||
hsetprop $scobj_hpath/sensor/bathtemp read ${ns}::getValue rdValue "in_pv_00"
|
||||
@@ -412,11 +414,11 @@ namespace eval ::scobj::lh45 {
|
||||
# @param port, the IP protocol port number of the device
|
||||
# @param sensor (optional), select the 'bath' sensor or an external sensor 'ext'
|
||||
# @param _tol (optional), this is the initial tolerance setting
|
||||
proc add_lh45 {name IP port {sensor "bath"} {_tol 5.0}} {
|
||||
proc add_lh45 { name IP port {sensor "bath"} {_tol 5.0} {CID 1} {CTYPE T} } {
|
||||
if {[SplitReply [environment_simulation]]=="false"} {
|
||||
makesctcontroller sct_lh45 std ${IP}:$port "\r"
|
||||
}
|
||||
mk_sct_julabo_lh45 sct_lh45 environment $name $_tol
|
||||
mk_sct_julabo_lh45 sct_lh45 environment $name $_tol $CID $CTYPE
|
||||
set scobj_hpath /sics/$name
|
||||
switch $sensor {
|
||||
"bath" {
|
||||
@@ -432,4 +434,25 @@ proc add_lh45 {name IP port {sensor "bath"} {_tol 5.0}} {
|
||||
makesctemon $name /sics/$name/emon/monmode /sics/$name/emon/isintol /sics/$name/emon/errhandler
|
||||
}
|
||||
|
||||
if {[ catch {
|
||||
if { [ info exists ::config_dict ] } {
|
||||
dict for {secname secinfo} $::config_dict {
|
||||
if { [dict exists $secinfo "driver"] && ([dict get $secinfo "driver"] == "lh45") } {
|
||||
if { [ dict get $::secinfo enabled ] } {
|
||||
set name [dict get $::secinfo name]
|
||||
set IP [dict get $::secinfo ip]
|
||||
set PORT [dict get $::secinfo port]
|
||||
set sensor [dict get $::secinfo sensor]
|
||||
set tol [dict get $::secinfo tol]
|
||||
set cid [dict get $::secinfo id]
|
||||
set ctype [dict get $::secinfo type]
|
||||
add_lh45 $name $IP $PORT $sensor $tol $cid $ctype
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} message ]} {
|
||||
puts "ERROR: $message"
|
||||
}
|
||||
|
||||
namespace import ::scobj::lh45::*
|
||||
|
||||
Reference in New Issue
Block a user