lakeshore340_common.tcl
Now supports creation of multiple lakeshore controller objects. hmm_configuration_common_1.tcl SICS-275 histmem command now rejects invalid frame source arguments hipd/config/environment/temperature/lakeshore340.tcl Now supports creation of multiple lakeshore controller objects. wombat_configuration.tcl Added example which creates two lakeshore controllers. rsd/config/motors/motor_configuration.tcl SICS-276 Disable debug mode on sz motor. r2694 | ffr | 2008-09-18 12:20:09 +1000 (Thu, 18 Sep 2008) | 15 lines
This commit is contained in:
committed by
Douglas Clowes
parent
8b4c571d63
commit
cc640e2fb0
@@ -17,10 +17,10 @@ namespace eval ::environment::temperature {
|
||||
proc ::environment::temperature::mkls340sim {temp_sobj} {
|
||||
EvFactory new $temp_sobj sim
|
||||
sicslist setatt $temp_sobj numsensors 4
|
||||
sicslist setatt $temp_sobj controlsensor sensora
|
||||
# sicslist setatt $temp_sobj controlsensor sensora
|
||||
sicslist setatt $temp_sobj sensorlist sensora,sensorb,sensorc,sensord
|
||||
sicslist setatt $temp_sobj heateron 1
|
||||
sicslist setatt $temp_sobj range 2
|
||||
# sicslist setatt $temp_sobj range 2
|
||||
sicslist setatt $temp_sobj units kelvin
|
||||
sicslist setatt $temp_sobj klass @none
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# $Revision: 1.38 $
|
||||
# $Date: 2008-08-29 12:22:53 $
|
||||
# $Revision: 1.39 $
|
||||
# $Date: 2008-09-18 02:20:09 $
|
||||
# Author: Ferdi Franceschini
|
||||
# Based on the examples in the hs_test.tcl sample configuration by Mark Lesha.
|
||||
# http://gumtree.ansto.gov.au:9080/nbicms/bragg-systems/histogram-server/hs_test.tcl/view
|
||||
@@ -18,6 +18,7 @@ namespace eval histogram_memory {
|
||||
# Common config variables
|
||||
variable histmem_simulation
|
||||
variable ic_count_methods
|
||||
variable ic_fsrce_values
|
||||
variable preset_mult
|
||||
variable monitor_controlled
|
||||
variable oscmd_controlled
|
||||
@@ -32,10 +33,12 @@ namespace eval histogram_memory {
|
||||
proc init_hmm_objs {} {
|
||||
variable histmem_simulation
|
||||
variable ic_count_methods
|
||||
variable ic_fsrce_values
|
||||
variable default_frame_source_when_there_is_no_frame_signal
|
||||
variable default_frame_source_always_internal
|
||||
|
||||
if [ catch {
|
||||
set ic_fsrce_values [ list INTERNAL EXTERNAL ]
|
||||
set ic_count_methods [concat [list time unlimited period count frame] $::counter::isc_beam_monitor_list ]
|
||||
if {$histmem_simulation == "true"} {
|
||||
MakeHM hmm SIM
|
||||
@@ -1471,7 +1474,12 @@ proc ::histogram_memory::get_frame_source {} {
|
||||
# @param srce EXTERNAL or INTERNAL
|
||||
# @param always_internal true or false (optional) (default false)
|
||||
proc ::histogram_memory::set_frame_source {srce} {
|
||||
variable ic_fsrce_values
|
||||
|
||||
if [ catch {
|
||||
if {[lsearch $ic_fsrce_values $srce] == -1} {
|
||||
error "ERROR: $srce is invalid, valid values are \"$ic_fsrce_values\""
|
||||
}
|
||||
if [::histogram_memory::frame_source_always_internal] {
|
||||
clientput "WARNING: The frame source is set to always_internal" value
|
||||
clientput "Use ::histogram_memory::frame_source_always_internal <true/false> to change this." value
|
||||
|
||||
@@ -5,20 +5,48 @@ source $cfPath(environment)/temperature/lakeshore340_common.tcl
|
||||
# This must be called when the instrument configuration is loaded and before\n
|
||||
# the buildHDB function is called. Currently there is no way to add and remove\n
|
||||
# environment controllers and their hdb paths at runtime.
|
||||
proc ::environment::temperature::add_ls340 {} {
|
||||
set sim_mode [SplitReply [environment_simulation]]
|
||||
if {$sim_mode == "true"} {
|
||||
::environment::temperature::mkls340sim tc1
|
||||
} else {
|
||||
::environment::temperature::mkls340 tc1
|
||||
tc1 tolerance 1
|
||||
tc1 Settle 30
|
||||
tc1 range 2
|
||||
tc1 UpperLimit 500
|
||||
tc1 LowerLimit 4
|
||||
#
|
||||
# @param tcn temperature controller name, the hdb name will be tcn_cntrl
|
||||
# @param mport, the moxa RS232 port number, ie 1,2,3,4
|
||||
#
|
||||
# Optional parameters, see lakeshore340_common.tcl for defaults in tc_dfltPar
|
||||
# @param tolerance, temperature controller tolerance
|
||||
# @param settle, settling time in seconds
|
||||
# @param range, lakeshore range
|
||||
# @param upperlimit, upper temperature limit Kelvin
|
||||
# @param lowerlimit, lower temperature limit Kelvin
|
||||
proc ::environment::temperature::add_ls340 {tcn mport args} {
|
||||
variable tc_dfltPar
|
||||
variable tc_dfltURL
|
||||
variable moxaPortMap
|
||||
if [catch {
|
||||
if {$tcn == "" || $mport == ""} {
|
||||
error "ERROR: You must provide a temperature controller name and moxa port number"
|
||||
}
|
||||
|
||||
sicslist setatt tc1 environment_name tempone
|
||||
sicslist setatt tc1 long_name control_sensor_reading
|
||||
::environment::mkenvinfo tc1 {heateron {priv user} range {priv manager} }
|
||||
array set tc_param [array get tc_dfltPar]
|
||||
|
||||
if {$args != ""} {
|
||||
array set tc_param $args
|
||||
foreach {nm v} $args {
|
||||
set tc_param($nm) $v
|
||||
}
|
||||
}
|
||||
set sim_mode [SplitReply [environment_simulation]]
|
||||
if {$sim_mode == "true"} {
|
||||
::environment::temperature::mkls340sim $tcn
|
||||
} else {
|
||||
::environment::temperature::mkls340 $tcn $tc_dfltURL $moxaPortMap($mport)
|
||||
foreach nm [array names tc_param] {
|
||||
$tcn $nm $tc_param($nm)
|
||||
}
|
||||
}
|
||||
|
||||
sicslist setatt $tcn environment_name ${tcn}_cntrl
|
||||
sicslist setatt $tcn long_name control_sensor_reading
|
||||
::environment::mkenvinfo $tcn {heateron {priv user} range {priv manager} }
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# $Revision: 1.25 $
|
||||
# $Date: 2008-08-07 03:17:28 $
|
||||
# $Revision: 1.26 $
|
||||
# $Date: 2008-09-18 02:20:09 $
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
# Last revision by: $Author: ffr $
|
||||
|
||||
@@ -43,7 +43,8 @@ restore
|
||||
|
||||
catch {
|
||||
::anticollider::init
|
||||
# ::environment::temperature::add_ls340
|
||||
# ::environment::temperature::add_ls340 tc1 1
|
||||
# ::environment::temperature::add_ls340 tc2 2
|
||||
server_init
|
||||
|
||||
if [file exists ../extraconfig.tcl] {
|
||||
|
||||
@@ -305,8 +305,6 @@ Motor sz $motor_driver_type [params \
|
||||
absenc 1\
|
||||
absenchome $sz_home\
|
||||
cntsPerX [expr 8192.0*50.0]]
|
||||
sz debug 1
|
||||
# remember debug is on!
|
||||
sz bias_bits 25
|
||||
sz bias_bias -26000000
|
||||
setHomeandRange -motor sz -home 0 -lowrange 0.1 -uprange 100
|
||||
|
||||
Reference in New Issue
Block a user