Driver changes made on ics1-wombat-test.

This commit is contained in:
Ferdi Franceschini
2014-07-10 09:56:09 +10:00
parent d79865edb4
commit 6aa229ee75
5 changed files with 243 additions and 214 deletions

View File

@ -517,8 +517,8 @@ 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"
clientput "file evaluation of sct_oxford_labview.tcl"
::scobj::oxford_labview::sics_log 9 "file evaluation of sct_oxford_labview.tcl"
proc ::scobj::oxford_labview::read_config {} {
set catch_status [ catch {
@ -538,7 +538,9 @@ proc ::scobj::oxford_labview::read_config {} {
if { !([dict exists $v "driver"]) } {
continue
}
if { [string equal -nocase [dict get $v "driver"] "lakeshore_336"] } {
if { [string equal -nocase [dict get $v "driver"] "oxford_labview"] } {
set driver [dict get $v driver]
${ns}::sics_log 9 "Found ${name}: $driver"
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
set asyncqueue "null"
@ -550,6 +552,7 @@ proc ::scobj::oxford_labview::read_config {} {
set asyncprotocol [dict get $v "asyncprotocol"]
} else {
set asyncprotocol ${name}_protocol
${ns}::sics_log 9 "${name}:${driver}: MakeAsyncProtocol ${asyncprotocol}"
MakeAsyncProtocol ${asyncprotocol}
if { [dict exists $v "terminator"] } {
${asyncprotocol} sendterminator "[dict get $v "terminator"]"
@ -559,6 +562,7 @@ proc ::scobj::oxford_labview::read_config {} {
set asyncqueue ${name}_queue
set IP [dict get $v ip]
set PORT [dict get $v port]
${ns}::sics_log 9 "${name}:${driver}: MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${IP} ${PORT}"
MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${IP} ${PORT}
if { [dict exists $v "timeout"] } {
${asyncqueue} timeout "[dict get $v "timeout"]"
@ -573,6 +577,7 @@ proc ::scobj::oxford_labview::read_config {} {
error "Missing configuration value $arg"
}
}
${ns}::sics_log 9 "add_oxford_labview ${name} aqadapter ${asyncqueue} {*}$arg_list"
add_oxford_labview ${name} "aqadapter" ${asyncqueue} {*}$arg_list
}
}

View File

@ -197,6 +197,9 @@ proc ::scobj::add_protekmm::read_config {} {
set name [dict get $v name]
set enabled [string tolower [dict get $v "enabled"]]
set implementation [dict get $v "implementation"]
if [dict exists $v "datype"] {
set datype [dict get $v "datype"]
}
if { !([dict exists $::config_dict $implementation]) } {
continue
}
@ -205,6 +208,8 @@ proc ::scobj::add_protekmm::read_config {} {
continue
}
if { [string equal -nocase [dict get $v "driver"] "protekmm"] } {
set driver [dict get $v driver]
${ns}::sics_log 9 "Found ${name}: $driver"
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
set asyncqueue "null"
@ -216,6 +221,7 @@ proc ::scobj::add_protekmm::read_config {} {
set asyncprotocol [dict get $v "asyncprotocol"]
} else {
set asyncprotocol ${name}_protocol
${ns}::sics_log 9 "${name}:${driver}: MakeAsyncProtocol ${asyncprotocol}"
MakeAsyncProtocol ${asyncprotocol}
if { [dict exists $v "terminator"] } {
${asyncprotocol} sendterminator "[dict get $v "terminator"]"
@ -225,13 +231,14 @@ proc ::scobj::add_protekmm::read_config {} {
set asyncqueue ${name}_queue
set IP [dict get $v ip]
set PORT [dict get $v port]
${ns}::sics_log 9 "${name}:${driver}: MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${IP} ${PORT}"
MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${IP} ${PORT}
if { [dict exists $v "timeout"] } {
${asyncqueue} timeout "[dict get $v "timeout"]"
}
}
set arg_list [list]
foreach arg {name ip port datype id scale offset interval} {
foreach arg {id} {
if {[dict exists $v $arg]} {
lappend arg_list "[dict get $v $arg]"
} else {
@ -239,6 +246,7 @@ proc ::scobj::add_protekmm::read_config {} {
error "Missing configuration value $arg"
}
}
${ns}:sics_log 9 "add_protekmm ${name} aqadapter ${asyncqueue} {*}$arg_list"
add_protekmm ${name} "aqadapter" ${asyncqueue} {*}$arg_list
}
}

View File

@ -4,7 +4,7 @@
##
# /*--------------------------------------------------------------------------
# L A K E S H O R E 3 x x S E R I E S D R I V E R
# L A K E S H O R E 3 x x S E R I E S D R I V E R
#
# @file: This file contains the implementation of a driver for the
# Lakeshore 336 and 340 Temperature controller implemented as a scriptcontext
@ -83,20 +83,20 @@ namespace eval ::scobj::ls336 {
set_param $tc_root ls340_settleTime 30
# default Heater Range (0,..,5) zero is off, hence the least dangerous
set_param $tc_root ls336_range 0
# upper and lower temperature limit in Kelvin
# upper and lower temperature limit in Kelvin
set_param $tc_root ls336_upperlimit 500.0
set_param $tc_root ls336_lowerlimit 4.0
# temperature units are Kelvin
# temperature units are Kelvin
set_param $tc_root ls336_tempUnits "K"
# ls336 status byte
# ls336 status byte
# enable extra logging - can produce huge stout****.log file in /usr/local/sics/log/
set_param $tc_root ls336_verbose 0
# a list of available sensors (not all may be connected/active)
# a list of available sensors (not all may be connected/active)
set_param $tc_root this_sensorlist [list A B C D]
# a list of controler loops
# a list of controler loops
set_param $tc_root this_controlerlist [list 1 2]
# set device ID to unknown
# set self-test result to unknown
# set device ID to unknown
# set self-test result to unknown
set_param $tc_root this_selfTestResult -1
# status of input channels - unknown at startup
set_param $tc_root ls336_sampleSensor "UNKNOWN"
@ -267,7 +267,7 @@ proc getValue {tc_root nextState cmd idx} {
# Keep track of the time at which data was observed ** NXsensor allows float values only, not text
if {0 == [string compare -length 9 $lastQueryCmd "DATETIME?"] } {
# DATETIME «MM»,«DD»,«YYYY»,«HH»,«mm»,«SS»,«sss» Configure Date and Time.
regsub -all {,} $data {:} data
regsub -all {,} $data {:} data
# data=08:31:2009:12:58:58:910
set separator {:}
set amonth [::scobj::ls336::getValFromString $data 0 $separator]
@ -452,54 +452,54 @@ proc rdBitValue {tc_root rdCmd iSensor} {
set data [sct result]
switch -glob -- $data {
"ASCERR:*" {
clientput "$data in rdBitValue"
sct geterror $data
clientput "$data in rdBitValue"
sct geterror $data
}
default {
if {$data != [sct oldval]} {
sct oldval $data
sct utime readtime
# RDGST? A/B/C/D Read input status returns an integer with the following meaning
# Bit Weighting StatusIndicator
# 0 1 invalid reading
# 1 2 old reading (not an error, ignored in ls336)
# 4 16 temp underrange
# 5 32 temp overrange
# 6 64 sensor units zero
# 7 128 sensor units overrange
set sValue ""
# Remove any leading zeros from string 'data' which ought to represent an integer,
# ("001" => "1", "096" => "96") else the string may be misinterpreted as an octal number.
if {0 == [string compare -length 1 $data "0"] } {
set data [string range $data 1 5]
}
if {0 == [string compare -length 1 $data "0"] } {
set data [string range $data 1 5]
}
set i $data
# clientput "rdBitValue(): iSensor:$iSensor, data:$data"
set bitValue [expr {$i & 1}]
if {$bitValue == 1} {set sValue "Invalid reading, "}
#set i [expr $i >> 1]
# set bitValue [expr $i & 1]
# if {$bitValue == 1} {set sValue "old reading"}
set i [expr {$i >> 4}]
set bitValue [expr {$i & 1}]
if {$bitValue == 1} { set sValue [append sValue "temp underrange, "] }
set i [expr {$i >> 1}]
set bitValue [expr {$i & 1}]
if {$bitValue == 1} { set sValue [append sValue "temp overrange, "] }
set i [expr {$i >> 1}]
set bitValue [expr {$i & 1}]
if {$bitValue == 1} { set sValue [append sValue "sensor units zero, "] }
set i [expr {$i >> 1}]
set bitValue [expr {$i & 1}]
if {$bitValue == 1} { set sValue [append sValue "sensor units overrange, "] }
if { [string length $sValue] < 4 } {
set sValue "ok"
}
sct update $sValue
}
if {$data != [sct oldval]} {
sct oldval $data
sct utime readtime
# RDGST? A/B/C/D Read input status returns an integer with the following meaning
# Bit Weighting StatusIndicator
# 0 1 invalid reading
# 1 2 old reading (not an error, ignored in ls336)
# 4 16 temp underrange
# 5 32 temp overrange
# 6 64 sensor units zero
# 7 128 sensor units overrange
set sValue ""
# Remove any leading zeros from string 'data' which ought to represent an integer,
# ("001" => "1", "096" => "96") else the string may be misinterpreted as an octal number.
if {0 == [string compare -length 1 $data "0"] } {
set data [string range $data 1 5]
}
if {0 == [string compare -length 1 $data "0"] } {
set data [string range $data 1 5]
}
set i $data
# clientput "rdBitValue(): iSensor:$iSensor, data:$data"
set bitValue [expr {$i & 1}]
if {$bitValue == 1} {set sValue "Invalid reading, "}
#set i [expr $i >> 1]
# set bitValue [expr $i & 1]
# if {$bitValue == 1} {set sValue "old reading"}
set i [expr {$i >> 4}]
set bitValue [expr {$i & 1}]
if {$bitValue == 1} { set sValue [append sValue "temp underrange, "] }
set i [expr {$i >> 1}]
set bitValue [expr {$i & 1}]
if {$bitValue == 1} { set sValue [append sValue "temp overrange, "] }
set i [expr {$i >> 1}]
set bitValue [expr {$i & 1}]
if {$bitValue == 1} { set sValue [append sValue "sensor units zero, "] }
set i [expr {$i >> 1}]
set bitValue [expr {$i & 1}]
if {$bitValue == 1} { set sValue [append sValue "sensor units overrange, "] }
if { [string length $sValue] < 4 } {
set sValue "ok"
}
sct update $sValue
}
}
}
} message ]} {
@ -1628,84 +1628,84 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p
# wrFunc Function to be called to send the wrCmd to the device, typically setValue()
# allowedValues allowed values for the node data - does not permit other
set deviceCommandToplevel {
sensor sampleSensor 0 1 0 0 1 1 1 text user {CSET? 1} {rdValue} {InpSample } {setPseudoValue} {A,B,C,D}
sensor Tsample 1 0 0 0 1 1 1 float spy {KRDG? A} {rdValue} {} {setValue} {}
sensor ctrl_Loop_1 1 0 0 0 1 1 1 text user {CSET? 1} {rdValue} {} {setValue} {}
sensor ctrlLp1_value 1 0 0 0 1 1 1 float spy {KRDG? A} {rdValue} {} {setValue} {}
sensor setpoint1 1 1 1 1 1 1 1 float user {SETP? 1} {rdValue} {SETP 1,} {setPoint} {}
sensor ctrl_Loop_2 1 0 0 0 2 1 1 text user {CSET? 2} {rdValue} {} {setValue} {}
sensor ctrlLp2_value 1 0 0 0 2 1 1 float spy {KRDG? B} {rdValue} {} {setValue} {}
sensor setpoint2 1 1 1 1 2 1 1 float user {SETP? 2} {rdValue} {SETP 2,} {setPoint} {}
sensor ctrl_Loop_3 1 0 0 0 3 0 1 text user {CSET? 3} {rdValue} {} {setValue} {}
sensor ctrlLp3_value 1 0 0 0 3 0 1 float spy {KRDG? C} {rdValue} {} {setValue} {}
sensor setpoint3 1 1 1 1 3 0 1 float user {SETP? 3} {rdValue} {SETP 3,} {setPoint} {}
sensor ctrl_Loop_4 1 0 0 0 4 0 1 text user {CSET? 4} {rdValue} {} {setValue} {}
sensor ctrlLp4_value 1 0 0 0 4 0 1 float spy {KRDG? D} {rdValue} {} {setValue} {}
sensor setpoint4 1 1 1 1 4 0 1 float user {SETP? 4} {rdValue} {SETP 4,} {setPoint} {}
sensor sensorValueA 1 0 1 0 A 1 1 float spy {KRDG? A} {rdInpValue} {} {setValue} {}
sensor sensorValueB 1 0 1 0 B 1 1 float spy {KRDG? B} {rdInpValue} {} {setValue} {}
sensor sensorValueC 1 0 1 0 C 1 1 float spy {KRDG? C} {rdInpValue} {} {setValue} {}
sensor sensorValueD 1 0 1 0 D 1 1 float spy {KRDG? D} {rdInpValue} {} {setValue} {}
sensor sampleSensor 0 1 0 0 1 1 1 text user {CSET? 1} {rdValue} {InpSample } {setPseudoValue} {A,B,C,D}
sensor Tsample 1 0 0 0 1 1 1 float spy {KRDG? A} {rdValue} {} {setValue} {}
sensor ctrl_Loop_1 1 0 0 0 1 1 1 text user {CSET? 1} {rdValue} {} {setValue} {}
sensor ctrlLp1_value 1 0 0 0 1 1 1 float spy {KRDG? A} {rdValue} {} {setValue} {}
sensor setpoint1 1 1 1 1 1 1 1 float user {SETP? 1} {rdValue} {SETP 1,} {setPoint} {}
sensor ctrl_Loop_2 1 0 0 0 2 1 1 text user {CSET? 2} {rdValue} {} {setValue} {}
sensor ctrlLp2_value 1 0 0 0 2 1 1 float spy {KRDG? B} {rdValue} {} {setValue} {}
sensor setpoint2 1 1 1 1 2 1 1 float user {SETP? 2} {rdValue} {SETP 2,} {setPoint} {}
sensor ctrl_Loop_3 1 0 0 0 3 0 1 text user {CSET? 3} {rdValue} {} {setValue} {}
sensor ctrlLp3_value 1 0 0 0 3 0 1 float spy {KRDG? C} {rdValue} {} {setValue} {}
sensor setpoint3 1 1 1 1 3 0 1 float user {SETP? 3} {rdValue} {SETP 3,} {setPoint} {}
sensor ctrl_Loop_4 1 0 0 0 4 0 1 text user {CSET? 4} {rdValue} {} {setValue} {}
sensor ctrlLp4_value 1 0 0 0 4 0 1 float spy {KRDG? D} {rdValue} {} {setValue} {}
sensor setpoint4 1 1 1 1 4 0 1 float user {SETP? 4} {rdValue} {SETP 4,} {setPoint} {}
sensor sensorValueA 1 0 1 0 A 1 1 float spy {KRDG? A} {rdInpValue} {} {setValue} {}
sensor sensorValueB 1 0 1 0 B 1 1 float spy {KRDG? B} {rdInpValue} {} {setValue} {}
sensor sensorValueC 1 0 1 0 C 1 1 float spy {KRDG? C} {rdInpValue} {} {setValue} {}
sensor sensorValueD 1 0 1 0 D 1 1 float spy {KRDG? D} {rdInpValue} {} {setValue} {}
}
set deviceCommand {
input alarm_Limits_A 1 1 1 0 A 1 1 text spy {ALARM? A} {rdAlarmVal} {ALARM A,} {setValue} {}
input alarm_Limits_B 1 1 1 0 B 1 1 text spy {ALARM? B} {rdAlarmVal} {ALARM B,} {setValue} {}
input alarm_Limits_C 1 1 1 0 C 1 1 text spy {ALARM? C} {rdAlarmVal} {ALARM C,} {setValue} {}
input alarm_Limits_D 1 1 1 0 D 1 1 text spy {ALARM? D} {rdAlarmVal} {ALARM D,} {setValue} {}
input alarmStatusA 1 0 1 0 A 1 1 text spy {ALARMST? A} {rdValue} {} {setValue} {}
input alarmStatusB 1 0 1 0 B 1 1 text spy {ALARMST? B} {rdValue} {} {setValue} {}
input alarmStatusC 1 0 1 0 C 1 1 text spy {ALARMST? C} {rdValue} {} {setValue} {}
input alarmStatusD 1 0 1 0 D 1 1 text spy {ALARMST? D} {rdValue} {} {setValue} {}
input inpCalCurve_A 1 1 1 0 A 1 1 int user {INCRV? A} {rdCrvValue} {INCRV A,} {setValue} {}
input calCurveHdr_A 1 0 1 0 A 1 1 text user {CRVHDR? } {rdValue} {} {setValue} {}
input inpCalCurve_B 1 1 1 0 B 1 1 int user {INCRV? B} {rdCrvValue} {INCRV B,} {setValue} {}
input calCurveHdr_B 1 0 1 0 B 1 1 text user {CRVHDR? } {rdValue} {} {setValue} {}
input inpCalCurve_C 1 1 1 0 C 1 1 int user {INCRV? C} {rdCrvValue} {INCRV C,} {setValue} {}
input calCurveHdr_C 1 0 1 0 C 1 1 text user {CRVHDR? } {rdValue} {} {setValue} {}
input inpCalCurve_D 1 1 1 0 D 1 1 int user {INCRV? D} {rdCrvValue} {INCRV D,} {setValue} {}
input calCurveHdr_D 1 0 1 0 D 1 1 text user {CRVHDR? } {rdValue} {} {setValue} {}
input alarm_Limits_A 1 1 1 0 A 1 1 text spy {ALARM? A} {rdAlarmVal} {ALARM A,} {setValue} {}
input alarm_Limits_B 1 1 1 0 B 1 1 text spy {ALARM? B} {rdAlarmVal} {ALARM B,} {setValue} {}
input alarm_Limits_C 1 1 1 0 C 1 1 text spy {ALARM? C} {rdAlarmVal} {ALARM C,} {setValue} {}
input alarm_Limits_D 1 1 1 0 D 1 1 text spy {ALARM? D} {rdAlarmVal} {ALARM D,} {setValue} {}
input alarmStatusA 1 0 1 0 A 1 1 text spy {ALARMST? A} {rdValue} {} {setValue} {}
input alarmStatusB 1 0 1 0 B 1 1 text spy {ALARMST? B} {rdValue} {} {setValue} {}
input alarmStatusC 1 0 1 0 C 1 1 text spy {ALARMST? C} {rdValue} {} {setValue} {}
input alarmStatusD 1 0 1 0 D 1 1 text spy {ALARMST? D} {rdValue} {} {setValue} {}
input inpCalCurve_A 1 1 1 0 A 1 1 int user {INCRV? A} {rdCrvValue} {INCRV A,} {setValue} {}
input calCurveHdr_A 1 0 1 0 A 1 1 text user {CRVHDR? } {rdValue} {} {setValue} {}
input inpCalCurve_B 1 1 1 0 B 1 1 int user {INCRV? B} {rdCrvValue} {INCRV B,} {setValue} {}
input calCurveHdr_B 1 0 1 0 B 1 1 text user {CRVHDR? } {rdValue} {} {setValue} {}
input inpCalCurve_C 1 1 1 0 C 1 1 int user {INCRV? C} {rdCrvValue} {INCRV C,} {setValue} {}
input calCurveHdr_C 1 0 1 0 C 1 1 text user {CRVHDR? } {rdValue} {} {setValue} {}
input inpCalCurve_D 1 1 1 0 D 1 1 int user {INCRV? D} {rdCrvValue} {INCRV D,} {setValue} {}
input calCurveHdr_D 1 0 1 0 D 1 1 text user {CRVHDR? } {rdValue} {} {setValue} {}
input inputTypeA 1 1 1 0 A 0 1 text user {INTYPE? A} {rdValue} {INTYPE A,} {setValue} {}
input inputTypeB 1 1 1 0 B 0 1 text user {INTYPE? B} {rdValue} {INTYPE B,} {setValue} {}
input inputTypeC 1 1 1 0 C 0 1 text user {INTYPE? C} {rdValue} {INTYPE C,} {setValue} {}
input inputTypeD 1 1 1 0 D 0 1 text user {INTYPE? D} {rdValue} {INTYPE D,} {setValue} {}
input sensorStatusA 1 0 1 0 A 1 1 text spy {RDGST? A} {rdBitValue} {} {setValue} {}
input sensorStatusB 1 0 1 0 B 1 1 text spy {RDGST? B} {rdBitValue} {} {setValue} {}
input sensorStatusC 1 0 1 0 C 1 1 text spy {RDGST? C} {rdBitValue} {} {setValue} {}
input sensorStatusD 1 0 1 0 D 1 1 text spy {RDGST? D} {rdBitValue} {} {setValue} {}
control outMode_1 1 1 1 0 1 0 1 text user {OUTMODE? 1} {rdCfgValue} {OUTMODE 1,} {setValue} {}
control outMode_2 1 1 1 0 2 0 1 text user {OUTMODE? 2} {rdCfgValue} {OUTMODE 2,} {setValue} {}
control outMode_3 1 1 1 0 3 0 1 text user {OUTMODE? 3} {rdCfgValue} {OUTMODE 3,} {setValue} {}
control outMode_4 1 1 1 0 4 0 1 text user {OUTMODE? 4} {rdCfgValue} {OUTMODE 4,} {setValue} {}
control manualOut_1 1 1 1 0 1 1 1 text user {MOUT? 1} {rdValue} {MOUT 1,} {setValue} {}
control manualOut_2 1 1 1 0 2 1 1 text user {MOUT? 2} {rdValue} {MOUT 2,} {setValue} {}
control manualOut_3 1 1 1 0 3 0 1 text user {MOUT? 3} {rdValue} {MOUT 3,} {setValue} {}
control manualOut_4 1 1 1 0 4 0 1 text user {MOUT? 4} {rdValue} {MOUT 4,} {setValue} {}
control pid_Loop_1 1 1 1 0 1 1 1 text user {PID? 1} {rdValue} {PID 1,} {setValue} {}
control pid_Loop_2 1 1 1 0 2 1 1 text user {PID? 2} {rdValue} {PID 2,} {setValue} {}
control ramp_Loop_1 1 1 1 0 1 1 1 text user {RAMP? 1} {rdValue} {RAMP 1,} {setValue} {}
control ramp_Loop_2 1 1 1 0 2 1 1 text user {RAMP? 2} {rdValue} {RAMP 2,} {setValue} {}
control rampStatus_Loop_1 1 0 1 0 1 1 1 int spy {RAMPST? 1} {rdValue} {} {setValue} {}
control rampStatus_Loop_2 1 0 1 0 2 1 1 int spy {RAMPST? 2} {rdValue} {} {setValue} {}
heater heaterOutput_1 1 1 1 0 1 0 1 float user {HTR? 1} {rdValue} {} {setValue} {}
heater heaterOutput_2 1 1 1 0 2 0 1 float user {HTR? 2} {rdValue} {} {setValue} {}
heater heaterStatus_1 1 0 1 0 1 0 1 int spy {HTRST? 1} {rdValue} {} {setValue} {}
heater heaterStatus_2 1 0 1 0 2 0 1 int spy {HTRST? 2} {rdValue} {} {setValue} {}
heater heaterRange_1 1 1 1 0 0 0 1 int user {RANGE? 1} {rdValue} {RANGE 1,} {setValue} {0,1,2,3}
heater heaterRange_2 1 1 1 0 0 0 1 int user {RANGE? 2} {rdValue} {RANGE 2,} {setValue} {0,1,2,3}
heater heaterRange_3 1 1 1 0 0 0 1 int user {RANGE? 3} {rdValue} {RANGE 3,} {setValue} {0,1}
heater heaterRange_4 1 1 1 0 0 0 1 int user {RANGE? 4} {rdValue} {RANGE 4,} {setValue} {0,1}
other deviceID_idn 1 0 1 0 0 1 1 text spy {*IDN?} {inTolerance} {} {setValue} {}
other selftest 1 0 0 0 0 1 1 int user {*TST?} {rdValue} {} {setValue} {}
other relayStatusHi 1 0 1 0 1 1 1 int spy {RELAYST? 1} {rdValue} {} {setValue} {}
other relayStatusLo 1 0 1 0 2 1 1 int spy {RELAYST? 2} {rdValue} {} {setValue} {}
other relayCtrlParmHi 1 1 1 0 0 1 1 int spy {RELAY? 1} {rdValue} {RELAY 1,} {setValue} {}
other relayCtrlParmLo 1 1 1 0 0 1 1 int spy {RELAY? 2} {rdValue} {RELAY 2,} {setValue} {}
other statusByte 1 0 1 0 0 1 1 int spy {*STB?} {rdValue} {} {setValue} {}
input sensorStatusA 1 0 1 0 A 1 1 text spy {RDGST? A} {rdBitValue} {} {setValue} {}
input sensorStatusB 1 0 1 0 B 1 1 text spy {RDGST? B} {rdBitValue} {} {setValue} {}
input sensorStatusC 1 0 1 0 C 1 1 text spy {RDGST? C} {rdBitValue} {} {setValue} {}
input sensorStatusD 1 0 1 0 D 1 1 text spy {RDGST? D} {rdBitValue} {} {setValue} {}
control outMode_1 1 1 1 0 1 0 1 text user {OUTMODE? 1} {rdCfgValue} {OUTMODE 1,} {setValue} {}
control outMode_2 1 1 1 0 2 0 1 text user {OUTMODE? 2} {rdCfgValue} {OUTMODE 2,} {setValue} {}
control outMode_3 1 1 1 0 3 0 1 text user {OUTMODE? 3} {rdCfgValue} {OUTMODE 3,} {setValue} {}
control outMode_4 1 1 1 0 4 0 1 text user {OUTMODE? 4} {rdCfgValue} {OUTMODE 4,} {setValue} {}
control manualOut_1 1 1 1 0 1 1 1 text user {MOUT? 1} {rdValue} {MOUT 1,} {setValue} {}
control manualOut_2 1 1 1 0 2 1 1 text user {MOUT? 2} {rdValue} {MOUT 2,} {setValue} {}
control manualOut_3 1 1 1 0 3 0 1 text user {MOUT? 3} {rdValue} {MOUT 3,} {setValue} {}
control manualOut_4 1 1 1 0 4 0 1 text user {MOUT? 4} {rdValue} {MOUT 4,} {setValue} {}
control pid_Loop_1 1 1 1 0 1 1 1 text user {PID? 1} {rdValue} {PID 1,} {setValue} {}
control pid_Loop_2 1 1 1 0 2 1 1 text user {PID? 2} {rdValue} {PID 2,} {setValue} {}
control ramp_Loop_1 1 1 1 0 1 1 1 text user {RAMP? 1} {rdValue} {RAMP 1,} {setValue} {}
control ramp_Loop_2 1 1 1 0 2 1 1 text user {RAMP? 2} {rdValue} {RAMP 2,} {setValue} {}
control rampStatus_Loop_1 1 0 1 0 1 1 1 int spy {RAMPST? 1} {rdValue} {} {setValue} {}
control rampStatus_Loop_2 1 0 1 0 2 1 1 int spy {RAMPST? 2} {rdValue} {} {setValue} {}
heater heaterOutput_1 1 1 1 0 1 0 1 float user {HTR? 1} {rdValue} {} {setValue} {}
heater heaterOutput_2 1 1 1 0 2 0 1 float user {HTR? 2} {rdValue} {} {setValue} {}
heater heaterStatus_1 1 0 1 0 1 0 1 int spy {HTRST? 1} {rdValue} {} {setValue} {}
heater heaterStatus_2 1 0 1 0 2 0 1 int spy {HTRST? 2} {rdValue} {} {setValue} {}
heater heaterRange_1 1 1 1 0 0 0 1 int user {RANGE? 1} {rdValue} {RANGE 1,} {setValue} {0,1,2,3}
heater heaterRange_2 1 1 1 0 0 0 1 int user {RANGE? 2} {rdValue} {RANGE 2,} {setValue} {0,1,2,3}
heater heaterRange_3 1 1 1 0 0 0 1 int user {RANGE? 3} {rdValue} {RANGE 3,} {setValue} {0,1}
heater heaterRange_4 1 1 1 0 0 0 1 int user {RANGE? 4} {rdValue} {RANGE 4,} {setValue} {0,1}
other deviceID_idn 1 0 1 0 0 1 1 text spy {*IDN?} {inTolerance} {} {setValue} {}
other selftest 1 0 0 0 0 1 1 int user {*TST?} {rdValue} {} {setValue} {}
other relayStatusHi 1 0 1 0 1 1 1 int spy {RELAYST? 1} {rdValue} {} {setValue} {}
other relayStatusLo 1 0 1 0 2 1 1 int spy {RELAYST? 2} {rdValue} {} {setValue} {}
other relayCtrlParmHi 1 1 1 0 0 1 1 int spy {RELAY? 1} {rdValue} {RELAY 1,} {setValue} {}
other relayCtrlParmLo 1 1 1 0 0 1 1 int spy {RELAY? 2} {rdValue} {RELAY 2,} {setValue} {}
other statusByte 1 0 1 0 0 1 1 int spy {*STB?} {rdValue} {} {setValue} {}
}
# The following 2 commands take no parameter - this makes them difficult to implement in a hipadaba structure
# because they would be nodes without values...
# input alarmResetAll 0 1 0 0 0 1 1 text user {} {rdValue} {ALMRST} {setValue} {}
# other reset_rst 0 1 0 0 0 1 1 text user {} {rdValue} {*RST} {setValue} {}
# input alarmResetAll 0 1 0 0 0 1 1 text user {} {rdValue} {ALMRST} {setValue} {}
# other reset_rst 0 1 0 0 0 1 1 text user {} {rdValue} {*RST} {setValue} {}
hfactory $scobj_hpath/status plain spy text
hsetprop $scobj_hpath/status values busy,idle
@ -1896,10 +1896,10 @@ proc add_lakeshore_336 {name IP port {terminator \r\n} {_tol1 1.0} {_tol2 1.0} {
if {[ catch {
if {[string equal -nocase "aqadapter" "${IP}"]} {
# dcl 2013-05-27: in this case the port is the name of the AsyncQueue
clientput "\add_lakeshore_336: makesctcontroller sct_ls336_$name aqadapter ${port} for Lakeshore model 336"
clientput "add_lakeshore_336: makesctcontroller sct_ls336_$name aqadapter ${port} for Lakeshore model 336"
makesctcontroller sct_ls336_$name aqadapter ${port}
} else {
clientput "\add_lakeshore_336: makesctcontroller sct_ls336_$name std ${IP}:$port $terminator for Lakeshore model 336"
clientput "add_lakeshore_336: makesctcontroller sct_ls336_$name std ${IP}:$port $terminator for Lakeshore model 336"
makesctcontroller sct_ls336_$name std ${IP}:$port $terminator
}
::scobj::ls336::mk_sct_lakeshore_336 sct_ls336_$name environment $name $CID $CTYPE $_tol1 $_tol2 $_verbose
@ -1945,6 +1945,8 @@ proc ::scobj::lakeshore_336::read_config {} {
continue
}
if { [string equal -nocase [dict get $v "driver"] "lakeshore_336"] } {
set driver [dict get $v driver]
${ns}::sics_log 9 "Found ${name}: $driver"
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
set asyncqueue "null"
@ -1956,6 +1958,7 @@ proc ::scobj::lakeshore_336::read_config {} {
set asyncprotocol [dict get $v "asyncprotocol"]
} else {
set asyncprotocol ${name}_protocol
${ns}::sics_log 9 "${name}:${driver}: MakeAsyncProtocol ${asyncprotocol}"
MakeAsyncProtocol ${asyncprotocol}
if { [dict exists $v "terminator"] } {
${asyncprotocol} sendterminator "[dict get $v "terminator"]"
@ -1965,6 +1968,7 @@ proc ::scobj::lakeshore_336::read_config {} {
set asyncqueue ${name}_queue
set IP [dict get $v ip]
set PORT [dict get $v port]
${ns}::sics_log 9 "${name}:${driver}: MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${IP} ${PORT}"
MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${IP} ${PORT}
if { [dict exists $v "timeout"] } {
${asyncqueue} timeout "[dict get $v "timeout"]"
@ -1979,6 +1983,7 @@ proc ::scobj::lakeshore_336::read_config {} {
error "Missing configuration value $arg"
}
}
${ns}::sics_log 9 "add_lakeshore_336 ${name} aqadapter ${asyncqueue} {*}$arg_list"
add_lakeshore_336 ${name} "aqadapter" ${asyncqueue} {*}$arg_list
}
}

View File

@ -2100,10 +2100,10 @@ proc add_lakeshore_340 {name IP port {terminator \r\n} {_tol1 1.0} {_tol2 1.0} {
if {[ catch {
set _ls340_LSmodel 340
if {[string equal -nocase "aqadapter" "${IP}"]} {
clientput "\add_lakeshore_340: makesctcontroller sct_ls340_$name aqadapter ${port} for Lakeshore model 340"
clientput "add_lakeshore_340: makesctcontroller sct_ls340_$name aqadapter ${port} for Lakeshore model 340"
makesctcontroller sct_ls340_$name aqadapter ${port}
} else {
clientput "\add_lakeshore_340: makesctcontroller sct_ls340_$name std ${IP}:$port $terminator for Lakeshore model 340"
clientput "add_lakeshore_340: makesctcontroller sct_ls340_$name std ${IP}:$port $terminator for Lakeshore model 340"
makesctcontroller sct_ls340_$name std ${IP}:$port $terminator
}
::scobj::ls340::mk_sct_lakeshore_340 sct_ls340_$name environment $name $CID $CTYPE $_ls340_LSmodel $_tol1 $_tol2 $_verbose
@ -2127,8 +2127,8 @@ 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"
clientput "file evaluation of sct_lakeshore_340.tcl"
::scobj::lakeshore_340::sics_log 9 "file evaluation of sct_lakeshore_340.tcl"
proc ::scobj::lakeshore_340::read_config {} {
set catch_status [ catch {
@ -2149,6 +2149,8 @@ proc ::scobj::lakeshore_340::read_config {} {
continue
}
if { [string equal -nocase [dict get $v "driver"] "lakeshore_340"] } {
set driver [dict get $v driver]
${ns}::sics_log 9 "Found ${name}: $driver"
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
set asyncqueue "null"
@ -2160,6 +2162,7 @@ proc ::scobj::lakeshore_340::read_config {} {
set asyncprotocol [dict get $v "asyncprotocol"]
} else {
set asyncprotocol ${name}_protocol
${ns}::sics_log 9 "${name}:${driver}: MakeAsyncProtocol ${asyncprotocol}"
MakeAsyncProtocol ${asyncprotocol}
if { [dict exists $v "terminator"] } {
${asyncprotocol} sendterminator "[dict get $v "terminator"]"
@ -2169,6 +2172,7 @@ proc ::scobj::lakeshore_340::read_config {} {
set asyncqueue ${name}_queue
set IP [dict get $v ip]
set PORT [dict get $v port]
${ns}::sics_log 9 "${name}:${driver}: MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${IP} ${PORT}"
MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${IP} ${PORT}
if { [dict exists $v "timeout"] } {
${asyncqueue} timeout "[dict get $v "timeout"]"
@ -2183,6 +2187,7 @@ proc ::scobj::lakeshore_340::read_config {} {
error "Missing configuration value $arg"
}
}
${ns}::sics_log 9 "add_lakeshore_340 ${name} aqadapter ${asyncqueue} {*}$arg_list"
add_lakeshore_340 ${name} "aqadapter" ${asyncqueue} {*}$arg_list
}
}

View File

@ -1,3 +1,87 @@
[12tmagnet_setup]
cascade = B1:12tmagnet_oxford,sample_stage:12tmagnet_sample_insert,T1:mercury_scpi_01
enabled = False
[CF1]
cascade = T1:CF1_ls340,sample_stage:normal_sample_stage
enabled = False
[Default]
cascade = sample_stage:normal_sample_stage
enabled = True
[B1]
enabled = False
id = 1
implementation = none
name = magnet1
optype = magnetic_field
[I1]
datype = I
enabled = False
id = 1
implementation = none
name = curr1
optype = multimeter
[I2]
datype = I
enabled = False
id = 2
implementation = none
name = curr2
optype = multimeter
[T1]
enabled = False
id = 1
implementation = none
name = tc1
optype = temperature
[T2]
enabled = False
id = 2
implementation = none
name = tc2
optype = temperature
[T3]
enabled = False
id = 3
implementation = none
name = tc3
optype = temperature
[T4]
enabled = False
id = 4
implementation = none
name = tc4
optype = temperature
[T5]
enabled = False
id = 5
implementation = none
name = tc5
optype = temperature
[T6]
enabled = False
id = 6
implementation = none
name = tc6
optype = temperature
[V1]
datype = V
enabled = False
id = 1
implementation = none
name = volts1
optype = multimeter
[V2]
datype = V
enabled = False
id = 2
implementation = none
name = volts2
optype = multimeter
[sample_stage]
enabled = Always
implementation = normal_sample_stage
name = sample_stage
optype = motion_axis
[12tmagnet_oxford]
desc = "12 Tesla Oxford Magnet"
driver = "oxford_labview"
@ -10,21 +94,6 @@ port = 55001
desc = "som will be redefined as the magnet sample insert rotation. Sample stage will be renamed to somss"
imptype = motion_axis
[12tmagnet_setup]
cascade = B1:12tmagnet_oxford,sample_stage:12tmagnet_sample_insert,T1:mercury_scpi_01
enabled = False
[B1]
enabled = False
id = 1
implementation = 12tmagnet_oxford
name = magnet1
optype = magnetic_field
[CF1]
cascade = T1:CF1_ls340,sample_stage:normal_sample_stage
enabled = False
[CF1_ls340]
desc = "cf1: Bottom loading cryofurnace"
driver = "lakeshore_340"
@ -35,63 +104,6 @@ terminator = \r\n
tol1 = 1.0
tol2 = 1.0
[Default]
cascade = sample_stage:normal_sample_stage
enabled = True
[I1]
datype = I
enabled = False
id = 1
implementation = protek_01
name = curr1
optype = multimeter
[I2]
datype = I
enabled = False
id = 2
implementation = protek_02
name = curr2
optype = multimeter
[T1]
enabled = False
id = 1
implementation = mercury_scpi_01
name = tc1
optype = temperature
[T2]
enabled = False
id = 2
implementation = ls340_01
name = tc2
optype = temperature
[T3]
enabled = False
id = 3
implementation = ls340_02
name = tc3
optype = temperature
[V1]
datype = V
enabled = False
id = 1
implementation = none
name = volts1
optype = multimeter
[V2]
datype = V
enabled = False
id = 2
implementation = none
name = volts2
optype = multimeter
[eularian_cradle]
desc = "Load the Eulerian cradle configuration"
imptype = motion_axis
@ -207,7 +219,7 @@ imptype = motion_axis
[protek_01]
desc = "Protek Multimeter"
driver = "protek"
driver = "protekmm"
id = 1
imptype = multimeter
ip = 10.157.205.36
@ -215,18 +227,12 @@ port = 4001
[protek_02]
desc = "Protek Multimeter"
driver = "protek"
driver = "protekmm"
id = 2
imptype = multimeter
ip = 10.157.205.37
port = 4001
[sample_stage]
enabled = Always
implementation = normal_sample_stage
name = sample_stage
optype = motion_axis
[small_omega]
desc = "Load the small omega configuration"
imptype = motion_axis