Remove superfluous trailing white space from TCL files

This commit is contained in:
Douglas Clowes
2014-05-16 12:30:51 +10:00
parent 89e4e37f9e
commit 92d3acb5d5
230 changed files with 1835 additions and 1835 deletions

View File

@@ -1,5 +1,5 @@
##
# @file He3 controller
# @file He3 controller
#
# Author: Jing Chen (jgn@ansto.gov.au) June 2010
#
@@ -10,7 +10,7 @@
# PORT 6290
# tuning 1
# interval 2
# }
# }
#
# NOTE:
# If tuning=1 this will generate gom/set_gom, gchi/set_gchi and gphi/set_gphi
@@ -20,7 +20,7 @@
namespace eval ::scobj::he3 {
}
##
# @brief Request a state from the He3 controller by sending a get command
proc ::scobj::he3::rqStatFunc {} {
@@ -44,12 +44,12 @@ proc ::scobj::he3::rdStatFunc {basePath} {
hset $basePath/Amplitude $stateArr(amp)
hset $basePath/Frequence $stateArr(fre)
hset $basePath/NaN $stateArr(nan)
hset $basePath/T2 $stateArr(t2)
hset $basePath/NaN $stateArr(nan)
hset $basePath/T2 $stateArr(t2)
broadcast "Amp:$stateArr(amp); Fre:$stateArr(fre); NaN:$stateArr(nan); T2:$stateArr(t2)\n"
}
if {$replyStr != [sct oldval]} {
sct oldval $replyStr
sct update $replyStr
@@ -81,14 +81,14 @@ proc ::scobj::he3::checkReplyFunc {basePath} {
##
# @brief Make a He3 controller
#
# @param argList, {name "he3" IP localhost PORT 62900 tuning 1 interval 2}
#
# @param argList, {name "he3" IP localhost PORT 62900 tuning 1 interval 2}
#
# name: name of he3 controller object
# IP: IP address of RF generator moxa box
# PORT: Port number assigned to the generator on the moxa-box
# tuning: boolean, set tuning=1 to allow instrument scientists to set the axe positions
# interval: polling and ramping interval in seconds.
# interval: polling and ramping interval in seconds.
proc ::scobj::he3::mkHe3 {argList} {
# Generate parameter array from the argument list
foreach {k v} $argList {
@@ -136,8 +136,8 @@ proc ::scobj::he3::mkHe3 {argList} {
hsetprop $hdbPath mutable $mutable
hsetprop $hdbPath sdsinfo ::nexus::scobj::sdsinfo
}
::scobj::hinitprops $pa(NAME)
::scobj::hinitprops $pa(NAME)
makesctcontroller sct_he3 std $pa(IP):$pa(PORT)
@@ -145,7 +145,7 @@ proc ::scobj::he3::mkHe3 {argList} {
hsetprop $hPath rdState ::scobj::he3::rdStatFunc $hPath
# Initialise properties required for generating the API for GumTree and to save data
#::scobj::hinitprops $pa(NAME) Amplitude Frequence NaN T2
#::scobj::hinitprops $pa(NAME) Amplitude Frequence NaN T2
if {[SplitReply [environment_simulation]]=="false"} {
sct_he3 poll $hPath $pa(INTERVAL)
@@ -158,7 +158,7 @@ proc ::scobj::he3::mkHe3 {argList} {
::scobj::hinitprops $pa(NAME) send_trigger
hsetprop $hPath/send_trigger write ::scobj::he3::sendTrigger
hsetprop $hPath/send_trigger write ::scobj::he3::sendTrigger
hsetprop $hPath/send_trigger checkReply ::scobj::he3::checkReplyFunc /sics/$pa(NAME)
if {[SplitReply [environment_simulation]]=="false"} {
@@ -173,7 +173,7 @@ proc He3Trigger {} {
sct_he3 send $cmd
}
publish He3Trigger user
publish He3Trigger user
# main driver call

View File

@@ -575,7 +575,7 @@ proc ExtractValue {response lastQueryCmd} {
# update the node last_error_msg
hset $::scobj::bruker_BEC1::bruker_BEC1_path2nodes/emon/last_error_msg $::scobj::bruker_BEC1::bruker_BEC1_errMsg
hset $::scobj::bruker_BEC1::bruker_BEC1_path2nodes/emon/last_error_msg2 $::scobj::bruker_BEC1::bruker_BEC1_errMsg2
#if { 0 != [string compare -length 4 $lastQueryCmd "POL/"]
#if { 0 != [string compare -length 4 $lastQueryCmd "POL/"]
# || $::scobj::bruker_BEC1::bruker_BEC1_polarityUnitAbsent == false} {
#}
}
@@ -1318,7 +1318,7 @@ proc mk_sct_bruker_BEC1 {sct_controller klasse tempobj tol CID CTYPE} {
# for generating the GumTree interface and saving data for script context objects (hdf file)
# @param scobj, name of script context object (path to a node)
# @param par, optional parameter (name of the node variable)
# Changed ffr 20100625: do not call hinitprops to avoid a conflict with a change in SICServer vers. 2_5
#::scobj::hinitprops $tempobj/sensor nominal_outp_current
hsetprop $scobj_hpath/pwrctrl/statusByte control false

View File

@@ -1,5 +1,5 @@
##
# @file Green Magnetic Controller
# @file Green Magnetic Controller
#
# This is a driver for SICS to make following communication with the Labview Green Magnet device
#
@@ -67,14 +67,14 @@ proc ::scobj::green::rqGreenMagnetFunc {basePath} {
##
# @brief Make a Green Magnet Controller
#
# @param argList, {name "magnetic" IP localhost PORT 65123 tuning 1 interval 1}
#
# @param argList, {name "magnetic" IP localhost PORT 65123 tuning 1 interval 1}
#
# name: name of green magnet controller object
# IP: IP address of RF generator moxa box
# POT: Port number assigned to the generator on the moxa-box
# tuning: boolean, set tuning=1 to allow instrument scientists to set the axe positions
# interval: polling and ramping interval in seconds.
# interval: polling and ramping interval in seconds.
proc ::scobj::green::mkGreen {argList} {
# Generate parameter array from the argument list
@@ -84,12 +84,12 @@ proc ::scobj::green::mkGreen {argList} {
}
MakeSICSObj $pa(NAME) SCT_OBJECT
sicslist setatt $pa(NAME) klass environment
sicslist setatt $pa(NAME) klass environment
sicslist setatt $pa(NAME) long_name $pa(NAME)
set scobj_hpath /sics/$pa(NAME)
hfactory $scobj_hpath/output plain user float
hfactory $scobj_hpath/output plain user float
hfactory $scobj_hpath/PSU_Vol plain user float
hfactory $scobj_hpath/ramping_rate plain user text
hfactory $scobj_hpath/insTarget plain user float
@@ -118,7 +118,7 @@ proc ::scobj::green::mkGreen {argList} {
hsetprop $scobj_hpath type part
hsetprop $scobj_hpath control true
hsetprop $scobj_hpath data true
foreach {hpath klass control data nxsave mutable priv alias} {
output NXenvironment true true true true user green_output
PSU_Vol NXenvironment true true true true user green_PSU_Vol
@@ -143,11 +143,11 @@ proc ::scobj::green::mkGreen {argList} {
hsetprop $scobj_hpath/pollNode oldval "UNKNOWN"
#if {[SplitReply [environment_simulation]]=="false"} {
sct_green poll $scobj_hpath/pollNode $pa(INTERVAL)
#}
sct_green poll $scobj_hpath/pollNode $pa(INTERVAL)
#}
}
# Set the magnetic voltage field
# Set the magnetic voltage field
proc greenVol {{vol ""} args} {
set NAME "green_magnet"
@@ -156,7 +156,7 @@ proc greenVol {{vol ""} args} {
} else {
if {$vol<[SplitReply [hgetprop /sample/$NAME/output lowlimit]] || \
$vol>[SplitReply [hgetprop /sample/$NAME/output uplimit]]} {
return -code error "setpoint violates limits"
return -code error "setpoint violates limits"
} else {
if {$vol > [hval /sample/$NAME/Bmax]} {
broadcast "Maximum field limit is [hval /sample/$NAME/Bmax], reset again!"
@@ -164,7 +164,7 @@ proc greenVol {{vol ""} args} {
} else {
#hset /sample/$NAME/setPoint $vol
set comm "set $vol\r\n"
sct_green send $comm
sct_green send $comm
#after 2000
#while {[hval /sample/$NAME/status] == "busy"} {
# broadcast "Magnet Ramping at [hval /sample/$NAME/output]"
@@ -192,7 +192,7 @@ publish greenVol user
#PORT 22
::scobj::green::mkGreen {
name "green_magnet"
IP 137.157.204.57
IP 137.157.204.57
PORT 22
tuning 1
interval 3

View File

@@ -190,8 +190,8 @@ debug_log "rdState $tc_root state=$my_state"
} elseif {$my_state == "STATE_UNIT"} {
hsetprop $tc_root/ls460_state my_state "STATE_CHNL_SET"
hsetprop [sct] unit [sct result]
hsetprop $tc_root/Display/$my_chan units [SplitReply [hgetprop [sct] unit]]
hsetprop $tc_root/Display/$my_chan mult [SplitReply [hgetprop [sct] mult]]
hsetprop $tc_root/Display/$my_chan units [SplitReply [hgetprop [sct] unit]]
hsetprop $tc_root/Display/$my_chan mult [SplitReply [hgetprop [sct] mult]]
hsetprop $tc_root/Display/$my_chan field [SplitReply [hgetprop [sct] field]]
switch -exact [SplitReply [hgetprop [sct] mult]] {
"u" { set multiplier 0.000001 }

View File

@@ -166,7 +166,7 @@ debug_log "getState $tc_root $nextState $cmd sct=[sct]"
} elseif {$my_state == "STATE_I"} {
if { [hval $tc_root/Display/H] == 1 } {
set my_cmd "I[hval $tc_root/Display/OutputCurrent]"
} elseif { ([hval $tc_root/Display/H] == 0 || [hval $tc_root/Display/H] == 2) } {
} elseif { ([hval $tc_root/Display/H] == 0 || [hval $tc_root/Display/H] == 2) } {
set my_cmd "I[hval $tc_root/Display/PstntCurrent]"
}
} elseif {$my_state == "STATE_J"} {

View File

@@ -1,5 +1,5 @@
##
# @file Magnetic Controller
# @file Magnetic Controller
#
# This is a driver for SICS to make following communication with the Labview Oxford device
#
@@ -37,13 +37,13 @@ proc ::scobj::magnetic::setting {field basePath} {
switch -exact $field {
"field" {set comm "setF $fieldVal\r\n"
hset $basePath/fieldSetPoint $fieldVal
hset $basePath/fieldSetPoint $fieldVal
}
"rate" {set comm "setR $fieldVal\r\n"
hset $basePath/fieldSetRate $fieldVal
hset $basePath/fieldSetRate $fieldVal
}
"DiluxTemp" {set comm "setDilutTemp $fieldVal\r\n"
hset $basePath/DilutTempSetPoint $fieldVal
hset $basePath/DilutTempSetPoint $fieldVal
}
"HelioxTemp" {set comm "setHelioxTemp $fieldVal\r\n"
hset $basePath/HelioxTempSetPoint $fieldVal
@@ -181,7 +181,7 @@ proc ::scobj::magnetic::rdTempStateFunc {basePath field} {
hset $basePath/Temp_s1 $paraArr(T1)
hset $basePath/Temp_s2 $paraArr(T2)
hset $basePath/Temp_s3 $paraArr(T3)
set logText "Displayed Temp : $paraArr(T1) $paraArr(T2) $paraArr(T3)"
}
"Heliox" {set s1 [string trimright $replyStr "\n"]
@@ -222,14 +222,14 @@ proc ::scobj::magnetic::rdTempStateFunc {basePath field} {
##
# @brief Make a Magnetic Controller
#
# @param argList, {name "magnetic" IP localhost PORT 65123 tuning 1 interval 1}
#
# @param argList, {name "magnetic" IP localhost PORT 65123 tuning 1 interval 1}
#
# name: name of magnetic controller object
# IP: IP address of RF generator moxa box
# POT: Port number assigned to the generator on the moxa-box
# tuning: boolean, set tuning=1 to allow instrument scientists to set the axe positions
# interval: polling and ramping interval in seconds.
# interval: polling and ramping interval in seconds.
proc ::scobj::magnetic::mkMagnetic {argList} {
# Generate parameter array from the argument list
@@ -244,7 +244,7 @@ proc ::scobj::magnetic::mkMagnetic {argList} {
set hPath /sics/$pa(NAME)
hfactory $hPath/field plain user text
hfactory $hPath/field plain user text
hfactory $hPath/magneticFieldCurrent plain user float
hfactory $hPath/magneticFieldTesla plain user float
@@ -274,10 +274,10 @@ proc ::scobj::magnetic::mkMagnetic {argList} {
hset $hPath/magneticFieldTesla 10
hset $hPath/fieldSetPoint 0
# Setting Heliox Temperature & initiate
# Setting Heliox Temperature & initiate
hfactory $hPath/HelioxTempSetPoint plain user float
# This feature needs to implement the Labview code to get current reading of the Heliox tempterature
hfactory $hPath/HelioxTempReading plain user float
hfactory $hPath/HelioxTempReading plain user float
hset $hPath/HelioxTempSetPoint 0
hset $hPath/HelioxTempReading 0
@@ -294,7 +294,7 @@ proc ::scobj::magnetic::mkMagnetic {argList} {
hsetprop $hPath/field oldval UNKNOWN
hsetprop $hPath/HelioxTempReading oldval UNKNOWN
hsetprop $hPath/DilutTempReading oldval UNKNOWN
# add HDB file
hsetprop $hPath klass environment
hsetprop $hPath privilege spy
@@ -323,7 +323,7 @@ proc ::scobj::magnetic::mkMagnetic {argList} {
}
# Initialise properties required for generating the API for GumTree and to save data
::scobj::hinitprops $pa(NAME)
::scobj::hinitprops $pa(NAME)
# proc ::histogram_memory::pre_count "{fPath $pa(NAME)}" {
# hset /sics/$fPath/start_magnetic [hval /sics/$fPath/magneticFieldCurrent]
@@ -343,7 +343,7 @@ proc ::scobj::magnetic::mkMagnetic {argList} {
makesctcontroller sct_magnetic std $pa(IP):$pa(PORT)
hsetprop $hPath/field read ::scobj::magnetic::rqFieldFunc
hsetprop $hPath/field read ::scobj::magnetic::rqFieldFunc
hsetprop $hPath/field rdFieldState ::scobj::magnetic::rdFieldStateFunc $hPath
hsetprop $hPath/Temp read ::scobj::magnetic::rqTempFunc "sample"
@@ -356,11 +356,11 @@ proc ::scobj::magnetic::mkMagnetic {argList} {
hsetprop $hPath/DilutTempReading rdTempState ::scobj::magnetic::rdTempStateFunc $hPath "Dilut"
if {[SplitReply [environment_simulation]]=="false"} {
sct_magnetic poll $hPath/field $pa(INTERVAL)
sct_magnetic poll $hPath/field $pa(INTERVAL)
sct_magnetic poll $hPath/Temp $pa(INTERVAL)
sct_magnetic poll $hPath/HelioxTempReading $pa(INTERVAL)
sct_magnetic poll $hPath/DilutTempReading $pa(INTERVAL)
}
}
hsetprop $hPath tuning $pa(TUNING)
@@ -372,25 +372,25 @@ proc ::scobj::magnetic::mkMagnetic {argList} {
hfactory $hPath/set_HeaterSwitch plain user text
hsetprop $hPath/set_magneticField write ::scobj::magnetic::setting "field" $hPath
hsetprop $hPath/set_rate write ::scobj::magnetic::setting "rate" $hPath
hsetprop $hPath/set_rate write ::scobj::magnetic::setting "rate" $hPath
hsetprop $hPath/set_DiluxTemp write ::scobj::magnetic::setting "DiluxTemp" $hPath
hsetprop $hPath/set_HelioxTemp write ::scobj::magnetic::setting "HelioxTemp" $hPath
hsetprop $hPath/set_HeaterSwitch write ::scobj::magnetic::setting "HeaterS" $hPath
hsetprop $hPath/set_magneticField checkReply ::scobj::magnetic::checkReplyFunc $hPath
hsetprop $hPath/set_magneticField checkReply ::scobj::magnetic::checkReplyFunc $hPath
if {[SplitReply [environment_simulation]]=="false"} {
sct_magnetic write $hPath/set_rate
sct_magnetic write $hPath/set_magneticField
sct_magnetic write $hPath/set_magneticField
sct_magnetic write $hPath/set_DiluxTemp
sct_magnetic write $hPath/set_HelioxTemp
sct_magnetic write $hPath/set_HeaterSwitch
}
}
}
}
# Querying/Setting the magnetic field
# command is : OxfordSetField fieldValue P ; where "P" is an optinal parameter and if set will change
# Querying/Setting the magnetic field
# command is : OxfordSetField fieldValue P ; where "P" is an optinal parameter and if set will change
# to posistent mode after changig the magnetic field
proc OxfordSetField {{setPoint ""} {mode ""} args} {
set NAME "magnetic"
@@ -405,10 +405,10 @@ proc OxfordSetField {{setPoint ""} {mode ""} args} {
if {$mode == ""} {
set comm "setF $setPoint\r\n"
sct_magnetic send $comm
sct_magnetic send $comm
} elseif {$mode == "P"} {
set comm "setF $setPoint Pers\r\n"
sct_magnetic send $comm
sct_magnetic send $comm
} else {
broadcast "Wrong parameters being provided, check!"
return

View File

@@ -78,7 +78,7 @@ debug_log "setPoint: sct=[sct] target=[sct target] writestatus=[sct writestatus]
set err_msg "Invalid Pallet_ Num: [hval $tc_root/Control/Pallet_Nam]"
} elseif { [hval $tc_root/Control/Pallet_Idx] < 1 || [hval $tc_root/Control/Pallet_Idx] > 50 } {
set err_msg "Invalid Pallet_Idx: [hval $tc_root/Control/Pallet_Idx]"
}
}
if { $err_msg != "" } {
sct print "error:$err_msg"
debug_log "error:$err_msg"

View File

@@ -101,14 +101,14 @@ debug_log "chkWrite new data for $tc_root [sct] result=\"$data\""
set data [expr {[sct target]}]
if { $data < 1 || $data > 6 } {
set err_msg "Invalid Position: $data"
}
}
if { $err_msg != "" } {
sct print "error:$err_msg"
debug_log "error:$err_msg"
return -code error "$err_msg"
}
if { [hval $tc_root/Control/Direction] == "cw" } {
set par "0"
set par "0"
} elseif { [hval $tc_root/Control/Direction] == "ccw" } {
set par "1"
} else {
@@ -117,13 +117,13 @@ debug_log "chkWrite new data for $tc_root [sct] result=\"$data\""
sct oldval 1
}
if {($data - [sct oldval]) < -2} {
set par "0"
set par "0"
} elseif {($data - [sct oldval]) < 0} {
set par "1"
set par "1"
} elseif {($data - [sct oldval]) > 3} {
set par "1"
set par "1"
} else {
set par "0"
set par "0"
}
}
if {$data != [sct oldval]} {

View File

@@ -33,9 +33,9 @@
# PERCENT2:1/0 dBm2:1/0
# m2:1/0 V2:1/0 A2:1/0 DEGK2:1/0
# G2:1/0 M2:1/0 k2:1/0 OHM2:1/0 Hz2:1/0
# ROTSWITCH:[0-8]
### The return values for nine bytes is undocumented,
### they are labelled as X1 to X9
# X[1-9]:?
@@ -125,7 +125,7 @@ proc MakeProtek {name IP PORT {scale 1.0} {offset 0.0} {interval 0.5} {cbFunc "r
sicslist setatt $sobjName long_name $sobjName
hfactory /sics/$soState/state plain user text
hsetprop /sics/$soState/state read rqStateRep
hsetprop /sics/$soState/state read rqStateRep
hsetprop /sics/$soState/state rdStateRep rdStateRep
hsetprop /sics/$soState/state oldval "UNKNOWN"
hsetprop /sics/$sobjName read rqVal "reportVal"

View File

@@ -6,7 +6,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
#
# This file contains the implementation of a driver for the Lakeshore 218
# This file contains the implementation of a driver for the Lakeshore 218
# controller implemented as a scriptcontext object in TCL.
# object in TCL.
#
@@ -43,7 +43,7 @@ proc ::scobj::ls218::getValue {idx cmd chID nextState} {
if {[ catch {
if {[hpropexists [sct] geterror]} {
hdelprop [sct] geterror
}
}
if {$chID == 1} {
set comm "$cmd $idx"
@@ -57,7 +57,7 @@ proc ::scobj::ls218::getValue {idx cmd chID nextState} {
}
} else {
return -code error "in getValue: error input Ch ID"
}
}
sct send "$comm\r\n"
} message ]} {
return -code error "in getValue: $message"
@@ -79,7 +79,7 @@ proc ::scobj::ls218::rdValue {nodeName varName idx} {
if {[string first "ASCERR" $replyData] != -1} {
sct geterror $replyData
return -code error "Error in LS218 Response: $replyData"
return -code error "Error in LS218 Response: $replyData"
} elseif {[string length $replyData] < 1} {
return -code error "Error in LS218: no message returned from device"
} else {
@@ -88,7 +88,7 @@ proc ::scobj::ls218::rdValue {nodeName varName idx} {
}
switch -exact $varName {
"alarm" { if {[lindex $fields 0] == 0} {
"alarm" { if {[lindex $fields 0] == 0} {
hset $nodeName/offOn off
} else {
hset $nodeName/offOn on
@@ -105,7 +105,7 @@ proc ::scobj::ls218::rdValue {nodeName varName idx} {
hset $nodeName/deadband [lindex $fields 4]
hset $nodeName/latchEnable [lindex $fields 5]
}
"aStatus" { if {[lindex $fields 0] == 0} {
"aStatus" { if {[lindex $fields 0] == 0} {
hset $nodeName/highStatus Unactivated
} else {
hset $nodeName/highStatus Activated
@@ -116,8 +116,8 @@ proc ::scobj::ls218::rdValue {nodeName varName idx} {
hset $nodeName/lowStatus Activated
}
}
"Celsius" { hset $nodeName [lindex $fields 0]
set curValue [lindex $fields 0]
"Celsius" { hset $nodeName [lindex $fields 0]
set curValue [lindex $fields 0]
}
"CurveHd" { hset $nodeName/curve [lindex $fields 0]
hset $nodeName/name [lindex $fields 1]
@@ -127,7 +127,7 @@ proc ::scobj::ls218::rdValue {nodeName varName idx} {
3 {hset $nodeName/format Ohm/K}
4 {hset $nodeName/format "log Ohm/K"}
default {}
}
}
hset $nodeName/limitValue [lindex $fields 4]
switch -exact [lindex $fields 5] {
1 {hset $nodeName/coefficient negative}
@@ -165,7 +165,7 @@ proc ::scobj::ls218::rdValue {nodeName varName idx} {
default { hset $nodeName UNKNOW}
}
}
"Kelvin" { hset $nodeName $fields
"Kelvin" { hset $nodeName $fields
#append $logString " Kelvin - $fields;"
set curValue $fields
}
@@ -178,7 +178,7 @@ proc ::scobj::ls218::rdValue {nodeName varName idx} {
default { hset $nodeName/xSource UNKNOW}
}
}
"LinearEquData" { hset $nodeName $fields
"LinearEquData" { hset $nodeName $fields
set curValue $fields
}
"mnmxSource" { switch -exact [lindex $fields 0] {
@@ -190,17 +190,17 @@ proc ::scobj::ls218::rdValue {nodeName varName idx} {
}
}
"mnmxValue" { hset $nodeName "[lindex $fields 0] , [lindex $fields 1]"}
"status" {
"status" {
# RDGST? chID Reads input status returns an integer with the following meaning
# Bit Weighting StatusIndicator
# 4 16 temp underrange
# 5 32 temp overrange
# 6 64 units under range
# 7 128 untis over range
# 6 64 units under range
# 7 128 untis over range
set field [string trimleft $fields 0]
if {[string length $field] == 0} {
set field 0
}
}
set str ""
set i [format %x $field]
@@ -219,11 +219,11 @@ proc ::scobj::ls218::rdValue {nodeName varName idx} {
hset $nodeName $str
}
"SensorUnitValue" { hset $nodeName $fields
"SensorUnitValue" { hset $nodeName $fields
#append $logString " SensorUnitValue - $fields;"
set curValue $fields
}
"data" { hset $nodeName $fields
"data" { hset $nodeName $fields
set curValue $fields
}
"aOutput" { switch -exact [lindex $fields 0] {
@@ -247,7 +247,7 @@ proc ::scobj::ls218::rdValue {nodeName varName idx} {
}
hset $nodeName/highValue [lindex $fields 4]
hset $nodeName/lowValue [lindex $fields 5]
hset $nodeName/manualValue [lindex $fields 6]
hset $nodeName/manualValue [lindex $fields 6]
}
"IDN" { hset $nodeName/manufacturer [lindex $fields 0]
hset $nodeName/model [lindex $fields 1]
@@ -273,7 +273,7 @@ proc ::scobj::ls218::rdValue {nodeName varName idx} {
default { hset $nodeName/alarmType UNKNOW }
}
}
default { return -code error "in rdValue: wrong input parameter"}
default { return -code error "in rdValue: wrong input parameter"}
}
if {$curValue != [sct oldval]} {
sct oldval $curValue
@@ -310,7 +310,7 @@ proc ::scobj::ls218::rdValue {nodeName varName idx} {
# @param type attribute for HDB tree
# @param nxsave attribute for HDB tree
# @param mutable attribute for HDB tree
# @param nxalias attribute for HDB tree
# @param nxalias attribute for HDB tree
# @return OK
proc createNode {scobj_hpath idx sct_controller cmdGroup varName readable pollEnabled dataType permission rdCmd chID rdFunc} {
@@ -341,9 +341,9 @@ proc createNode {scobj_hpath idx sct_controller cmdGroup varName readable pollEn
}
if {$readable == 1} {
hsetprop $nodeName read ${ns}::getValue $idx $rdCmd $chID rdFuncState
hsetprop $nodeName read ${ns}::getValue $idx $rdCmd $chID rdFuncState
hsetprop $nodeName rdFuncState ${ns}::rdValue $nodeName $varName $idx
hsetprop $nodeName oldval UNKNOW
hsetprop $nodeName oldval UNKNOW
}
if {$pollEnabled == 1} {
if {[SplitReply [environment_simulation]]=="false"} {
@@ -397,13 +397,13 @@ proc ::scobj::ls218::mkLS218 {argList} {
makesctcontroller sct_$pa(NAME) std $pa(IP):$pa(PORT)
# create parent nodes for input, output, and relay
# create parent nodes for input, output, and relay
foreach chanType {input output relay} {
switch -exact $chanType {
"input" {set chanList $pa(INPUTCHAN)}
"output" {set chanList $pa(OUTPUTCHAN)}
"relay" {set chanList $pa(RELAYCHAN)}
}
}
if {[string length $chanList] > 0} {
set hPath $scobj_hpath/$chanType
hfactory $hPath plain user none
@@ -443,7 +443,7 @@ proc ::scobj::ls218::mkLS218 {argList} {
# rdFunc nextState Function to be called after the getValue function, typically rdValue()
# hdbTree set to 1 if a HDB needs to be created at the node
# klass type of klass of the HDB node
# control type of contrl of the HDB node
# control type of contrl of the HDB node
# data type of data of the HDB node
# priv type of previlige level of the HDB node
# type type of the HDB node
@@ -453,35 +453,35 @@ proc ::scobj::ls218::mkLS218 {argList} {
###########################################################################################################
set inputNodes {
{} alarm 1 1 none user {ALARM?} 1 {rdValue}
alarm offOn 0 0 text user {} 0 {}
alarm source 0 0 text user {} 0 {}
alarm highValue 0 0 float user {} 0 {}
alarm lowValue 0 0 float user {} 0 {}
alarm deadband 0 0 float user {} 0 {}
alarm latchEnable 0 0 int user {} 0 {}
{} aStatus 1 1 none user {ALARMST?} 1 {rdValue}
aStatus highStatus 0 0 text user {} 0 {}
aStatus lowStatus 0 0 text user {} 0 {}
{} alarm 1 1 none user {ALARM?} 1 {rdValue}
alarm offOn 0 0 text user {} 0 {}
alarm source 0 0 text user {} 0 {}
alarm highValue 0 0 float user {} 0 {}
alarm lowValue 0 0 float user {} 0 {}
alarm deadband 0 0 float user {} 0 {}
alarm latchEnable 0 0 int user {} 0 {}
{} aStatus 1 1 none user {ALARMST?} 1 {rdValue}
aStatus highStatus 0 0 text user {} 0 {}
aStatus lowStatus 0 0 text user {} 0 {}
{} Celsius 1 1 float user {CRDG?} 1 {rdValue}
{} CurveHd 1 1 none user {CRVHDR?} 0 {rdValue}
CurveHd curve 0 0 text user {} 0 {}
CurveHd name 0 0 text user {} 0 {}
CurveHd SN 0 0 text user {} 0 {}
CurveHd format 0 0 text user {} 0 {}
CurveHd limitValue 0 0 float user {} 0 {}
CurveHd coefficient 0 0 text user {} 0 {}
{} CurveID 1 1 text user {INCRV?} 1 {rdValue}
{} control 1 1 text user {INPUT?} 1 {rdValue}
{} inputType 1 1 text user {INTYPE?} G {rdValue}
{} CurveHd 1 1 none user {CRVHDR?} 0 {rdValue}
CurveHd curve 0 0 text user {} 0 {}
CurveHd name 0 0 text user {} 0 {}
CurveHd SN 0 0 text user {} 0 {}
CurveHd format 0 0 text user {} 0 {}
CurveHd limitValue 0 0 float user {} 0 {}
CurveHd coefficient 0 0 text user {} 0 {}
{} CurveID 1 1 text user {INCRV?} 1 {rdValue}
{} control 1 1 text user {INPUT?} 1 {rdValue}
{} inputType 1 1 text user {INTYPE?} G {rdValue}
{} Kelvin 1 1 float user {KRDG?} 1 {rdValue}
{} Linear 1 1 none user {LINEAR?} 1 {rdValue}
Linear varM 0 0 float user {} 0 {}
Linear xSource 0 0 text user {} 0 {}
Linear varB 0 0 float user {} 0 {}
{} LinearEquData 1 1 float user {LRDG?} 1 {rdValue}
{} mnmxSource 1 1 text user {MNMX?} 1 {rdValue}
{} mnmxValue 1 1 text user {MNMXRDG?} 1 {rdValue}
{} Linear 1 1 none user {LINEAR?} 1 {rdValue}
Linear varM 0 0 float user {} 0 {}
Linear xSource 0 0 text user {} 0 {}
Linear varB 0 0 float user {} 0 {}
{} LinearEquData 1 1 float user {LRDG?} 1 {rdValue}
{} mnmxSource 1 1 text user {MNMX?} 1 {rdValue}
{} mnmxValue 1 1 text user {MNMXRDG?} 1 {rdValue}
{} status 1 1 text user {RDGST?} 1 {rdValue}
{} SensorUnitValue 1 1 float user {SRDG?} 1 {rdValue}
}
@@ -489,33 +489,33 @@ proc ::scobj::ls218::mkLS218 {argList} {
set outputNodes {
{} data 1 1 float user {AOUT?} 1 {rdValue}
{} aOutput 1 1 none user {ANALOG?} 1 {rdValue}
aOutput bipolarEnable 0 0 text user {} 0 {}
aOutput monitorMode 0 0 text user {} 0 {}
aOutput inputChID 0 0 int user {} 0 {}
aOutput source 0 0 text user {} 0 {}
aOutput highValue 0 0 float user {} 0 {}
aOutput lowValue 0 0 float user {} 0 {}
aOutput manualValue 0 0 int user {} 0 {}
aOutput bipolarEnable 0 0 text user {} 0 {}
aOutput monitorMode 0 0 text user {} 0 {}
aOutput inputChID 0 0 int user {} 0 {}
aOutput source 0 0 text user {} 0 {}
aOutput highValue 0 0 float user {} 0 {}
aOutput lowValue 0 0 float user {} 0 {}
aOutput manualValue 0 0 int user {} 0 {}
}
set relayNodes {
{} relay 1 1 none user {RELAY?} 1 {rdValue}
relay mode 0 0 text user {} 0 {}
relay input 0 0 int user {} 0 {}
relay alarmType 0 0 text user {} 0 {}
{} relay 1 1 none user {RELAY?} 1 {rdValue}
relay mode 0 0 text user {} 0 {}
relay input 0 0 int user {} 0 {}
relay alarmType 0 0 text user {} 0 {}
}
set otherNodes {
{} IDN 1 1 none user {*IDN?} 0 {rdValue}
IDN manufacturer 0 0 text user {} 0 {}
IDN model 0 0 text user {} 0 {}
IDN serialNumber 0 0 text user {} 0 {}
IDN firmwareDate 0 0 text user {} 0 {}
{} logStatus 1 1 text user {LOG?} 0 {rdValue}
{} IDN 1 1 none user {*IDN?} 0 {rdValue}
IDN manufacturer 0 0 text user {} 0 {}
IDN model 0 0 text user {} 0 {}
IDN serialNumber 0 0 text user {} 0 {}
IDN firmwareDate 0 0 text user {} 0 {}
{} logStatus 1 1 text user {LOG?} 0 {rdValue}
}
# create sub-tree for all 8 input channels
foreach idx $pa(INPUTCHAN) {
foreach idx $pa(INPUTCHAN) {
foreach {cmdGroup varName readable pollEnabled dataType permission rdCmd chID rdFunc} $inputNodes {
createNode $scobj_hpath/input $idx sct_$pa(NAME) $cmdGroup $varName $readable $pollEnabled $dataType $permission $rdCmd $chID $rdFunc
}
@@ -535,7 +535,7 @@ proc ::scobj::ls218::mkLS218 {argList} {
}
}
# create "other" sub-tree
# create "other" sub-tree
foreach {cmdGroup varName readable pollEnabled dataType permission rdCmd chID rdFunc} $otherNodes {
createNode $scobj_hpath/other 0 sct_$pa(NAME) $cmdGroup $varName $readable $pollEnabled $dataType $permission $rdCmd $chID $rdFunc
}
@@ -572,9 +572,9 @@ proc ::scobj::ls218::mkLS218 {argList} {
if {[string length $pa(INPUTCHAN)] > 0} {
foreach idx $pa(INPUTCHAN) {
foreach {item klass control data nxsave mutable priv alias} {
Celsius sensor true true true true user Celsius
Celsius sensor true true true true user Celsius
Kelvin sensor true true true true user Kelvin
SensorUnitValue sensor true true true true user SensorUnitValue
SensorUnitValue sensor true true true true user SensorUnitValue
} {
set hpath /sics/ls218/input/ch$idx/$item
hsetprop $hpath nxalias ls218-input-ch$idx-$alias
@@ -594,11 +594,11 @@ proc ::scobj::ls218::mkLS218 {argList} {
set hpath /sics/ls218/output/ch$idx/data
hsetprop $hpath nxalias ls218-output-ch$idx-data
hsetprop $hpath klass sensor
hsetprop $hpath privilege user
hsetprop $hpath control true
hsetprop $hpath data true
hsetprop $hpath nxsave true
hsetprop $hpath mutable true
hsetprop $hpath privilege user
hsetprop $hpath control true
hsetprop $hpath data true
hsetprop $hpath nxsave true
hsetprop $hpath mutable true
hsetprop $hpath sdsinfo ::nexus::scobj::sdsinfo
}
}
@@ -610,7 +610,7 @@ proc ::scobj::ls218::mkLS218 {argList} {
}
}
# end of namespace ::scobj::ls218
# end of namespace ::scobj::ls218
# Main process call
# @param name short name for the Lakeshore Temp controller 218

View File

@@ -1718,7 +1718,7 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p
hfactory $scobj_hpath/sensor plain spy none
# Flags ls340 and ls336 indicate whether this command is support by Lakeshore model ls340 and ls336, respectively
foreach {cmdGroup varName readable writable pollEnabled drivable idx ls340 ls336 dataType permission rdCmd rdFunc wrCmd wrFunc allowedValues} $deviceCommandToplevel {
createNode $scobj_hpath $sct_controller $cmdGroup $varName $readable $writable $pollEnabled $drivable $idx $ls340 $ls336 $dataType $permission $rdCmd $rdFunc $wrCmd $wrFunc $allowedValues $klasse
createNode $scobj_hpath $sct_controller $cmdGroup $varName $readable $writable $pollEnabled $drivable $idx $ls340 $ls336 $dataType $permission $rdCmd $rdFunc $wrCmd $wrFunc $allowedValues $klasse
}
# create a base node for each commandGroup element - these are all polled
@@ -1729,7 +1729,7 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p
hfactory $scobj_hpath/other plain spy none
foreach {cmdGroup varName readable writable pollEnabled drivable idx ls340 ls336 dataType permission rdCmd rdFunc wrCmd wrFunc allowedValues} $deviceCommand {
createNode $scobj_hpath $sct_controller $cmdGroup $varName $readable $writable $pollEnabled $drivable $idx $ls340 $ls336 $dataType $permission $rdCmd $rdFunc $wrCmd $wrFunc $allowedValues $klasse
createNode $scobj_hpath $sct_controller $cmdGroup $varName $readable $writable $pollEnabled $drivable $idx $ls340 $ls336 $dataType $permission $rdCmd $rdFunc $wrCmd $wrFunc $allowedValues $klasse
# helpNotes4user $scobj_hpath $cmdGroup $varName
}

View File

@@ -228,7 +228,7 @@ namespace eval ::scobj::[set vendor]_[set device] {
return -code error "[sct geterror]"
}
if { $ramp_rate < 0.001 || $ramp_rate > 10 } {
if { $ramp_enable == 1 } {
if { $ramp_enable == 1 } {
sct geterror "RAMP bad rate from [sct result]"
return -code error "[sct geterror]"
}

View File

@@ -811,7 +811,7 @@ namespace eval ::scobj::[set vendor]_[set device] {
hsetprop $scobj_hpath klass parameter
hsetprop $scobj_hpath sdsinfo ::nexus::scobj::sdsinfo
set point 1
if {0} {
if {0} {
::scobj::hinitprops $the_name Loop1
set point 2
::scobj::hinitprops $the_name Loop2/setpoint

View File

@@ -68,7 +68,7 @@ debug_log "rdValue [sct] [sct result]"
sct send "$cmd"
return $nextState
}
proc rdTemp {tc_root} {
debug_log "rdTemp [sct] [sct result]"
set data [sct result]
@@ -132,7 +132,7 @@ debug_log "rdValue [sct] [sct result]"
sct send $cmd
return $nextState
}
proc rdSpeed {tc_root} {
debug_log "rdSpeed [sct] [sct result]"
set data [sct result]
@@ -547,12 +547,12 @@ debug_log "setPoint $cmd $par"
set the_valu [lindex $parts 2]
set the_ramp [lindex $parts 3]
if {$the_type == "I"} {
set the_valu [expr {round($the_valu * 20.0)}]
set the_ramp [expr {round($the_ramp * 20.0)}]
set the_valu [expr {round($the_valu * 20.0)}]
set the_ramp [expr {round($the_ramp * 20.0)}]
} elseif {$the_type == "S"} {
} elseif {$the_type == "T"} {
set the_valu [expr {round($the_valu * 20.0)}]
set the_ramp [expr {round($the_ramp * 20.0 /45 * 32768)}]
set the_valu [expr {round($the_valu * 20.0)}]
set the_ramp [expr {round($the_ramp * 20.0 /45 * 32768)}]
} else {
sct geterror "Profile error: $line"
sct print "Profile error: $line"

View File

@@ -224,7 +224,7 @@ debug_log "setValue $dev:16:$cmd $par"
hset $tc_root/Loop1/setpoint [sct target]
return idle
}
proc setPoint {tc_root nextState cmd} {
set dev "[hval $tc_root/dev_id]"
set par [sct target]

View File

@@ -232,7 +232,7 @@ debug_log "setValue $dev:16:$cmd $par"
hset $tc_root/Loop1/setpoint [sct target]
return idle
}
proc setPoint {tc_root nextState cmd} {
set dev "[hval $tc_root/dev_id]"
set par [sct target]
@@ -417,7 +417,7 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable\
set scobj_hpath /sics/$tempobj
#
#
# These addresses are modbus addresses on the RUI/gateway over two devices
# The RMC is at address 1 and the modbus offset on the RUI for gateway 1
# is zero, so these addresses are as specified in the manual.

View File

@@ -376,7 +376,7 @@ debug_log "setValue $dev:16:$cmd $par"
hset $tc_root/status "busy"
return idle
}
# Get the High Limit Point
proc getLimHi {tc_root nextState cmd} {
set d1 [hval $tc_root/Loop1/limit_hi]
@@ -402,7 +402,7 @@ debug_log "setValue $dev:16:$cmd $par"
hset $tc_root/Loop4/limit_hi [sct target]
return idle
}
# Set the All Set Points
proc setAll {tc_root nextState cmd} {
debug_log "setAll $tc_root $nextState $cmd [sct]=[sct target] [hget [sct]]"
@@ -413,7 +413,7 @@ debug_log "setValue $dev:16:$cmd $par"
hset $tc_root/device_control/previous_error [expr [sct target] - [hval $tc_root/samplesensor]]
return idle
}
proc setPoint {tc_root nextState cmd} {
set dev "[hval $tc_root/dev_id]"
set par [sct target]
@@ -645,7 +645,7 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable\
hfactory $scobj_hpath/Loop2 plain spy none
hfactory $scobj_hpath/Loop3 plain spy none
hfactory $scobj_hpath/Loop4 plain spy none
foreach {cmdGroup varName readable writable drivable dataType permission rdCmd rdFunc wrCmd wrFunc allowedValues} $deviceCommand {
createNode $scobj_hpath $sct_controller $cmdGroup $varName $readable $writable $drivable $dataType $permission $rdCmd $rdFunc $wrCmd $wrFunc $allowedValues $klass
}

View File

@@ -42,7 +42,7 @@ proc ::environment::temperature::add_west400 {IP} {
tc1 tolerance 10
}
sicslist setatt tc1 environment_name tc1
sicslist setatt tc1 environment_name tc1
sicslist setatt tc1 long_name control_sensor_reading
::environment::mkenvinfo tc1 {ramprate {priv user} powerlimit {priv manager} }
#::environment::mkenvinfo tc1 {heateron {priv user} range {priv manager} }