server_config.tcl

server_init now calls ::counter::isc_initialize, ::histogram_memory::isc_initialize and ::scan::isc_initialize

scan.c
SICS-158  Restrict bmonscan and hmscan to only one scan variable

count_common.tcl
Create a mulicounter which uses the available monitors as channels.  The multicounter is used in bmonscans

hipadaba_configuration_common.tcl
Use _link as the suffix for the nxvgroup name when making nexus file links.

hmm_configuration_common.tcl
SICS-190 Create hdb entries for bm_counts, bm_event_rate, bm_status
SICS-164 Allow running histmem in simulated mode.

hmm_cylindrical_detector_configuration.tcl
Only refer to detector SICSVariables when necessary, otherwise we get dependency problems.

nxscripts_common_1.tcl
Separate histmem_filtype_spec from bmon_filetype_spec so that we can use the histem_filetyp_spec names to restrict the histmem scan filetypes.
Close the data file on error in proc ::nexus::save
Allow int and text types when saving macro data

scan_common_1.tcl
SICS-173  Allow users to force a scan when the instrument isn't ready
Added ic_initialize proc so we can make dependencies explicit in the init_server proc
SICS-186 Allow monitor modes for histmem scans
Allow selection of histmem file policies from runscan command

echidna, wombat, kowari, quokka and platypus component and server configurations
Added instrument specific configuration initialisation functions in the component configuration files.
Add a catch block to the top-level instrument server configuration file and printout the errorContext and callStack

r2641 | ffr | 2008-07-01 17:02:26 +1000 (Tue, 01 Jul 2008) | 34 lines
This commit is contained in:
Ferdi Franceschini
2008-07-01 17:02:26 +10:00
committed by Douglas Clowes
parent c2186b037e
commit 0f96e4f82f
31 changed files with 657 additions and 314 deletions

3
scan.c
View File

@@ -2023,7 +2023,8 @@ static int DumpScan(pScanData self, SConnection *pCon)
SCWrite(pCon,pBueffel,eError);
return 0;
}
iRet = AddScanVar(self,pSics,pCon,argv[2],
iRet = ClearScanVar(self);
iRet = iRet && AddScanVar(self,pSics,pCon,argv[2],
(float)fStart,(float)fStep);
if(iRet)
{

View File

@@ -1,5 +1,53 @@
bm SetExponent 0
sicslist setatt bm privilege internal
namespace eval counter {
variable isc_numchannels
variable isc_monitor_address
variable isc_portlist
variable isc_beam_monitor_list
}
proc ::counter::transferscript {} {
variable isc_numchannels
# set val "123.4 10 20 30 40 50 60 70 80"
set val [SplitReply [bm1 gettime]]
for {set i 1} {$i <= $isc_numchannels} {incr i} {
append val " [SplitReply [bm$i getcounts] ]"
}
# broadcast $val
return $val
}
publish ::counter::transfer_script user
proc ::counter::ic_initialize {} {
if [ catch {
variable isc_numchannels
variable isc_monitor_address
variable isc_portlist
variable isc_beam_monitor_list
set sim_mode [SplitReply [counter_simulation]]
if {$sim_mode == "true"} {
# MakeCounter bm SIM 0.0;
for {set n 1} {$n <= $isc_numchannels} {incr n} {
MakeCounter bm$n SIM 0.0
append bm_list "bm$n "
}
eval "MakeMultiCounter bm $bm_list"
} else {
# Make and configure an ANSTO beam monitor counter.
# This must be sourced before the hmm_configuration.tcl until we separate the scan setup from the hmm setup
for {set i 0; set n 1} {$i < $isc_numchannels} {incr i; incr n} {
MakeCounter bm$n anstomonitor [ params host $isc_monitor_address port [lindex $isc_portlist $i] ]
}
}
bm transferscript ::counter::transferscript
bm SetExponent 0
sicslist setatt bm privilege internal
} message ] {
if {$::errorCode=="NONE"} {return $message}
return -code error $message
}
}
::utility::macro::getset float monitor_counts {} {
return "monitor_counts = [SplitReply [bm getcounts]]"

View File

@@ -379,7 +379,7 @@ proc ::hdb::add_subtree {hpath subtree {object @none} {type @none} {makenode @no
hsetprop $hpath/$refname control "false"
hsetprop $hpath/$refname link $t
hsetprop $hpath/$refname nxalias ${l}_posref
hsetprop $hpath/$refname nxalias ${l}_link
hsetprop $hpath/$refname type nxvgroup
hsetprop $hpath/$refname klass @none
}

View File

@@ -1,5 +1,5 @@
# $Revision: 1.32 $
# $Date: 2008-06-23 02:41:12 $
# $Revision: 1.33 $
# $Date: 2008-07-01 07:02:26 $
# 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
@@ -11,96 +11,122 @@
# function with the following signature
# @code proc ::histogram_memory::initialize {}
# this function should call the generic initalisation function,
# ::histogram_memory::_initialize
# ::histogram_memory::ic_initialize
#
#@see ::histogram_memory::_initialize
set sim_mode [SplitReply [hmm_simulation]]
if {$sim_mode == "true"} {
MakeHM hmm SIM
MakeHM hmm_xy SIM
MakeHM hmm_xt SIM
MakeHM hmm_yt SIM
MakeHM hmm_x SIM
MakeHM hmm_y SIM
MakeHM hmm_t SIM
hmm configure daq Stopped
hmm configure statuscheck false
namespace eval histogram_memory {
proc hmc {_start _preset _mode _pause pauseval} {
if [ catch {
bm mode $_mode;
bm preset $_preset;
hmm countblock;
} message ] {
if {$::errorCode=="NONE"} {return $message}
return -code error $message
#@see ::histogram_memory::ic_initialize
namespace eval histogram_memory {
# Common config variables
variable histmem_simulation
variable ic_count_methods
# Instrument Specific Config variables
set histmem_simulation [SplitReply [hmm_simulation]]
proc init_hmm_objs {} {
variable histmem_simulation
variable ic_count_methods
variable default_frame_source_when_there_is_no_frame_signal
variable default_frame_source_always_internal
if [ catch {
set ic_count_methods [concat [list time unlimited period count frame] $::counter::isc_beam_monitor_list ]
if {$histmem_simulation == "true"} {
MakeHM hmm SIM
MakeHM hmm_xy SIM
MakeHM hmm_xt SIM
MakeHM hmm_yt SIM
MakeHM hmm_x SIM
MakeHM hmm_y SIM
MakeHM hmm_t SIM
hmm configure daq Stopped
hmm configure statuscheck false
foreach bm $::counter::isc_beam_monitor_list {
set bm_num [string index $bm end]
if [string is integer $bm_num] {
hmm configure bm${bm_num}_status DISABLED
hmm configure bm${bm_num}_counts 12345
hmm configure bm${bm_num}_event_rate 50
}
}
proc hmc {_start _preset _mode _pause pauseval} {
if [ catch {
bm mode $_mode
bm preset $_preset
hmm countblock
} message ] {
if {$::errorCode=="NONE"} {return $message}
return -code error $message
}
}
} else {
MakeHM hmm anstohttp
MakeHM hmm_xy anstohttp
MakeHM hmm_xt anstohttp
MakeHM hmm_yt anstohttp
MakeHM hmm_x anstohttp
MakeHM hmm_y anstohttp
MakeHM hmm_t anstohttp
MakeHMControl_ANSTO hmc bm hmm;
}
hmm configure rank 3
hmm_xy configure rank 2
hmm_xt configure rank 2
hmm_yt configure rank 2
hmm_x configure rank 1
hmm_y configure rank 1
hmm_t configure rank 1
# Frame source for each instrument if freq = 0, this can happen when automatically
# setting frequencies from choppers.
array set default_frame_source_when_there_is_no_frame_signal {
echidna INTERNAL
koala INTERNAL
kowari EXTERNAL
pelican INTERNAL
platypus EXTERNAL
quokka INTERNAL
taipan INTERNAL
wombat INTERNAL
}
array set default_frame_source_always_internal {
echidna "true"
koala "false"
kowari "false"
pelican "false"
platypus "false"
quokka "false"
taipan "false"
wombat "false"
}
::utility::mkVar detector_active_height_mm Float user active_height true detector true true
sicslist setatt detector_active_height_mm units mm
::utility::mkVar detector_active_width_mm Float user active_width true detector true true
sicslist setatt detector_active_width_mm units mm
::utility::mkVar hmm_user_configpath Text manager user_configpath false detector false false
hmm_user_configpath ../user_config/hmm
::utility::mkVar hmm_mode Text user mode true detector true true
::utility::mkVar _hmm_vert_axis Text user vert_axis true detector false true
::utility::mkVar _hmm_hor_axis Text user hor_axis true detector false true
::utility::mkVar _hmm_hor_axis_alias Text user hor_axis_alias true detector false true
::utility::mkVar _hmm_vert_axis_alias Text user vert_axis_alias true detector false true
::utility::mkVar _hmm_hor_channel_name Text user hor_channel_name true detector false true
_hmm_vert_axis y_pixel_offset
_hmm_vert_axis_alias dvaxis
_hmm_hor_axis polar_angle
_hmm_hor_axis_alias dtheta
_hmm_hor_channel_name horizontal_channel_number
} message ] {
if {$::errorCode=="NONE"} {return $message}
return -code error $message
}
}
} else {
MakeHM hmm anstohttp;
MakeHM hmm_xy anstohttp;
MakeHM hmm_xt anstohttp;
MakeHM hmm_yt anstohttp;
MakeHM hmm_x anstohttp;
MakeHM hmm_y anstohttp;
MakeHM hmm_t anstohttp;
MakeHMControl_ANSTO hmc bm hmm;
}
hmm configure rank 3
hmm_xy configure rank 2
hmm_xt configure rank 2
hmm_yt configure rank 2
hmm_x configure rank 1
hmm_y configure rank 1
hmm_t configure rank 1
namespace eval histogram_memory {
# Frame source for each instrument if freq = 0, this can happen when automatically
# setting frequencies from choppers.
array set default_frame_source_when_there_is_no_frame_signal {
echidna INTERNAL
koala INTERNAL
kowari EXTERNAL
pelican INTERNAL
platypus EXTERNAL
quokka INTERNAL
taipan INTERNAL
wombat INTERNAL
}
array set default_frame_source_always_internal {
echidna "true"
koala "false"
kowari "false"
pelican "false"
platypus "false"
quokka "false"
taipan "false"
wombat "false"
}
::utility::mkVar detector_active_height_mm Float user active_height true detector true true
sicslist setatt detector_active_height_mm units mm
::utility::mkVar detector_active_width_mm Float user active_width true detector true true
sicslist setatt detector_active_width_mm units mm
::utility::mkVar hmm_user_configpath Text manager user_configpath false detector false false
hmm_user_configpath ../user_config/hmm
::utility::mkVar hmm_mode Text user mode true detector true true
::utility::mkVar _hmm_vert_axis Text user vert_axis true detector false true
::utility::mkVar _hmm_hor_axis Text user hor_axis true detector false true
::utility::mkVar _hmm_hor_axis_alias Text user hor_axis_alias true detector false true
::utility::mkVar _hmm_vert_axis_alias Text user vert_axis_alias true detector false true
::utility::mkVar _hmm_hor_channel_name Text user hor_channel_name true detector false true
_hmm_vert_axis y_pixel_offset
_hmm_vert_axis_alias dvaxis
_hmm_hor_axis polar_angle
_hmm_hor_axis_alias dtheta
_hmm_hor_channel_name horizontal_channel_number
##############################################
# Creating the histogram memories in SICS
##############################################
@@ -1526,12 +1552,44 @@ proc ::histogram_memory::t_max {} {
##
# @brief Sets histogram server to default configuration, initialises SICS histogram memory
# dictionary values and clears SICS OAT BAT CAT FAT ... tables
proc ::histogram_memory::_initialize {} {
proc ::histogram_memory::ic_initialize {} {
variable default_frame_source_when_there_is_no_frame_signal
variable default_frame_source_always_internal
set ::errorInfo ""
if [ catch {
# Generate beam monitor feedback macros
foreach bm $::counter::isc_beam_monitor_list {
set bm_num [string index $bm end]
if [string is integer $bm_num] {
set bm_status bm${bm_num}_status
::utility::macro::getset text $bm_status {} [subst -nocommands {
return "$bm_status = [SplitReply [hmm configure $bm_status]]"
}]
sicslist setatt $bm_status klass monitor
sicslist setatt $bm_status long_name $bm_status
sicslist setatt $bm_status mutable false
set bm_counts bm${bm_num}_counts
::utility::macro::getset int $bm_counts {} [subst -nocommands {
return "$bm_counts = [lindex [hmm configure $bm_counts] 2]"
}]
sicslist setatt $bm_counts klass monitor
sicslist setatt $bm_counts long_name $bm_counts
sicslist setatt $bm_counts mutable true
set bm_event_rate bm${bm_num}_event_rate
::utility::macro::getset float $bm_event_rate {} [subst -nocommands {
return "$bm_event_rate = [lindex [hmm configure $bm_event_rate] 2]"
}]
sicslist setatt $bm_event_rate klass monitor
sicslist setatt $bm_event_rate long_name $bm_event_rate
sicslist setatt $bm_event_rate mutable true
sicslist setatt $bm_event_rate units "count/sec"
} else {
error "ERROR: Failed to get beam monitor number"
}
}
set configuration "::histogram_memory::returnconfigfile config/hmm/anstohm_linked.xml"
::histogram_memory::y_bin -boundaries
::histogram_memory::x_bin -boundaries
@@ -1585,6 +1643,7 @@ proc ::histogram_memory::post_count {} {}
#
# @param block (optional) default="noblock"
proc ::histogram_memory::start {{blocking "noblock"}} {
variable histmem_simulation
if [ catch {
set options [list block noblock]
if {[lsearch $options $blocking] == -1} {
@@ -1594,7 +1653,7 @@ proc ::histogram_memory::post_count {} {}
hmm init
hmc start 1000000000 timer pause 1
set reply [SplitReply [hmm configure daq]]
if {$reply != "Started"} {
if {$histmem_simulation==false && $reply != "Started"} {
error "ERROR: Histogram server failed to start"
}
clientput "histmem started" value
@@ -1611,13 +1670,14 @@ proc ::histogram_memory::post_count {} {}
##
# @brief This sends the magic incantation which stops the histogram server.
proc ::histogram_memory::stop {} {
variable histmem_simulation
if [ catch {
hmm pause
hmm configure statuscheck true
hmm stop
hmm configure statuscheck false
set reply [SplitReply [hmm configure daq]]
if {$reply != "Stopped"} {
if {$histmem_simulation==false && $reply != "Stopped"} {
error "ERROR: Histogram server failed to stop"
}
} message ] {
@@ -1633,11 +1693,12 @@ proc ::histogram_memory::post_count {} {}
# @brief Allows resume if MULTIPLE_DATASETS=DISABLE, otherwise if MULTIPLE_DATASETS=ENABLE
# (the default) this acts like a stop but allows a fast restart.
proc ::histogram_memory::pause {} {
variable histmem_simulation
if [ catch {
hmm pause
::histogram_memory::post_count
set reply [SplitReply [hmm configure daq]]
if {$reply != "Paused"} {
if {$histmem_simulation==false && $reply != "Paused"} {
error "ERROR: Histogram server failed to pause"
}
} message ] {
@@ -1655,8 +1716,10 @@ proc ::histogram_memory::post_count {} {}
#
# @param method Set histmem mode or return current mode if blank
proc ::histogram_memory::count_method {{method ""}} {
variable ic_count_methods
if [ catch {
set modes [list time monitor unlimited period count frame]
set modes $ic_count_methods
if {$method==""} {
return [SplitReply [hmm_mode]]
} else {
@@ -1664,6 +1727,9 @@ proc ::histogram_memory::post_count {} {}
error "ERROR: Count mode, $method, must be one of $modes"
}
hmm configure FAT_COUNT_METHOD $method
if {[string range $method 0 [string first "R_" $method]] == "MONITOR"} {
hmm configure FAT_${method}_CONTROL ENABLE
}
hmm init
hmm_mode $method
}

View File

@@ -13,8 +13,6 @@ namespace eval histogram_memory {
set opt [lindex $args 0]
set arglist [lrange $args 1 end]
set proc_name [namespace origin [lindex [info level 0] 0]]
set det_width_mm [SplitReply [detector_active_width_mm]]
set det_radius_mm [SplitReply [detector_radius_mm]]
set deg_per_radian [SplitReply [deg_per_rad]]
switch -- $opt {
"-centres" - "-boundaries" - "-graph_type" {
@@ -22,6 +20,8 @@ namespace eval histogram_memory {
}
"-arrayname" {
set max_chan [OAT_TABLE X -getdata MAX_CHAN]
set det_width_mm [SplitReply [detector_active_width_mm]]
set det_radius_mm [SplitReply [detector_radius_mm]]
set scale_factor [expr {$deg_per_radian*($det_width_mm/$det_radius_mm) / $max_chan}]
set offset [::histogram_memory::detector_posn_degrees]
return [::histogram_memory::calc_axis $proc_name $scale_factor $offset [OAT_TABLE X -getdata BOUNDARIES] $opt $arglist]
@@ -31,6 +31,8 @@ namespace eval histogram_memory {
}
default {
set max_chan [OAT_TABLE X -getdata MAX_CHAN]
set det_width_mm [SplitReply [detector_active_width_mm]]
set det_radius_mm [SplitReply [detector_radius_mm]]
set scale_factor [expr {$deg_per_radian*($det_width_mm/$det_radius_mm) / $max_chan}]
set offset [::histogram_memory::detector_posn_degrees]
return [::histogram_memory::calc_axis $proc_name $scale_factor $offset [OAT_TABLE X -getdata BOUNDARIES] $args]

View File

@@ -38,12 +38,16 @@ namespace eval nexus {
# must be set by the instrument specific histogram memory configuration.
#
# TODO Put the filetype_spec in a separate file.
variable filetype_spec {
variable bmon_filetype_spec
array set bmon_filetype_spec {
BEAM_MONITOR {
link {axis 1 data_run_number}
link {data_set monitor_counts}
save_policy {include @all exclude {hmm hmm_xy hmm_xt hmm_yt hmm_x hmm_y hmm_t}}
}
}
variable histmem_filetype_spec
array set histmem_filetype_spec {
HISTOGRAM_XYT {
link {axis 1 data_run_number}
link {axis 2 ::histogram_memory::time_channel}
@@ -92,6 +96,8 @@ namespace eval nexus {
save_policy {include @all exclude {hmm_xy hmm_xt hmm_yt hmm_x hmm_y hmm}}
}
}
variable filetype_spec [concat [array get bmon_filetype_spec] [array get histmem_filetype_spec] ]
}
##
@@ -349,6 +355,7 @@ proc ::nexus::newfile {type {namestyle data}} {
::nexus::nxclosefile
}
} message ] {
::nexus::nxclosefile
if {$::errorCode=="NONE"} {return $message}
return -code error $message
}
@@ -605,6 +612,7 @@ proc ::nexus::newfile {type {namestyle data}} {
}
}
} message ] {
set message "$message, hpath=$hpath/$child"
if {$::errorCode=="NONE"} {return $message}
return -code error $message
}
@@ -851,18 +859,29 @@ proc ::nexus::motor::sdsinfo {motor data_type args} {
# NOTE: Currently just saves floats
namespace eval ::nexus::macro {}
proc ::nexus::macro::getset_save {sobj nxalias data_type args} {
if {[lindex $args 0] == "point"} {
set index [lindex $args 1]
nxscript_data clear
set val [getVal [$sobj] ]
switch $data_type {
int {nxscript_data putint 0 $val}
float {nxscript_data putfloat 0 $val}
default {error "ERROR: [info level -1]->::nexus::sicsvariable::save, unknown type $data_type"}
}
if [ catch {
if {[lindex $args 0] == "point"} {
set index [lindex $args 1]
nxscript_data clear
set val [getVal [$sobj] ]
switch $data_type {
int {nxscript_data putint 0 $val}
float {nxscript_data putfloat 0 $val}
text {error "ERROR: [info level 0] Saving an array of text values is not implemented"}
default {error "ERROR: [info level 0] unknown type $data_type when saving $sobj"}
}
nxscript putslab $nxalias [list $index] [list 1] nxscript_data
} else {
nxscript putfloat $nxalias [SplitReply [$sobj]]
} else {
switch $data_type {
int {nxscript putint $nxalias [SplitReply [$sobj]]}
float {nxscript putfloat $nxalias [SplitReply [$sobj]]}
text {nxscript puttext $nxalias [SplitReply [$sobj]]}
default {error "ERROR: [info level 0] Unknown data type $data_type when saving $sobj"}
}
}
} message ] {
if {$::errorCode=="NONE"} {return $message}
return -code error $message
}
}
@@ -1034,7 +1053,7 @@ foreach expt $::nexus::exports {
set tmpstr [string map {"$" ""} {$Name: not supported by cvs2svn $}]
set nx_content_release_tag [lindex $tmpstr [expr [llength $tmpstr] - 1]]
set tmpstr [string map {"$" ""} {$Revision: 1.38 $}]
set tmpstr [string map {"$" ""} {$Revision: 1.39 $}]
set nx_content_revision_num [lindex $tmpstr [expr [llength $tmpstr] - 1]]
#namespace eval data {

View File

@@ -2,21 +2,88 @@
# @file Scan functionality and common high level commands are defined here.
#
# namespace variables\n
# ::scan::save_filetype data/scratch, controls if data will be saved to a scratch file.
# ::scan::reset_position true/false (default=true), drive motor back to start position at end of scan
# ::scan::save_filetype data/scratch, controls if data will be saved to a
# scratch file.\n
# ::scan::reset_position true/false (default=true), drive motor back to start
# position at end of scan\n
# ::scan::force_scan true/false, (default=false), Will force a scan if the
# instrument isn't ready, eg shutters closed. Note: The scan will still fail if
# you are scanning against a motor and motion control is disabled.\n
# If force_scan is true it is immediately reset to false after it is checked.
#TODO Get rid of duplication in bmonscan and hmscan code
MakeScanCommand hmscan bm $cfPath(scan)/scan_common_1.hdd recover.bin
MakeScanCommand bmonscan bm $cfPath(scan)/scan_common_1.hdd recover.bin
namespace eval scan {
variable ic_runscanpar
variable hmm_filetype
variable save_filetype
variable reset_position
variable check_thread0
variable check_instrument_ready
variable force_scan
set check_thread0 true
set check_instrument_ready true
set force_scan false
set save_filetype "data"
set reset_position "false"
if {[SplitReply [motor_simulation]] == "true"} {
set check_thread0 false
}
proc scan_collect {sobj uobj point} {
}
}
proc ::scan::ic_initialize {} {
if [ catch {
variable ic_runscanpar
variable hmm_filetype
set hmm_filetype HISTOGRAM_XYT
MakeScanCommand hmscan bm $::cfPath(scan)/scan_common_1.hdd recover.bin
MakeScanCommand bmonscan bm $::cfPath(scan)/scan_common_1.hdd recover.bin
bmonscan configure script
bmonscan function writeheader ::scan::donothing
bmonscan function writepoint ::scan::bm_writepoint
bmonscan function count ::scan::bm_count
#bmonscan function collect ::scan::scan_collect
bmonscan function prepare ::scan::bm_scan_prepare
bmonscan function finish ::scan::bm_scan_finish
hmscan configure script
#hmscan function prepare hdbprepare
#hmscan function collect hdbcollect
hmscan function writeheader ::scan::donothing
hmscan function writepoint ::scan::hmm_writepoint
hmscan function count ::scan::hmm_count
#hmscan function collect ::scan::scan_collect
hmscan function prepare ::scan::hmm_scan_prepare
hmscan function finish ::scan::hmm_scan_finish
# TODO Use ic_runscanpar to create the ::scan::runscan command and
# to validate the "runscan" proc parameters.
array set ic_runscanpar [subst {
scanvar text=drivable
start float
stop float
numpoints int=0,inf
mode text=[join [concat [list time unlimited period count frame] $::counter::isc_beam_monitor_list ] , ]
preset float=0,inf
filetype text=[join [array names ::nexus::histmem_filetype_spec] , ]
savetype text=save,nosave
force boolean
}]
} message ] {
if {$::errorCode=="NONE"} {return $message}
return -code error $message
}
}
##
# @brief Returns an error if a scan variable target position exceeds the limits.
proc ::scan::check_limit {scan_variable limit_name target} {
@@ -45,6 +112,7 @@ proc ::scan::check_limit {scan_variable limit_name target} {
# TODO We can't check limits of virtual motors yet because the
# configurablevirtualmotor doesn't set a checklimits function.
proc ::scan::check_scanvar {sobj uobj} {
variable check_thread0
set vlist [split [$sobj getvarpar 0] = ];
set NP [SplitReply [$sobj np]]
set scan_variable [string trim [lindex [split [lindex $vlist 0] . ] 1]]
@@ -53,7 +121,7 @@ proc ::scan::check_scanvar {sobj uobj} {
if {[getatt $scan_variable type] == "motor"} {
if {[SplitReply [$scan_variable fixed]] >= 0} {
return -code error "ERROR: Can't drive scan variable, $scan_variable position is set to 'fixed'"
} elseif {[SplitReply [$scan_variable thread0]] == -1} {
} elseif {$check_thread0 && [SplitReply [$scan_variable thread0]] == -1} {
return -code error "ERROR: Can't scan ${scan_variable}. Thread zero has stopped running on the motion controller"
}
set target [expr $scan_start + ($NP-1) * $scan_increment]
@@ -83,42 +151,47 @@ proc ::scan::pre_hmm_scan_prepare {} {}
proc ::scan::hmm_scan_prepare {sobj uobj} {
variable scan_pt_start_time
variable save_filetype
variable hmm_filetype
variable check_instrument_ready
variable force_scan
if {[::plc::inst_ready] != 1} {
if {$force_scan || $check_instrument_ready && [::plc::inst_ready]} {
set force_scan false
if [catch {
::scan::check_scanvar $sobj $uobj
::scan::pre_hmm_scan_prepare
}] {
abortbatch
return -code error "HMSCAN ABORTED: $::errorInfo"
}
if [catch {
set numpoints [SplitReply [$sobj np]]
set vlist [split [$sobj getvarpar 0] = ]
set scanstart [lindex $vlist 1]
set scanstep [lindex $vlist 2]
::scan::hdb_hmscan -set NP $numpoints
::scan::hdb_hmscan -set scan_variable [string trim [lindex [split [lindex $vlist 0] . ] 1]]
::scan::hdb_hmscan -set scan_start $scanstart
::scan::hdb_hmscan -set scan_increment $scanstep
set scan_pt_start_time [sicstime]
::scan::hdb_hmscan -set feedback status BUSY
::nexus::newfile $hmm_filetype $save_filetype
data axis 1 [::scan::hdb_hmscan -set scan_variable]
clientput "Scan start: $scanstart, Scan step: $scanstep, Number of points: $numpoints"
clientput "Filetype: $hmm_filetype"
# Prime DAE
hmm pause
}] {
return -code error $::errorInfo
}
} else {
return -code error "HMSCAN ABORTED: Instrument not ready"
}
if [catch {
::scan::check_scanvar $sobj $uobj
::scan::pre_hmm_scan_prepare
}] {
abortbatch
return -code error "HMSCAN ABORTED: $::errorInfo"
}
if [catch {
set numpoints [SplitReply [$sobj np]]
set vlist [split [$sobj getvarpar 0] = ]
set scanstart [lindex $vlist 1]
set scanstep [lindex $vlist 2]
::scan::hdb_hmscan -set NP $numpoints
::scan::hdb_hmscan -set scan_variable [string trim [lindex [split [lindex $vlist 0] . ] 1]]
::scan::hdb_hmscan -set scan_start $scanstart
::scan::hdb_hmscan -set scan_increment $scanstep
set scan_pt_start_time [sicstime]
::scan::hdb_hmscan -set feedback status BUSY
::nexus::newfile HISTOGRAM_XYT $save_filetype
data axis 1 [::scan::hdb_hmscan -set scan_variable]
clientput "Scan start: $scanstart, Scan step: $scanstep, Number of points: $numpoints"
clientput "Filetype: HISTOGRAM_XYT"
# Prime DAE
hmm pause
}] {
return -code error $::errorInfo
}
}
proc ::scan::hmm_count {sobj uobj point mode preset} {
@@ -257,32 +330,31 @@ Publish ::scan::bm_scan_finish user
Publish ::scan::bm_writepoint user
Publish ::scan::bm_count user
bmonscan configure script
bmonscan function writeheader ::scan::donothing
bmonscan function writepoint ::scan::bm_writepoint
bmonscan function count ::scan::bm_count
#bmonscan function collect ::scan::scan_collect
bmonscan function prepare ::scan::bm_scan_prepare
bmonscan function finish ::scan::bm_scan_finish
hmscan configure script
#hmscan function prepare hdbprepare
#hmscan function collect hdbcollect
hmscan function writeheader ::scan::donothing
hmscan function writepoint ::scan::hmm_writepoint
hmscan function count ::scan::hmm_count
#hmscan function collect ::scan::scan_collect
hmscan function prepare ::scan::hmm_scan_prepare
hmscan function finish ::scan::hmm_scan_finish
namespace eval scan {
namespace export runscan
VarMake ::scan::runscan_reset_position Text internal
::scan::runscan_reset_position false
proc runscan {scanvar start stop numpoints mode preset {savetype "save"} } {
#TODO Add counter (monitor_1 monitor_2 ... histmem) and filetype BEAM_MONITOR HISTMEM_?
##
# @brief Run a histogram memory scan
# @param filetype one of the histogram filetypes (default=HISTOGRAM_XYT)
# @param savetype save/nosave (default=save)
# @param force true/false (default=false)
proc runscan {scanvar start stop numpoints mode preset args} {
variable hmm_filetype
variable save_filetype
variable reset_position
variable force_scan
set force_scan false
set hm_ft_names [array names ::nexus::histmem_filetype_spec]
# Default filetype for histogram memory scans
set hmm_filetype "HISTOGRAM_XYT"
# Default save uniquely numbered files
set savetype "save"
set reset_position [SplitReply [::scan::runscan_reset_position]]
if {[is_drivable $scanvar] == 0} {
return -code error "The scan variable <$scanvar> must be drivable"
@@ -306,15 +378,38 @@ namespace eval scan {
set numpoints 1
}
switch $savetype {
"save" {
set save_filetype data
}
"nosave" {
set save_filetype scratch
}
default {
return -code error "$savetype should be 'save' or 'nosave'"
foreach {arg val} $args {
switch $arg {
"force" {
if [string is boolean $val] {
set force_scan $val
} else {
error "ERROR: force must be true or false"
}
}
"filetype" {
if {[lsearch $hm_ft_names $val] == -1} {
error "ERROR: filetype should be one of $hm_ft_names"
} else {
set hmm_filetype $val
}
}
"savetype" {
switch $val {
"save" {
set save_filetype data
}
"nosave" {
set save_filetype scratch
}
default {
return -code error "ERROR: $arg $val, valid values for $arg are 'save' or 'nosave'"
}
}
}
default {
error "ERROR: $arg should be 'filetype' 'savetype' or 'force'"
}
}
}
@@ -322,6 +417,7 @@ namespace eval scan {
hmscan add $scanvar $start $step
# hmscan ignores mode and preset, we use FAT_COUNT_METHOD and FAT_COUNT_STOP
set status [catch {hmscan run $numpoints timer 0} msg]
set force_scan false
if {$status == 0} {
return $msg

View File

@@ -1,17 +1,28 @@
set sim_mode [SplitReply [counter_simulation]]
if {$sim_mode == "true"} {
MakeCounter bm SIM 0.0;
} else {
# Make and configure an ANSTO beam monitor counter.
# This must be sourced before the hmm_configuration.tcl until we separate the scan setup from the hmm setup
MakeCounter bm anstomonitor [ params host "das1-[SplitReply [instrument]]" port "30000" ]
}
source $cfPath(counter)/counter_common_1.tcl
unset sim_mode
## TODO Put all the counter macros in the counter namespace
namespace eval counter {
variable isc_numchannels
variable isc_monitor_address
variable isc_portlist
variable isc_beam_monitor_list
proc set_sobj_attributes {} {
}
}
proc ::counter::isc_initialize {} {
if [catch {
variable isc_numchannels
variable isc_monitor_address
variable isc_portlist
variable isc_beam_monitor_list {MONITOR_1 MONITOR_2 MONITOR_3}
set isc_monitor_address "das1-[SplitReply [instrument]]"
set isc_portlist [list 30000 30001 30002 30003 30004 30005 30006 30007]
set isc_numchannels [llength $isc_beam_monitor_list]
::counter::ic_initialize
} message ] {
if {$::errorCode=="NONE"} {return $message}
return -code error "$message"
}
}

View File

@@ -83,8 +83,10 @@ proc ::histogram_memory::detector_posn_degrees {} {
}
proc ::histogram_memory::pre_count {} {}
proc ::histogram_memory::post_count {} {}
proc ::histogram_memory::initialize {} {
proc ::histogram_memory::isc_initialize {} {
if [ catch {
::histogram_memory::init_hmm_objs
if {$::sim_mode == "true"} {
hmm configure oat_ntc_eff 1
hmm configure stitch_nyc 512
@@ -95,7 +97,7 @@ proc ::histogram_memory::initialize {} {
SAT_TABLE -init
OAT_TABLE -init
FAT_TABLE -init MULTI_HOST_HISTO_STITCH_OVERLAP
::histogram_memory::_initialize
::histogram_memory::ic_initialize
::histogram_memory::two_theta -boundaries
detector_active_height_mm 203.2

View File

@@ -1,8 +1,7 @@
# $Revision: 1.21 $
# $Date: 2008-05-30 00:26:55 $
# $Revision: 1.22 $
# $Date: 2008-07-01 07:02:26 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by: $Author: ffr $
source $cfPath(anticollider)/anticollider.tcl
# START MOTOR CONFIGURATION

View File

@@ -1,2 +1,6 @@
source $cfPath(scan)/scan_common_1.tcl
proc ::scan::pre_hmm_scan_prepare {} {}
proc ::scan::isc_initialize {} {
::scan::ic_initialize
}

View File

@@ -1,5 +1,5 @@
# $Revision: 1.21 $
# $Date: 2008-06-23 02:41:12 $
# $Revision: 1.22 $
# $Date: 2008-07-01 07:02:26 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by: $Author: ffr $
@@ -30,6 +30,7 @@ fileeval $cfPath(hmm)/hmm_configuration.tcl
fileeval $cfPath(nexus)/nxscripts.tcl
fileeval $cfPath(scan)/scan.tcl
fileeval $cfPath(commands)/commands.tcl
fileeval $cfPath(anticollider)/anticollider.tcl
source gumxml.tcl
########
@@ -39,15 +40,20 @@ source gumxml.tcl
# AN ERROR IF THERE IS NO ../log/status.tcl FILE.
restore
::histogram_memory::initialize
#::environment::temperature::add_ls340
catch {
::anticollider::init
server_init
#::environment::temperature::add_ls340
if [file exists extraconfig.tcl] {
fileeval extraconfig.tcl
} else {
clientput "extraconfig.tcl not found. continueing"
if [file exists extraconfig.tcl] {
fileeval extraconfig.tcl
} else {
clientput "extraconfig.tcl not found. continueing"
}
buildHDB instrument_dictionary
}
server_init
buildHDB instrument_dictionary
clientput $errorContext
clientput $callStack

View File

@@ -1,17 +1,28 @@
set sim_mode [SplitReply [counter_simulation]]
if {$sim_mode == "true"} {
MakeCounter bm SIM 0.0;
} else {
# Make and configure an ANSTO beam monitor counter.
# This must be sourced before the hmm_configuration.tcl until we separate the scan setup from the hmm setup
MakeCounter bm anstomonitor [ params host "das1-[SplitReply [instrument]]" port "30000" ]
}
source $cfPath(counter)/counter_common_1.tcl
unset sim_mode
## TODO Put all the counter macros in the counter namespace
namespace eval counter {
variable isc_numchannels
variable isc_monitor_address
variable isc_portlist
variable isc_beam_monitor_list
proc set_sobj_attributes {} {
}
}
proc ::counter::isc_initialize {} {
if [catch {
variable isc_numchannels
variable isc_monitor_address
variable isc_portlist
variable isc_beam_monitor_list {MONITOR_1 MONITOR_2 MONITOR_3}
set isc_monitor_address "das1-[SplitReply [instrument]]"
set isc_portlist [list 30000 30001 30002 30003 30004 30005 30006 30007]
set isc_numchannels [llength $isc_beam_monitor_list]
::counter::ic_initialize
} message ] {
if {$::errorCode=="NONE"} {return $message}
return -code error "$message"
}
}

View File

@@ -35,8 +35,10 @@ proc ::histogram_memory::detector_posn_degrees {} {
}
proc ::histogram_memory::pre_count {} {}
proc ::histogram_memory::post_count {} {}
proc ::histogram_memory::initialize {} {
proc ::histogram_memory::isc_initialize {} {
if [ catch {
::histogram_memory::init_hmm_objs
if {$::sim_mode == "true"} {
hmm configure oat_ntc_eff 1
hmm configure oat_nyc_eff 1024
@@ -47,7 +49,7 @@ proc ::histogram_memory::initialize {} {
SAT_TABLE -init
OAT_TABLE -init
FAT_TABLE -init
::histogram_memory::_initialize
::histogram_memory::ic_initialize
::histogram_memory::two_theta -boundaries
detector_active_height_mm 335

View File

@@ -1,2 +1,6 @@
source $cfPath(scan)/scan_common_1.tcl
proc ::scan::pre_hmm_scan_prepare {} {}
proc ::scan::isc_initialize {} {
::scan::ic_initialize
}

View File

@@ -1,5 +1,5 @@
# $Revision: 1.28 $
# $Date: 2008-06-23 02:41:12 $
# $Revision: 1.29 $
# $Date: 2008-07-01 07:02:26 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by: $Author: ffr $
@@ -38,16 +38,18 @@ source gumxml.tcl
# BIG WARNING: DON'T PUT 'restore' IN A CATCH BLOCK BECAUSE IT RETURNS
# AN ERROR IF THERE IS NO ../log/status.tcl FILE.
restore
catch {
server_init
#::environment::temperature::add_ls340
::histogram_memory::initialize
#::environment::temperature::add_ls340
if [file exists extraconfig.tcl] {
fileeval extraconfig.tcl
} else {
clientput "extraconfig.tcl not found. continueing"
}
if [file exists extraconfig.tcl] {
fileeval extraconfig.tcl
} else {
clientput "extraconfig.tcl not found. continueing"
buildHDB instrument_dictionary
}
server_init
buildHDB instrument_dictionary
clientput $errorContext
clientput $callStack

View File

@@ -1,17 +1,28 @@
set sim_mode [SplitReply [counter_simulation]]
if {$sim_mode == "true"} {
MakeCounter bm SIM 0.0;
} else {
# Make and configure an ANSTO beam monitor counter.
# This must be sourced before the hmm_configuration.tcl until we separate the scan setup from the hmm setup
MakeCounter bm anstomonitor [ params host "das1-[SplitReply [instrument]]" port "30000" ]
}
source $cfPath(counter)/counter_common_1.tcl
unset sim_mode
## TODO Put all the counter macros in the counter namespace
namespace eval counter {
variable isc_numchannels
variable isc_monitor_address
variable isc_portlist
variable isc_beam_monitor_list
proc set_sobj_attributes {} {
}
}
proc ::counter::isc_initialize {} {
if [catch {
variable isc_numchannels
variable isc_monitor_address
variable isc_portlist
variable isc_beam_monitor_list {MONITOR_1 MONITOR_2 MONITOR_3}
set isc_monitor_address "das1-[SplitReply [instrument]]"
set isc_portlist [list 30000 30001 30002 30003 30004 30005 30006 30007]
set isc_numchannels [llength $isc_beam_monitor_list]
::counter::ic_initialize
} message ] {
if {$::errorCode=="NONE"} {return $message}
return -code error "$message"
}
}

View File

@@ -20,8 +20,10 @@ proc ::histogram_memory::init_OAT_TABLE {} {
}
proc ::histogram_memory::pre_count {} {}
proc ::histogram_memory::post_count {} {}
proc ::histogram_memory::initialize {} {
proc ::histogram_memory::isc_initialize {} {
if [ catch {
::histogram_memory::init_hmm_objs
if {$::sim_mode == "true"} {
hmm configure oat_ntc_eff 1
hmm configure oat_nyc_eff 210
@@ -32,7 +34,7 @@ proc ::histogram_memory::initialize {} {
SAT_TABLE -init
OAT_TABLE -init
FAT_TABLE -init
::histogram_memory::_initialize
::histogram_memory::ic_initialize
detector_active_height_mm 230
detector_active_width_mm 480

View File

@@ -8,3 +8,6 @@ proc ::scan::pre_hmm_scan_prepare {} {
}
}
proc ::scan::isc_initialize {} {
::scan::ic_initialize
}

View File

@@ -1,5 +1,5 @@
# $Revision: 1.17 $
# $Date: 2008-06-23 02:41:12 $
# $Revision: 1.18 $
# $Date: 2008-07-01 07:02:26 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by: $Author: ffr $
@@ -39,17 +39,21 @@ source gumxml.tcl
# AN ERROR IF THERE IS NO ../log/status.tcl FILE.
restore
::utility::mkVar ::anticollider::protect_detector text manager protect_detector false detector true false
::anticollider::protect_detector "true"
catch {
::utility::mkVar ::anticollider::protect_detector text manager protect_detector false detector true false
::anticollider::protect_detector "true"
::histogram_memory::initialize
::anticollider::init
server_init
if [file exists extraconfig.tcl] {
fileeval extraconfig.tcl
} else {
clientput "extraconfig.tcl not found. continueing"
if [file exists extraconfig.tcl] {
fileeval extraconfig.tcl
} else {
clientput "extraconfig.tcl not found. continueing"
}
buildHDB instrument_dictionary
}
::anticollider::init
server_init
buildHDB instrument_dictionary
clientput $errorContext
clientput $callStack

View File

@@ -1,17 +1,28 @@
set sim_mode [SplitReply [counter_simulation]]
if {$sim_mode == "true"} {
MakeCounter bm SIM 0.0;
} else {
# Make and configure an ANSTO beam monitor counter.
# This must be sourced before the hmm_configuration.tcl until we separate the scan setup from the hmm setup
MakeCounter bm anstomonitor [ params host "das1-[SplitReply [instrument]]" port "30000" ]
}
source $cfPath(counter)/counter_common_1.tcl
unset sim_mode
## TODO Put all the counter macros in the counter namespace
namespace eval counter {
variable isc_numchannels
variable isc_monitor_address
variable isc_portlist
variable isc_beam_monitor_list
proc set_sobj_attributes {} {
}
}
proc ::counter::isc_initialize {} {
if [catch {
variable isc_numchannels
variable isc_monitor_address
variable isc_portlist
variable isc_beam_monitor_list {MONITOR_1 MONITOR_2 MONITOR_3}
set isc_monitor_address "das1-[SplitReply [instrument]]"
set isc_portlist [list 30000 30001 30002 30003 30004 30005 30006 30007]
set isc_numchannels [llength $isc_beam_monitor_list]
::counter::ic_initialize
} message ] {
if {$::errorCode=="NONE"} {return $message}
return -code error "$message"
}
}

View File

@@ -17,8 +17,10 @@ proc ::histogram_memory::init_OAT_TABLE {} {
proc ::histogram_memory::pre_count {} {}
proc ::histogram_memory::post_count {} {}
proc ::histogram_memory::initialize {} {
proc ::histogram_memory::isc_initialize {} {
if [ catch {
::histogram_memory::init_hmm_objs
if {$::sim_mode == "true"} {
hmm configure oat_ntc_eff 1
hmm configure oat_nyc_eff 421
@@ -33,7 +35,7 @@ proc ::histogram_memory::initialize {} {
detector_active_height_mm 280
detector_active_width_mm 280
::histogram_memory::_initialize
::histogram_memory::ic_initialize
# hmm configure FAT_SIMULATED_EVENT_Y0 $y_bb0
# hmm configure FAT_SIMULATED_EVENT_Y1 $ybbmax

View File

@@ -1,2 +1,6 @@
source $cfPath(scan)/scan_common_1.tcl
proc ::scan::pre_hmm_scan_prepare {} {}
proc ::scan::isc_initialize {} {
::scan::ic_initialize
}

View File

@@ -1,5 +1,5 @@
# $Revision: 1.11 $
# $Date: 2008-06-23 02:41:12 $
# $Revision: 1.12 $
# $Date: 2008-07-01 07:02:26 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by: $Author: ffr $
@@ -37,14 +37,18 @@ source gumxml.tcl
# AN ERROR IF THERE IS NO ../log/status.tcl FILE.
restore
::histogram_memory::initialize
catch {
::anticollider::init
server_init
if [file exists extraconfig.tcl] {
fileeval extraconfig.tcl
} else {
clientput "extraconfig.tcl not found. continueing"
if [file exists extraconfig.tcl] {
fileeval extraconfig.tcl
} else {
clientput "extraconfig.tcl not found. continueing"
}
buildHDB instrument_dictionary
}
::anticollider::init
server_init
buildHDB instrument_dictionary
clientput $errorContext
clientput $callStack

View File

@@ -1,17 +1,28 @@
set sim_mode [SplitReply [counter_simulation]]
if {$sim_mode == "true"} {
MakeCounter bm SIM 0.0;
} else {
# Make and configure an ANSTO beam monitor counter.
# This must be sourced before the hmm_configuration.tcl until we separate the scan setup from the hmm setup
MakeCounter bm anstomonitor [ params host "das1-[SplitReply [instrument]]" port "30000" ]
}
source $cfPath(counter)/counter_common_1.tcl
unset sim_mode
## TODO Put all the counter macros in the counter namespace
namespace eval counter {
variable isc_numchannels
variable isc_monitor_address
variable isc_portlist
variable isc_beam_monitor_list
proc set_sobj_attributes {} {
}
}
proc ::counter::isc_initialize {} {
if [catch {
variable isc_numchannels
variable isc_monitor_address
variable isc_portlist
variable isc_beam_monitor_list {MONITOR_1 MONITOR_2 MONITOR_3}
set isc_monitor_address "das1-[SplitReply [instrument]]"
set isc_portlist [list 30000 30001 30002 30003 30004 30005 30006 30007]
set isc_numchannels [llength $isc_beam_monitor_list]
::counter::ic_initialize
} message ] {
if {$::errorCode=="NONE"} {return $message}
return -code error "$message"
}
}

View File

@@ -21,8 +21,10 @@ proc ::histogram_memory::init_OAT_TABLE {} {
}
proc ::histogram_memory::pre_count {} {}
proc ::histogram_memory::post_count {} {}
proc ::histogram_memory::initialize {} {
proc ::histogram_memory::isc_initialize {} {
if [ catch {
::histogram_memory::init_hmm_objs
if {$::sim_mode == "true"} {
hmm configure oat_ntc_eff 1
hmm configure oat_nyc_eff 127
@@ -33,7 +35,7 @@ proc ::histogram_memory::initialize {} {
SAT_TABLE -init
OAT_TABLE -init
FAT_TABLE -init
::histogram_memory::_initialize
::histogram_memory::ic_initialize
detector_active_height_mm 980
detector_active_width_mm 980

View File

@@ -1,5 +1,5 @@
# $Revision: 1.18 $
# $Date: 2008-06-23 02:58:58 $
# $Revision: 1.19 $
# $Date: 2008-07-01 07:02:26 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by: $Author: ffr $
@@ -678,7 +678,7 @@ Motor srce $motor_driver_type [params \
units degrees\
hardlowerlim -10\
hardupperlim 340\
maxSpeed 5\
maxSpeed 10\
maxAccel 1\
maxDecel 1\
stepsPerX [expr 25000.0/6.0]\

View File

@@ -128,7 +128,7 @@ foreach {pname motor units} {
sicslist setatt $pname units $units
sicslist setatt $pname long_name $pname
sicslist setatt $pname klass derived_parameter
sicslist setatt $pname depends $motor
# sicslist setatt $pname depends $motor
}
foreach {pname motor units} {
@@ -154,7 +154,7 @@ foreach {pname motor units} {
sicslist setatt $pname units $units
sicslist setatt $pname long_name $pname
sicslist setatt $pname klass derived_parameter
sicslist setatt $pname depends $motor
# sicslist setatt $pname depends $motor
}
foreach {pname motor units} {
@@ -191,7 +191,7 @@ foreach {pname motor units} {
sicslist setatt $pname units $units
sicslist setatt $pname long_name $pname
sicslist setatt $pname klass derived_parameter
sicslist setatt $pname depends $motor
# sicslist setatt $pname depends $motor
}
################################################################################
##

View File

@@ -1,2 +1,6 @@
source $cfPath(scan)/scan_common_1.tcl
proc ::scan::pre_hmm_scan_prepare {} {}
proc ::scan::isc_initialize {} {
::scan::ic_initialize
}

View File

@@ -1,5 +1,5 @@
# $Revision: 1.9 $
# $Date: 2008-06-23 02:41:12 $
# $Revision: 1.10 $
# $Date: 2008-07-01 07:02:26 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by: $Author: ffr $
@@ -51,14 +51,18 @@ restore
# AN ERROR IF THERE IS NO ../log/status.tcl FILE.
restore
::histogram_memory::initialize
catch {
::anticollider::init
server_init
if [file exists extraconfig.tcl] {
fileeval extraconfig.tcl
} else {
clientput "extraconfig.tcl not found. continueing"
if [file exists extraconfig.tcl] {
fileeval extraconfig.tcl
} else {
clientput "extraconfig.tcl not found. continueing"
}
buildHDB instrument_dictionary
}
::anticollider::init
server_init
buildHDB instrument_dictionary
clientput $errorContext
clientput $callStack

View File

@@ -1,7 +1,7 @@
# SICS common configuration
# $Revision: 1.35 $
# $Date: 2008-06-23 02:41:12 $
# $Revision: 1.36 $
# $Date: 2008-07-01 07:02:25 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by $Author: ffr $
@@ -131,7 +131,7 @@ sics_release [lindex $tmpstr [expr [llength $tmpstr] - 1]]
sics_release lock
::utility::mkVar sics_revision_num Text internal
set tmpstr [string map {"$" ""} {$Revision: 1.35 $}]
set tmpstr [string map {"$" ""} {$Revision: 1.36 $}]
sics_revision_num [lindex $tmpstr [expr [llength $tmpstr] - 1]]
sics_revision_num lock
@@ -175,17 +175,25 @@ proc server_set_sobj_attributes {} {
}
proc server_init {} {
MakeStateMon hmscan
sicslist setatt sics_suid privilege readonly
sicslist setatt sics_suid klass data
sicslist setatt sics_suid kind hobj
sicslist setatt sics_suid mutable true
sicslist setatt sics_suid data true
sicslist setatt sics_suid control true
sicslist setatt sics_suid nxsave true
sicslist setatt sics_suid long_name sics_suid
if [ catch {
::counter::isc_initialize
::histogram_memory::isc_initialize
::scan::isc_initialize
MakeStateMon hmscan
sicslist setatt sics_suid privilege readonly
sicslist setatt sics_suid klass data
sicslist setatt sics_suid kind hobj
sicslist setatt sics_suid mutable true
sicslist setatt sics_suid data true
sicslist setatt sics_suid control true
sicslist setatt sics_suid nxsave true
sicslist setatt sics_suid long_name sics_suid
server_set_sobj_attributes
server_set_sobj_attributes
} message ] {
if {$::errorCode=="NONE"} {return $message}
return -code error $message
}
}
# Make the opal status info object