|
|
|
|
@@ -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
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|