sct_julabo_lh45.tcl

Create object when in simulation mode

nxscripts_common_1.tcl
Set units attributes on script context objects data

sans aperture_configuration.tcl
Update rotary attenuator lookup table. Set parameters when motors positions are
within tolerance of the lookup table positions.

sans, parameters.tcl sct_velsel.tcl
Set units and update parameter names to be consistent

quokka_configuration.tcl
Add convenience command to load environment controllers.

server_config.tcl
Make sure that controllers are properly generated when loading them from the ext
raconfig.tcl.

r2881 | ffr | 2010-01-29 16:50:51 +1100 (Fri, 29 Jan 2010) | 20 lines
This commit is contained in:
Ferdi Franceschini
2010-01-29 16:50:51 +11:00
committed by Douglas Clowes
parent ce113f26fd
commit 4f3fb5e250
8 changed files with 176 additions and 140 deletions

View File

@@ -297,17 +297,19 @@ namespace eval ::scobj::lh45 {
hfactory $scobj_hpath/emon/errhandler plain user text
hset $scobj_hpath/emon/errhandler "pause"
$sct_controller poll $scobj_hpath/setpoint
$sct_controller write $scobj_hpath/setpoint
$sct_controller poll $scobj_hpath/subtemp_warnlimit
$sct_controller write $scobj_hpath/subtemp_warnlimit
$sct_controller poll $scobj_hpath/overtemp_warnlimit
$sct_controller write $scobj_hpath/overtemp_warnlimit
$sct_controller poll $scobj_hpath/heating_power_percent
$sct_controller poll $scobj_hpath/power
$sct_controller write $scobj_hpath/power
$sct_controller poll $scobj_hpath/sensor/value
$sct_controller poll $scobj_hpath/lh45_state 5 halt read
if {[SplitReply [environment_simulation]]=="false"} {
$sct_controller poll $scobj_hpath/setpoint
$sct_controller write $scobj_hpath/setpoint
$sct_controller poll $scobj_hpath/subtemp_warnlimit
$sct_controller write $scobj_hpath/subtemp_warnlimit
$sct_controller poll $scobj_hpath/overtemp_warnlimit
$sct_controller write $scobj_hpath/overtemp_warnlimit
$sct_controller poll $scobj_hpath/heating_power_percent
$sct_controller poll $scobj_hpath/power
$sct_controller write $scobj_hpath/power
$sct_controller poll $scobj_hpath/sensor/value
$sct_controller poll $scobj_hpath/lh45_state 5 halt read
}
::scobj::hinitprops $tempobj
hsetprop $scobj_hpath klass NXenvironment
@@ -330,16 +332,27 @@ namespace eval ::scobj::lh45 {
hsetprop $scobj_hpath privilege spy
::scobj::hinitprops $tempobj setpoint
ansto_makesctdrive ${tempobj}_driveable $scobj_hpath/setpoint $scobj_hpath/sensor/value $sct_controller
if {[SplitReply [environment_simulation]]=="false"} {
ansto_makesctdrive ${tempobj}_driveable $scobj_hpath/setpoint $scobj_hpath/sensor/value $sct_controller
}
} message ] {
return -code error $message
}
}
namespace export mk_sct_julabo_lh45
}
# Julabo 137.157.202.85:4003
##
# @brief Create a Julabo lh45 temperature controller
#
# @param name, then name of the temperature controller (eg tc1)
# @param IP, the IP address of the device, this can be a hostname, (eg ca5-quokka)
# @param port, the IP protocol port number of the device
# @param _tol (optional), this is the initial tolerance setting
proc add_lh45 {name IP port {_tol 5.0}} {
makesctcontroller sct_lh45 std ${IP}:$port "\r"
if {[SplitReply [environment_simulation]]=="false"} {
makesctcontroller sct_lh45 std ${IP}:$port "\r"
}
mk_sct_julabo_lh45 sct_lh45 environment $name $_tol
makesctemon $name /sics/$name/emon/monmode /sics/$name/emon/isintol /sics/$name/emon/errhandler
}

View File

@@ -1163,6 +1163,12 @@ proc ::nexus::scobj::sdsinfo {sdsName data_type args} {
if [ catch {
array set param $args
set dtype [::nexus::hdb2nx_type $data_type]
if [hpropexists $param(hpath) "units"] {
set unitsval [hgetpropval $param(hpath) units]
set units_att " -attr {units,$unitsval} "
} else {
set units_att " "
}
switch $data_type {
text {
set dimdef [subst {-dim {[string length [hval $param(hpath)]]}}]
@@ -1170,9 +1176,9 @@ proc ::nexus::scobj::sdsinfo {sdsName data_type args} {
}
default {
if {$param(mutable) == true} {
set sdsStr "$sdsName -type $dtype -rank 1 -dim {-1}"
set sdsStr "$sdsName -type $dtype -rank 1 -dim {-1} $units_att"
} else {
set sdsStr "$sdsName -type $dtype"
set sdsStr "$sdsName -type $dtype $units_att"
}
}
}
@@ -1338,7 +1344,7 @@ set nx_content_release_tag [lindex $tmpstr [expr [llength $tmpstr] - 1]]
sics_release $nx_content_release_tag
sics_release lock
set tmpstr [string map {"$" ""} {$Revision: 1.51.2.3 $}]
set tmpstr [string map {"$" ""} {$Revision: 1.51.2.4 $}]
set nx_content_revision_num [lindex $tmpstr [expr [llength $tmpstr] - 1]]
#namespace eval data {