Remove superfluous trailing white space from TCL files
This commit is contained in:
@ -174,11 +174,11 @@ proc getCMD {channel line} {
|
||||
}
|
||||
}
|
||||
}
|
||||
# Reads a command from a DMC2280 client and then performs an appropriate
|
||||
# Reads a command from a DMC2280 client and then performs an appropriate
|
||||
# action depending on whether or not the command produces output or has
|
||||
# been defined.
|
||||
proc readLine {who channel} {
|
||||
global didRead
|
||||
global didRead
|
||||
global B
|
||||
global validUID
|
||||
global validPWD
|
||||
@ -191,7 +191,7 @@ proc readLine {who channel} {
|
||||
puts "RECEIVED EOF: $line"
|
||||
close $f
|
||||
return -code error "Got EOF, close channel"
|
||||
} else {
|
||||
} else {
|
||||
puts "RECEIVED: $line"
|
||||
switch $serverState {
|
||||
"UID" {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
|
||||
# Creates a fake motion controller based on an
|
||||
# Creates a fake motion controller based on an
|
||||
# instrument configuration file.
|
||||
# Usage ./cont.tcl -cont <cnum> -port <portname>
|
||||
# where cnum is the controller number (1,2,3,4) and
|
||||
|
@ -10,16 +10,16 @@ proc serverOpen {channel addr port} {
|
||||
return;
|
||||
}
|
||||
|
||||
# Reads a command from a DMC2280 client and then performs an appropriate
|
||||
# Reads a command from a DMC2280 client and then performs an appropriate
|
||||
# action depending on whether or not the command produces output or has
|
||||
# been defined.
|
||||
proc readLine {who channel} {
|
||||
global didRead
|
||||
global didRead
|
||||
global B
|
||||
if {[gets $channel line]<0} {
|
||||
fileevent $channel readable {}
|
||||
after idle "close $channel;set out 1"
|
||||
} else {
|
||||
} else {
|
||||
puts "RECEIVED: $line"
|
||||
|
||||
foreach cmd [split $line ";"] {
|
||||
|
@ -7,7 +7,7 @@
|
||||
#parses CM exp, _CM<axis,num>, {TP,TD}<axis>, CM<axis>=exp, CM<axis>, CM
|
||||
# axis=ABCDEFGH, num=01234567
|
||||
proc parse {cmdst args} {
|
||||
# CM exp, handles MG
|
||||
# CM exp, handles MG
|
||||
if {[string length $args] > 0} {return "$cmdst $args"}
|
||||
|
||||
# _CM<axis,num>, {TP,TD}<axis> get an axis property or position
|
||||
@ -17,18 +17,18 @@ proc parse {cmdst args} {
|
||||
if {$num == 2 && [string first $cmd "TD TP"] != -1} {
|
||||
return "dmget $cmd $axis";
|
||||
}
|
||||
|
||||
|
||||
# CM<axis>=exp
|
||||
# Try
|
||||
# Try
|
||||
# set line "DPB=(_TPB - 7818915)*(25000/8192) + 0"
|
||||
# parse $line
|
||||
set cmdlst [split $cmdst =];
|
||||
if {[llength $cmdlst] == 2} {
|
||||
if {[llength $cmdlst] == 2} {
|
||||
set num [scan [lindex $cmdlst 0] {%2s%1[ABCDEFGH0-7]} cmd axis];
|
||||
return "dmset $cmd $axis [lindex $cmdlst 1]";
|
||||
}
|
||||
|
||||
# CM<par>
|
||||
# CM<par>
|
||||
set num [scan $cmdst {%2s%1[ABCDEFGH0-7]} cmd par];
|
||||
if {$num == 2} {return "dmcall $cmd $par"}
|
||||
set num [scan $cmdst {_%2s%1[ABCDEFGH0-7]} cmd par];
|
||||
|
@ -17,7 +17,7 @@ proc loadConfig {fName} {
|
||||
if [info exists ContList] {unset ContList}
|
||||
# Temporarily define unknown proc to skip undefined procs
|
||||
rename ::unknown _unknown
|
||||
proc ::unknown {args} {}
|
||||
proc ::unknown {args} {}
|
||||
if [catch {uplevel #0 source $fName} errMsg] {
|
||||
rename ::unknown ""
|
||||
rename _unknown ::unknown
|
||||
|
@ -53,7 +53,7 @@ proc mkSimAxes {instrument} {
|
||||
global IPtoContName motors ContList simConts;
|
||||
puts [array get IPtoContName];
|
||||
puts $motors;
|
||||
|
||||
|
||||
foreach c $ContList {
|
||||
set simFile($c) [open ${c}_sim.tcl w];
|
||||
}
|
||||
|
@ -151,21 +151,21 @@ proc nextstep {paxis step args} {
|
||||
set currPos [expr ($axis(TP) - $axis(ABSHOME))/abs(double($axis(cntsperx)))]
|
||||
if {$axis(ST) == 1} {
|
||||
set axis(TS) 44; # Stopped, limit switches open
|
||||
set axis(BG) 0; # motor has stopped
|
||||
set axis(BG) 0; # motor has stopped
|
||||
set axis(ST) 0; # make sure stop flag is unset
|
||||
set axis(SC) 4; # motor stopped by stop command (ST)
|
||||
set axis(ATLIM) false
|
||||
set finished true
|
||||
} elseif {$currPos >= $axis(UPLIM)} {
|
||||
set axis(TS) 36; # Stopped on forward limit switch
|
||||
set axis(BG) 0; # motor has stopped
|
||||
set axis(BG) 0; # motor has stopped
|
||||
set axis(ST) 0; # make sure stop flag is unset
|
||||
set axis(SC) 2; # motor stopped by limit switch
|
||||
set axis(ATLIM) upper
|
||||
set finished true
|
||||
} elseif {$currPos <= $axis(LOLIM)} {
|
||||
set axis(TS) 40; # Stopped on reverse limit switch
|
||||
set axis(BG) 0; # motor has stopped
|
||||
set axis(BG) 0; # motor has stopped
|
||||
set axis(ST) 0; # make sure stop flag is unset
|
||||
set axis(SC) 3; # motor stopped by limit switch
|
||||
set axis(ATLIM) lower
|
||||
@ -176,7 +176,7 @@ proc nextstep {paxis step args} {
|
||||
# set axis(TP) [expr int(round($diff*$mult + $axis(TP)))];
|
||||
# set axis(TD) [expr int($target)];
|
||||
set axis(TS) 44; # Stopped, limit switches open
|
||||
set axis(BG) 0; # motor has stopped
|
||||
set axis(BG) 0; # motor has stopped
|
||||
set axis(ST) 0; # make sure stop flag is unset
|
||||
set axis(SC) 1; # motor stopped at commanded position
|
||||
set axis(ATLIM) false
|
||||
|
@ -129,7 +129,7 @@ proc readLine {channel} {
|
||||
}
|
||||
default {
|
||||
puts stderr "ERROR: Unknown command type $cmdType, should be 'L' or 'S'"
|
||||
}
|
||||
}
|
||||
}
|
||||
flush stdout
|
||||
flush stderr
|
||||
|
@ -90,7 +90,7 @@ global STB
|
||||
}
|
||||
gets $channel data
|
||||
puts "RECEIVED: $data"
|
||||
switch [llength $data] {
|
||||
switch [llength $data] {
|
||||
0 {
|
||||
puts "Oops received nothing"
|
||||
set cmd XXX
|
||||
@ -208,12 +208,12 @@ global STB
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
flush stdout
|
||||
flush stderr
|
||||
flush $channel
|
||||
|
||||
|
||||
}
|
||||
|
||||
# startserver -port 1034
|
||||
|
@ -1,15 +1,15 @@
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
|
||||
# @file This is a barebones SICS configuration file, it's useful for testing
|
||||
# @file This is a barebones SICS configuration file, it's useful for testing
|
||||
# drivers in isolation.
|
||||
#
|
||||
# NOTE\n
|
||||
# This configuration does not create a GumTree interface or let you
|
||||
# save nexus data files.
|
||||
|
||||
# Required by server_config.tcl
|
||||
# Required by server_config.tcl
|
||||
VarMake Instrument Text Internal
|
||||
Instrument bear
|
||||
Instrument bear
|
||||
Instrument lock
|
||||
|
||||
#START SERVER CONFIGURATION SECTION
|
||||
@ -19,24 +19,24 @@ source sics_ports.tcl
|
||||
|
||||
set sicsroot ../
|
||||
source util/utility.tcl
|
||||
ServerOption LogFileBaseName $sicsroot/log/serverlog
|
||||
ServerOption LogFileBaseName $sicsroot/log/serverlog
|
||||
|
||||
###### installprotocolhandler
|
||||
###### installprotocolhandler
|
||||
|
||||
ServerOption statusfile $sicsroot/log/status.tcl
|
||||
ServerOption RedirectFile $sicsroot/log/stdout
|
||||
ServerOption LogFileDir $sicsroot/log
|
||||
ServerOption statusfile $sicsroot/log/status.tcl
|
||||
ServerOption RedirectFile $sicsroot/log/stdout
|
||||
ServerOption LogFileDir $sicsroot/log
|
||||
ServerOption QuieckPort [get_portnum $quieckport ]
|
||||
ServerOption ServerPort [get_portnum $serverport ]
|
||||
ServerOption InterruptPort [get_portnum $interruptport ]
|
||||
ServerOption TelWord sicslogin
|
||||
ServerOption TelWord sicslogin
|
||||
ServerOption TelnetPort [get_portnum $telnetport ]
|
||||
ServerOption ReadUserPasswdTimeout 600000
|
||||
ServerOption AcceptTimeOut 10
|
||||
ServerOption ReadTimeOut 1000
|
||||
SicsUser manager ansto 1
|
||||
SicsUser user sydney 2
|
||||
SicsUser spy 007 3
|
||||
ServerOption ReadUserPasswdTimeout 600000
|
||||
ServerOption AcceptTimeOut 10
|
||||
ServerOption ReadTimeOut 1000
|
||||
SicsUser manager ansto 1
|
||||
SicsUser user sydney 2
|
||||
SicsUser spy 007 3
|
||||
|
||||
MakeDrive
|
||||
#InstallHdb
|
||||
|
@ -1,8 +1,8 @@
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
|
||||
# Required by server_config.tcl
|
||||
# Required by server_config.tcl
|
||||
VarMake Instrument Text Internal
|
||||
Instrument bilby
|
||||
Instrument bilby
|
||||
Instrument lock
|
||||
|
||||
#START SERVER CONFIGURATION SECTION
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
|
||||
fileeval $cfPath(anticollider)/anticollider_common.tcl
|
||||
fileeval $cfPath(anticollider)/anticollider_common.tcl
|
||||
|
||||
namespace eval ::anticollider {
|
||||
set guide_posit 1
|
||||
|
@ -10,7 +10,7 @@ if {$sim_mode == false} {
|
||||
}
|
||||
::utility::macro::getset int master_chopper_id {args} {
|
||||
variable sim_mode [SplitReply [chopper_simulation]]
|
||||
|
||||
|
||||
if {$sim_mode == false} {
|
||||
if {$args == ""} {
|
||||
chopsel send {get master chopper}
|
||||
|
@ -22,20 +22,20 @@ namespace eval motor {
|
||||
# (Xbbs, Zbbs) = beam pos in beamstop coords
|
||||
# (Xdf,Zdf) = detector pos in frame coords
|
||||
# (Xbsf,Zbsf) = beamstop pos in frame coords
|
||||
#
|
||||
#
|
||||
# (Xbf,Zbf) = (Xdf+Xbd, Zdf+Zbd) = (Xbsf+Xbbs, Zbsf+Zbbs)
|
||||
# Origin of detector coords = frame origin
|
||||
#
|
||||
#
|
||||
# Detector and beamstop motor readings with beamstop disk centers
|
||||
# overlapping over detector center mark.
|
||||
# Xdf = 264.542 (7283813) Zdf = 0
|
||||
# Xbbs = 296.291 (8054270)
|
||||
# Zbbs = 259.641 (13488244)
|
||||
# Xbd = dethw, Zbd = (dethh)
|
||||
#
|
||||
#
|
||||
# 264.542+dethw = Xbsf+296.291
|
||||
# 0+dethh = Zbsf+259.641
|
||||
#
|
||||
#
|
||||
# Xbsf = -31.749 + dethw, Zbsf = -259.641 + dethh
|
||||
proc selbs {bs {bx "UNDEF"} {bz "UNDEF"}} {
|
||||
set bsdriving false
|
||||
@ -153,7 +153,7 @@ namespace eval optics {
|
||||
VarMake ::optics::select::section text user
|
||||
VarMake ::optics::polarizer::in text user
|
||||
VarMake ::optics::lens::selection text user
|
||||
|
||||
|
||||
command rotary_attenuator {int=0,15,45,90,180 angle} {
|
||||
drive att $angle
|
||||
}
|
||||
@ -180,7 +180,7 @@ namespace eval optics {
|
||||
# @param row, selects a row from the guide configuration table
|
||||
#
|
||||
# eg\n
|
||||
# guide ga
|
||||
# guide ga
|
||||
command guide "
|
||||
text=[join [array names ::optics::guide_configuration] , ] configuration
|
||||
" {
|
||||
@ -193,7 +193,7 @@ namespace eval optics {
|
||||
foreach {compselection position} $guide_configuration($configuration) {
|
||||
foreach el $compselection guide $guide_configuration_columns {
|
||||
lappend to_config $guide
|
||||
lappend to_config [set ::optics::${guide}_map($el)]
|
||||
lappend to_config [set ::optics::${guide}_map($el)]
|
||||
}
|
||||
::optics::guide -set feedback status BUSY
|
||||
set msg [eval "drive $to_config"]
|
||||
|
@ -5,7 +5,7 @@ namespace eval counter {
|
||||
variable isc_numchannels
|
||||
variable isc_monitor_address
|
||||
variable isc_portlist
|
||||
variable isc_beam_monitor_list
|
||||
variable isc_beam_monitor_list
|
||||
proc set_sobj_attributes {} {
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ set sim_mode [SplitReply [hmm_simulation]]
|
||||
|
||||
proc ::histogram_memory::init_OAT_TABLE {} {
|
||||
if [ catch {
|
||||
# We don't need a MAX_CHAN parameter for time because the time channel
|
||||
# We don't need a MAX_CHAN parameter for time because the time channel
|
||||
# is scaled by calling the ::histogram_memory::clock_scale function
|
||||
OAT_TABLE X -setdata MAX_CHAN 240
|
||||
OAT_TABLE Y -setdata MAX_CHAN 256
|
||||
@ -19,7 +19,7 @@ proc ::histogram_memory::init_OAT_TABLE {} {
|
||||
hmm configure fat_frame_frequency $freq
|
||||
hmm configure fat_frame_source INTERNAL
|
||||
|
||||
OAT_TABLE -set X { 239.5 238.5 } NXC 240 Y { -0.5 0.5 } NYC 256 T { 0 20000 } NTC 1
|
||||
OAT_TABLE -set X { 239.5 238.5 } NXC 240 Y { -0.5 0.5 } NYC 256 T { 0 20000 } NTC 1
|
||||
} message ] {
|
||||
return -code error $message
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ if {$sim_mode == false} {
|
||||
}
|
||||
|
||||
# ap1 configuration
|
||||
# Aperture Selector (Collimator SEG 1 Start)
|
||||
# Aperture Selector (Collimator SEG 1 Start)
|
||||
# Axis number 1
|
||||
Motor ap1 $motor_driver_type [params\
|
||||
asyncqueue mc1\
|
||||
|
@ -1,17 +1,17 @@
|
||||
namespace eval optics {
|
||||
array set AttRotLookupTable {
|
||||
0 { 0.0 1 }
|
||||
30 { 1.3 0.498782 }
|
||||
60 { 3.3 0.176433 }
|
||||
90 { 4.9 0.0761367 }
|
||||
120 { 6.4 0.0353985 }
|
||||
150 { 8.3 0.0137137 }
|
||||
180 { 9.6 0.00614167 }
|
||||
210 {11.2 0.00264554 }
|
||||
240 {13.1 0.000994504 }
|
||||
270 {15.0 0.000358897 }
|
||||
300 {18.0 7.2845e-05 }
|
||||
330 {25.0 1.67827e-06 }
|
||||
0 { 0.0 1 }
|
||||
30 { 1.3 0.498782 }
|
||||
60 { 3.3 0.176433 }
|
||||
90 { 4.9 0.0761367 }
|
||||
120 { 6.4 0.0353985 }
|
||||
150 { 8.3 0.0137137 }
|
||||
180 { 9.6 0.00614167 }
|
||||
210 {11.2 0.00264554 }
|
||||
240 {13.1 0.000994504 }
|
||||
270 {15.0 0.000358897 }
|
||||
300 {18.0 7.2845e-05 }
|
||||
330 {25.0 1.67827e-06 }
|
||||
}
|
||||
|
||||
array set EApLookupTable {
|
||||
|
@ -1,5 +1,5 @@
|
||||
##
|
||||
# @file
|
||||
# @file
|
||||
# A guide configuration table where each line describes the setup
|
||||
# for a mode of operation.
|
||||
# The table will have a corresponding interpretation list which provides
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
namespace eval optics {
|
||||
##
|
||||
# @brief These arrays map the component identifiers (G, MT, etc) to the
|
||||
# @brief These arrays map the component identifiers (G, MT, etc) to the
|
||||
# position index for each guide motor (c1, c2 ... c9)
|
||||
array set c1_map {G 1 MT 2 P 3}
|
||||
array set c2_map {MT 1 G 2 A 3}
|
||||
@ -20,43 +20,43 @@ namespace eval optics {
|
||||
array set c9_map {L 1 MT 2 G 3 A 4 LP 5}
|
||||
|
||||
# The guide configuration table is indexed by a configuration
|
||||
# identifier (ga, mt, lp, etc). Each row has two elements,
|
||||
# identifier (ga, mt, lp, etc). Each row has two elements,
|
||||
# 1. A list of components selected for each guide (MT A ... etc)
|
||||
# 2. The entrance aperature position in mm
|
||||
# Eg $guide_configuration(p2) returns the following list
|
||||
# {{P G A A A A A A A } 6934}
|
||||
# {{P G A A A A A A A } 6934}
|
||||
array set guide_configuration {
|
||||
ga {{MT A A A A A A A A } 675}
|
||||
ga {{MT A A A A A A A A } 675}
|
||||
mt {{MT MT MT MT MT MT MT MT MT} 675}
|
||||
lp {{MT MT MT MT MT MT MT MT LP} 675}
|
||||
lens {{MT A A A A A A A L } 675}
|
||||
p1 {{P A MT MT MT MT MT MT MT} 4621}
|
||||
p1lp {{P A MT MT MT MT MT MT LP} 4621}
|
||||
p1lens {{P A MT MT MT MT MT MT L } 4621}
|
||||
g1 {{G A A A A A A A A } 4929}
|
||||
p2 {{P G A A A A A A A } 6934}
|
||||
g2 {{G G A A A A A A A } 6934}
|
||||
p3 {{P G G A A A A A A } 8949}
|
||||
g3 {{G G G A A A A A A } 8949}
|
||||
p4 {{P G G G A A A A A } 10955}
|
||||
g4 {{G G G G A A A A A } 10955}
|
||||
p5 {{P G G G G A A A A } 12943}
|
||||
g5 {{G G G G G A A A A } 12943}
|
||||
p6 {{P G G G G G A A A } 14970}
|
||||
g6 {{G G G G G G A A A } 14970}
|
||||
p7 {{P G G G G G G A A } 16971}
|
||||
g7 {{G G G G G G G A A } 16971}
|
||||
p8 {{P G G G G G G G A } 18937}
|
||||
g8 {{G G G G G G G G A } 18937}
|
||||
p9 {{P G G G G G G G G } 19925}
|
||||
g9 {{G G G G G G G G G } 19925}
|
||||
lp {{MT MT MT MT MT MT MT MT LP} 675}
|
||||
lens {{MT A A A A A A A L } 675}
|
||||
p1 {{P A MT MT MT MT MT MT MT} 4621}
|
||||
p1lp {{P A MT MT MT MT MT MT LP} 4621}
|
||||
p1lens {{P A MT MT MT MT MT MT L } 4621}
|
||||
g1 {{G A A A A A A A A } 4929}
|
||||
p2 {{P G A A A A A A A } 6934}
|
||||
g2 {{G G A A A A A A A } 6934}
|
||||
p3 {{P G G A A A A A A } 8949}
|
||||
g3 {{G G G A A A A A A } 8949}
|
||||
p4 {{P G G G A A A A A } 10955}
|
||||
g4 {{G G G G A A A A A } 10955}
|
||||
p5 {{P G G G G A A A A } 12943}
|
||||
g5 {{G G G G G A A A A } 12943}
|
||||
p6 {{P G G G G G A A A } 14970}
|
||||
g6 {{G G G G G G A A A } 14970}
|
||||
p7 {{P G G G G G G A A } 16971}
|
||||
g7 {{G G G G G G G A A } 16971}
|
||||
p8 {{P G G G G G G G A } 18937}
|
||||
g8 {{G G G G G G G G A } 18937}
|
||||
p9 {{P G G G G G G G G } 19925}
|
||||
g9 {{G G G G G G G G G } 19925}
|
||||
}
|
||||
|
||||
# This list maps the motor names to columns of the
|
||||
# guide_configuration table.
|
||||
set guide_configuration_columns {
|
||||
c1 c2 c3 c4 c5 c6 c7 c8 c9
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
set sim_mode [SplitReply [plc_simulation]]
|
||||
if {$sim_mode == "false"} {
|
||||
if {$sim_mode == "false"} {
|
||||
MakeAsyncQueue plc_chan SafetyPLC [dict get $::PLC_HOSTPORT HOST] [dict get $::PLC_HOSTPORT PORT]
|
||||
MakeSafetyPLC plc plc_chan 0
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ foreach {bm host port} {
|
||||
}
|
||||
|
||||
# HISTOGRAM SERVER HOST AND PORT
|
||||
# TODO HV control
|
||||
# TODO HV control
|
||||
foreach {key host port} {
|
||||
HMM das1-bilby.nbi.ansto.gov.au 8080
|
||||
HMSTAT das1-bilby.nbi.ansto.gov.au 8081
|
||||
|
@ -6,7 +6,7 @@ AntiCollisionInstall
|
||||
namespace eval anticollider {
|
||||
variable veto_region
|
||||
}
|
||||
array unset ::anticollider::veto_region
|
||||
array unset ::anticollider::veto_region
|
||||
array set ::anticollider::veto_region ""
|
||||
|
||||
# Don't show 'acscript' call on error. This is done by the anticollider
|
||||
@ -45,7 +45,7 @@ proc handle_acscript_exception {status message args} {
|
||||
proc ::anticollider::loadscript {args} {
|
||||
variable veto_rules
|
||||
|
||||
set fh [open $::cfPath(anticollider)/[lindex $args 0] RDONLY ]
|
||||
set fh [open $::cfPath(anticollider)/[lindex $args 0] RDONLY ]
|
||||
while {[gets $fh line] >= 0} {
|
||||
# Skip empty lines and comments
|
||||
if [regexp {^\s*$|^ *#} $line] {
|
||||
@ -60,7 +60,7 @@ proc ::anticollider::loadscript {args} {
|
||||
# for the anticollider script.
|
||||
#
|
||||
# @param veto_rules, an anticollider declaration as a list of quote enclosed lines.
|
||||
# @return Generates the ::anticollider::veto_region lookup table.
|
||||
# @return Generates the ::anticollider::veto_region lookup table.
|
||||
#
|
||||
# Example\n
|
||||
# forbid {160 167} for stth when mtth in {87 88}\n
|
||||
@ -72,7 +72,7 @@ proc ::anticollider::loadscript {args} {
|
||||
# forbid {0 10} for samx whenall { samrot in {0 5} samy in {0 15} }\n
|
||||
proc ::anticollider::genveto {veto_rules} {
|
||||
variable veto_region
|
||||
array unset veto_region
|
||||
array unset veto_region
|
||||
set lnum 1
|
||||
|
||||
foreach line $veto_rules {
|
||||
@ -98,7 +98,7 @@ proc ::anticollider::genveto {veto_rules} {
|
||||
}
|
||||
|
||||
##
|
||||
# @brief Instrument specific configurations should re-implement this if they want
|
||||
# @brief Instrument specific configurations should re-implement this if they want
|
||||
# to override the anticollision detection on some conditions
|
||||
#
|
||||
# @param args list of motorname target pairs
|
||||
@ -113,7 +113,7 @@ proc ::anticollider::enable {args} {
|
||||
# WARNING: This does not handle sequencing. Only run one motor at a time.
|
||||
# This script requires that an ::anticollider::veto_region has been generated
|
||||
# by the ::anticollider::genveto procedure.
|
||||
#
|
||||
#
|
||||
# The ::anticollider::veto_region is a hash indexed by the names of the motors
|
||||
# which have been registered with the anticollision module.
|
||||
proc ::anticollider::veto_region_acscript {args} {
|
||||
|
@ -86,7 +86,7 @@ command hdb_bmonscan {
|
||||
text=monitor,timer mode
|
||||
float preset
|
||||
int=0,2 channel
|
||||
} {
|
||||
} {
|
||||
|
||||
bmonscan clear
|
||||
# bmonscan configure script
|
||||
@ -154,7 +154,7 @@ scriptcallback connect bm COUNTSTART "::monitor::count -set feedback status BUSY
|
||||
scriptcallback connect bm COUNTEND "::monitor::count -set feedback status IDLE"
|
||||
################################################################################
|
||||
|
||||
# Generate the following commands,
|
||||
# Generate the following commands,
|
||||
# ::motor::go_home
|
||||
namespace eval ::motor {
|
||||
set NS [uplevel namespace current]
|
||||
@ -162,8 +162,8 @@ scriptcallback connect bm COUNTEND "::monitor::count -set feedback status IDLE
|
||||
return -code error "ERROR: Instrument specific command config must set ${NS}::is_homing_list\n"
|
||||
}
|
||||
command go_home "text=$is_homing_list motors" {
|
||||
# Instrument specific command configurations must define
|
||||
# ::motor::is_homing_list, this is a possibly empty comma separated list
|
||||
# Instrument specific command configurations must define
|
||||
# ::motor::is_homing_list, this is a possibly empty comma separated list
|
||||
# of motors which are safe to send to home
|
||||
variable is_homing_list
|
||||
|
||||
|
@ -4,13 +4,13 @@ set scaleval 1000.0
|
||||
proc SetVoltScale {newscaleval} {
|
||||
global scaleval
|
||||
set scaleval $newscaleval
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
proc VoltScale {involt} {
|
||||
global scaleval
|
||||
return [expr {($involt*1.0)/$scaleval}]
|
||||
}
|
||||
|
||||
|
||||
proc SetVolt {volt} {
|
||||
if {$volt== 0} {
|
||||
PulserOff
|
||||
@ -56,7 +56,7 @@ proc VoltRamp {start step fin oscno} {
|
||||
|
||||
newfile HISTOGRAM_XY
|
||||
set loopvar 1
|
||||
set i 0
|
||||
set i 0
|
||||
while {$loopvar} {
|
||||
set j [expr {$i*$step+$start}]
|
||||
if {$j> $fin && $step > 0} {break}
|
||||
@ -71,7 +71,7 @@ proc VoltRamp {start step fin oscno} {
|
||||
oscmd start $oscno
|
||||
hmm countblock
|
||||
save $i
|
||||
incr i
|
||||
incr i
|
||||
}
|
||||
oscmd stop
|
||||
}
|
||||
@ -81,7 +81,7 @@ proc VoltTextureRamp {start step fin mot tstart tstep tfin oscno} {
|
||||
|
||||
|
||||
set loopvar 1
|
||||
set i 0
|
||||
set i 0
|
||||
while {$loopvar} {
|
||||
set j [expr {$i*$step+$start}]
|
||||
if {$j> $fin && $step > 0} {break}
|
||||
@ -105,7 +105,7 @@ proc VoltTextureRamp {start step fin mot tstart tstep tfin oscno} {
|
||||
oscmd start $oscno
|
||||
hmm countblock
|
||||
save $m
|
||||
incr m
|
||||
incr m
|
||||
}
|
||||
oscmd stop
|
||||
incr i
|
||||
@ -121,14 +121,14 @@ proc SquarePulseTexture {motor start step numsteps volt freq bins oscno} {
|
||||
set pulservolt [VoltScale $volt]
|
||||
PulserSquare $freq $pulservolt
|
||||
PulserOn
|
||||
|
||||
|
||||
for {set i 0} {$i < $numsteps} {incr i} {
|
||||
drive $motor [expr $i*$step+$start]
|
||||
oscmd start $oscno
|
||||
hmm countblock
|
||||
save $i
|
||||
}
|
||||
|
||||
|
||||
oscmd stop
|
||||
}
|
||||
|
||||
@ -140,14 +140,14 @@ proc UniPulseTexture {motor start step numsteps volt freq bins oscno} {
|
||||
set pulservolt [VoltScale [expr ($volt*1.0/2)]]
|
||||
PulserSquareOffs $freq $pulservolt $pulservolt
|
||||
PulserOn
|
||||
|
||||
|
||||
for {set i 0} {$i < $numsteps} {incr i} {
|
||||
drive $motor [expr $i*$step+$start]
|
||||
oscmd start $oscno
|
||||
hmm countblock
|
||||
save $i
|
||||
}
|
||||
|
||||
|
||||
oscmd stop
|
||||
}
|
||||
|
||||
@ -167,7 +167,7 @@ proc BehlkePulseTexture {motor start step numsteps freq bins oscno} {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
proc SquarePulseVolt {start step fin freq bins oscno} {
|
||||
histmem mode unlimited
|
||||
@ -175,7 +175,7 @@ proc SquarePulseVolt {start step fin freq bins oscno} {
|
||||
histmem_period_strobo $freq $bins
|
||||
wait 3
|
||||
set loopvar 1
|
||||
set i 0
|
||||
set i 0
|
||||
while {$loopvar} {
|
||||
set j [expr {$i*$step+$start}]
|
||||
if {$j> $fin && $step > 0} {break}
|
||||
@ -191,7 +191,7 @@ proc SquarePulseVolt {start step fin freq bins oscno} {
|
||||
oscmd start $oscno
|
||||
hmm countblock
|
||||
save $i
|
||||
incr i
|
||||
incr i
|
||||
}
|
||||
oscmd stop
|
||||
}
|
||||
@ -200,7 +200,7 @@ proc SquarePulseFreq {volt freqlist bins oscno} {
|
||||
histmem mode unlimited
|
||||
newfile HISTOGRAM_XYT
|
||||
set loopvar 1
|
||||
set i 0
|
||||
set i 0
|
||||
foreach freq $freqlist {
|
||||
set pulservolt [VoltScale $volt]
|
||||
histmem_period_strobo $freq $bins
|
||||
@ -211,7 +211,7 @@ proc SquarePulseFreq {volt freqlist bins oscno} {
|
||||
oscmd start $oscno
|
||||
hmm countblock
|
||||
save $i
|
||||
incr i
|
||||
incr i
|
||||
}
|
||||
oscmd stop
|
||||
}
|
||||
@ -259,7 +259,7 @@ proc UniPulseFreq {volt freqlist bins oscno} {
|
||||
histmem mode unlimited
|
||||
newfile HISTOGRAM_XYT
|
||||
set loopvar 1
|
||||
set i 0
|
||||
set i 0
|
||||
foreach freq $freqlist {
|
||||
set pulservolt [VoltScale [expr ($volt*1.0/2)]]
|
||||
histmem_period_strobo $freq $bins
|
||||
@ -271,7 +271,7 @@ proc UniPulseFreq {volt freqlist bins oscno} {
|
||||
oscmd start $oscno
|
||||
hmm countblock
|
||||
save $i
|
||||
incr i
|
||||
incr i
|
||||
}
|
||||
oscmd stop
|
||||
}
|
||||
@ -298,7 +298,7 @@ proc UniPulseFatigue {volt freq bins oscno reps runs} {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
proc PulserBurst {} {
|
||||
@ -341,7 +341,7 @@ proc VoltPulseRun {vlo vhi freq cycl} {
|
||||
|
||||
|
||||
proc VoltPulses {vlo vhi freq cycl} {
|
||||
PulserOff
|
||||
PulserOff
|
||||
pulser send "FUNC SQU;:FUNC?"
|
||||
VoltPulseRun $vlo $vhi $freq $cycl
|
||||
}
|
||||
@ -350,7 +350,7 @@ proc VoltTriPulses {vlo vhi freq cycl} {
|
||||
PulserOff
|
||||
pulser send "FUNC RAMP;:FUNC?"
|
||||
pulser send "FUNC:RAMP:SYMM 50;:FUNC:RAMP:SYMM?"
|
||||
VoltPulseRun $vlo $vhi $freq $cycl
|
||||
VoltPulseRun $vlo $vhi $freq $cycl
|
||||
}
|
||||
|
||||
proc OneTri {volt period} {
|
||||
@ -375,7 +375,7 @@ proc OneTri {volt period} {
|
||||
PulserOff
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
publish GetVolt user
|
||||
publish SetDC user
|
||||
|
@ -58,7 +58,7 @@ proc PulserDC {Volt} {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
publish PulserOn user
|
||||
|
@ -2,7 +2,7 @@ namespace eval counter {
|
||||
variable isc_numchannels
|
||||
variable isc_monitor_address
|
||||
variable isc_portlist
|
||||
variable isc_beam_monitor_list
|
||||
variable isc_beam_monitor_list
|
||||
}
|
||||
|
||||
proc ::counter::transferscript {} {
|
||||
@ -21,7 +21,7 @@ proc ::counter::ic_initialize {} {
|
||||
variable isc_numchannels
|
||||
variable isc_monitor_address
|
||||
variable isc_portlist
|
||||
variable isc_beam_monitor_list
|
||||
variable isc_beam_monitor_list
|
||||
|
||||
set sim_mode [SplitReply [counter_simulation]]
|
||||
if {$sim_mode == "true"} {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 }
|
||||
|
@ -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"} {
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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]} {
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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]"
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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]
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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} }
|
||||
|
@ -97,7 +97,7 @@ set NXgeometry_template {
|
||||
|
||||
set NXaperture_template [subst -novariables {
|
||||
NXaperture {
|
||||
$name {
|
||||
$name {
|
||||
sobjlist {$paramarr(material) $paramarr(description)}
|
||||
[ set NXgeometry_template ]
|
||||
}
|
||||
@ -192,7 +192,7 @@ proc ::hdb::MakeVelocity_Selector {name paramlist} {
|
||||
# A NeXus-class template is a keyed-list which has Tcl variables for some of the nodes,
|
||||
# if the Tcl variables aren't defined for some branch then that branch is removed.
|
||||
# All other variables are expanded in place, also all 'sobjlists' are split up into type
|
||||
# specific lists. This is intended as a helper function for commands which generate
|
||||
# specific lists. This is intended as a helper function for commands which generate
|
||||
# NeXus-class keyed lists from a simple set of optional parameters.
|
||||
#
|
||||
# @param NXklist, This is a keyed list representation of the NeXus class which will be augmented
|
||||
@ -215,7 +215,7 @@ proc prune_NX {NXklist nx_template {path ""} {node ""} {level 1}} {
|
||||
foreach var $v {
|
||||
if {[string index $var 0] == "$"} {
|
||||
set vn [string range $var 1 end]
|
||||
upvar $level $vn lvar
|
||||
upvar $level $vn lvar
|
||||
if [info exists lvar] {
|
||||
foreach sobj $lvar {
|
||||
lappend [getatt $sobj type]_list $sobj
|
||||
@ -244,7 +244,7 @@ proc prune_NX {NXklist nx_template {path ""} {node ""} {level 1}} {
|
||||
array set linkinfo $v
|
||||
if {[string index $linkinfo(target) 0] == "$"} {
|
||||
set vn [string range $linkinfo(target) 1 end]
|
||||
upvar $level $vn lvar
|
||||
upvar $level $vn lvar
|
||||
if [info exists lvar] {
|
||||
set linktarget $lvar
|
||||
}
|
||||
@ -253,7 +253,7 @@ proc prune_NX {NXklist nx_template {path ""} {node ""} {level 1}} {
|
||||
}
|
||||
if {[string index $linkinfo(nxalias) 0] == "$"} {
|
||||
set vn [string range $linkinfo(nxalias) 1 end]
|
||||
upvar $level $vn avar
|
||||
upvar $level $vn avar
|
||||
if [info exists avar] {
|
||||
set linkname $avar
|
||||
}
|
||||
@ -268,7 +268,7 @@ proc prune_NX {NXklist nx_template {path ""} {node ""} {level 1}} {
|
||||
default {
|
||||
if {[string range $n 0 1] == "NX"} {
|
||||
set node $n
|
||||
} elseif {[string index $n 0] == "$"} {
|
||||
} elseif {[string index $n 0] == "$"} {
|
||||
set vn [string range $n 1 end]
|
||||
upvar $level $vn lvar
|
||||
if [info exists lvar] {
|
||||
@ -316,14 +316,14 @@ proc ::hdb::set_subtree_props {st_name klass {control "true"} {privilege "user"}
|
||||
publish $st_name mugger
|
||||
sicslist setatt $st_name klass $klass
|
||||
sicslist setatt $st_name control $control
|
||||
sicslist setatt $st_name privilege $privilege
|
||||
sicslist setatt $st_name privilege $privilege
|
||||
sicslist setatt $st_name kind "hdb_subtree"
|
||||
sicslist setatt $st_name long_name "@none"
|
||||
sicslist setatt $st_name data "true"
|
||||
sicslist setatt $st_name nxsave "true"
|
||||
}
|
||||
|
||||
# @brief Add a subtree to a given hipadaba path.
|
||||
# @brief Add a subtree to a given hipadaba path.
|
||||
#
|
||||
# @param hpath, Basepath for subtree
|
||||
# @param object, SICS object name
|
||||
@ -331,10 +331,10 @@ proc ::hdb::set_subtree_props {st_name klass {control "true"} {privilege "user"}
|
||||
# @param type, the SICS object type if we are adding SICS object node. Optional, default = @none.
|
||||
# @param makenode, type of node to make. Optional, default = @none.
|
||||
proc ::hdb::add_subtree {hpath subtree {object @none} {type @none} {makenode @none}} {
|
||||
set ::errorInfo ""
|
||||
set ::errorInfo ""
|
||||
set SICStypes {sicsvariable macro}
|
||||
if [catch {
|
||||
switch $makenode {
|
||||
switch $makenode {
|
||||
"@none" {
|
||||
foreach {n v} $subtree {
|
||||
if {[lsearch -exact $::nexus_classes $n] >= 0} {
|
||||
@ -360,7 +360,7 @@ proc ::hdb::add_subtree {hpath subtree {object @none} {type @none} {makenode @no
|
||||
if {$item==$object} {
|
||||
error "ERROR: Infinite recursion, cannot add $item as a node to it's own hdb subtree"
|
||||
}
|
||||
set objtype [getatt $item type]
|
||||
set objtype [getatt $item type]
|
||||
if {$type != $objtype} {
|
||||
error "ERROR: Specified type of '$type' doesn't match actual type, '$objtype', for $item"
|
||||
}
|
||||
@ -468,7 +468,7 @@ proc ::hdb::add_node {basePath args} {
|
||||
|
||||
array unset arg_array
|
||||
set catch_status [ catch {
|
||||
array set arg_array $args
|
||||
array set arg_array $args
|
||||
if {[info exists arg_array(path)] && [info exists arg_array(prop_list)]} {
|
||||
add_hpath $basePath $arg_array(path)
|
||||
if {$basePath == "/"} {
|
||||
@ -499,7 +499,7 @@ proc ::hdb::add_node {basePath args} {
|
||||
array set attribute [::utility::normalattlist $node_name]
|
||||
switch $arg_array(kind) {
|
||||
command {
|
||||
# A command is a macro, node=macro name
|
||||
# A command is a macro, node=macro name
|
||||
set command $node_name
|
||||
set cmd_path [add_command $basePath $command]
|
||||
set node_path $cmd_path
|
||||
@ -508,7 +508,7 @@ proc ::hdb::add_node {basePath args} {
|
||||
if {[string length [info procs ${command}_parameters]] > 0} {
|
||||
${command}_parameters add_node $cmd_path
|
||||
} else {
|
||||
$command -map param ::hdb::add_cmd_par $cmd_path
|
||||
$command -map param ::hdb::add_cmd_par $cmd_path
|
||||
}
|
||||
if {[string length [info procs ${command}_feedback]] > 0} {
|
||||
add_hpath $cmd_path feedback
|
||||
@ -517,7 +517,7 @@ proc ::hdb::add_node {basePath args} {
|
||||
} else {
|
||||
add_hpath $cmd_path feedback
|
||||
hsetprop $cmd_path/feedback type part
|
||||
$command -map feedback ::hdb::add_feedback $cmd_path/feedback
|
||||
$command -map feedback ::hdb::add_feedback $cmd_path/feedback
|
||||
}
|
||||
}
|
||||
hobj {
|
||||
@ -561,7 +561,7 @@ proc ::hdb::add_node {basePath args} {
|
||||
#hmakescript $node_path $arg_array(rscript) $arg_array(wscript) $arg_array(dtype) $arg_array(dlen)
|
||||
}
|
||||
}
|
||||
if {[info exists attribute(units)]} {
|
||||
if {[info exists attribute(units)]} {
|
||||
hsetprop $node_path units [normalgetatt $node_name units]
|
||||
}
|
||||
if {[info exists arg_array(prop_list)]} {
|
||||
@ -569,10 +569,10 @@ proc ::hdb::add_node {basePath args} {
|
||||
hsetprop $node_path $prop $pval
|
||||
}
|
||||
}
|
||||
if {[info exists attribute(depends)]} {
|
||||
if {[info exists attribute(depends)]} {
|
||||
foreach dep [split [normalgetatt $node_name depends] , ] {
|
||||
set sobjadd_state(depends) true
|
||||
::hdb::sobjadd $node_path $dep
|
||||
::hdb::sobjadd $node_path $dep
|
||||
set sobjadd_state(depends) false
|
||||
}
|
||||
}
|
||||
@ -612,7 +612,7 @@ proc ::hdb::add_command {basePath command} {
|
||||
hsetprop $cmd_path nxsave $cmd_atts(nxsave)
|
||||
hsetprop $cmd_path sicsdev $cmd_atts(id)
|
||||
return $cmd_path
|
||||
}
|
||||
}
|
||||
|
||||
##
|
||||
# @brief Retrieve the list of attributes for the given sics object
|
||||
@ -624,7 +624,7 @@ proc ::hdb::attlist {sicsobj} {
|
||||
foreach att [tolower_sicslist $sicsobj] {
|
||||
lappend atts [split [string range $att 0 end-1] =]
|
||||
}
|
||||
return [join $atts]
|
||||
return [join $atts]
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
@ -722,7 +722,7 @@ proc ::hdb::sobjadd {hpath sobj args} {
|
||||
if {[info exists sobjatt(group)]} {
|
||||
set hpath [add_hpath $hpath $sobjatt(group)]
|
||||
if {[catch {hsetprop $hpath type part} err]} {clientput $err error}
|
||||
}
|
||||
}
|
||||
if {[lsearch [hlist $hpath] $sobjatt(long_name)] == -1} {
|
||||
set node_path [add_node $hpath node $sobj long_name [normalgetatt $sobj long_name] kind $sobjatt(kind)]
|
||||
if {[catch {hsetprop $node_path sicsdev $sobj} err]} {clientput $err error}
|
||||
@ -733,19 +733,19 @@ proc ::hdb::sobjadd {hpath sobj args} {
|
||||
if {[catch {hsetprop $node_path privilege $sobjatt(privilege)} err]} {clientput $err error}
|
||||
} else {
|
||||
clientput "ERROR: $hpath/$sobjatt(long_name) for $sobj exists" error
|
||||
}
|
||||
}
|
||||
}
|
||||
node {
|
||||
}
|
||||
singlecounter {
|
||||
# TODO
|
||||
# TODO
|
||||
todo_msg "$sobjatt(type) case, add $sobj to $hpath"
|
||||
}
|
||||
histmem {
|
||||
if {[info exists sobjatt(group)]} {
|
||||
set hpath [add_hpath $hpath $sobjatt(group)]
|
||||
if {[catch {hsetprop $hpath type part} err]} {clientput $err error}
|
||||
}
|
||||
}
|
||||
if {[lsearch [hlist $hpath] $sobjatt(long_name)] == -1} {
|
||||
set node_path [add_node $hpath node $sobj long_name [normalgetatt $sobj long_name] kind $sobjatt(kind)]
|
||||
if {[catch {hsetprop $node_path savecmd $sobjatt(savecmd)} err]} {clientput $err error}
|
||||
@ -761,7 +761,7 @@ proc ::hdb::sobjadd {hpath sobj args} {
|
||||
if {[info exists sobjatt(group)]} {
|
||||
set hpath [add_hpath $hpath $sobjatt(group)]
|
||||
hsetprop $hpath type part
|
||||
}
|
||||
}
|
||||
if {[lsearch [hlist $hpath] $sobjatt(long_name)] == -1} {
|
||||
set node_path [add_node $hpath node $sobj long_name [normalgetatt $sobj long_name] kind $sobjatt(kind)]
|
||||
hsetprop $node_path sicsdev $sobj
|
||||
@ -772,18 +772,18 @@ proc ::hdb::sobjadd {hpath sobj args} {
|
||||
hsetprop $node_path privilege $sobjatt(privilege)
|
||||
} else {
|
||||
clientput "ERROR: $hpath/$sobjatt(long_name) for $sobj exists" error
|
||||
}
|
||||
}
|
||||
}
|
||||
nxscript {
|
||||
# TODO
|
||||
# TODO
|
||||
todo_msg "$sobjatt(type) case, add $sobj to $hpath"
|
||||
}
|
||||
sicsdata {
|
||||
# TODO
|
||||
# TODO
|
||||
todo_msg "$sobjatt(type) case, add $sobj to $hpath"
|
||||
}
|
||||
scanobject {
|
||||
# TODO
|
||||
# TODO
|
||||
todo_msg "$sobjatt(type) case, add $sobj to $hpath"
|
||||
}
|
||||
# TODO Can this be replaced with a sct_* glob?
|
||||
@ -836,7 +836,7 @@ proc ::hdb::sobjtypeadd {hpath sobjtype given_klass} {
|
||||
|
||||
|
||||
##
|
||||
# @brief Remove empty instrument dictionary nodes
|
||||
# @brief Remove empty instrument dictionary nodes
|
||||
#
|
||||
# @param instdict name of the instrument dictionary structure
|
||||
#
|
||||
@ -853,7 +853,7 @@ proc ::hdb::prune {instdict} {
|
||||
while {[expr [llength $candidates]] > 0} {
|
||||
set new_candidates ""
|
||||
foreach name $candidates {
|
||||
array unset dictval
|
||||
array unset dictval
|
||||
array set dictval $dictarr($name)
|
||||
if {[lsearch $dictval(property) nxvgroup] >= 0} {
|
||||
# Link targets are not candidates for pruning
|
||||
@ -939,7 +939,7 @@ upvar #0 $instDict dictionary
|
||||
#
|
||||
# @param hpath The save state of the nodes below this path will be set
|
||||
# @param mode true or false
|
||||
# @param top This is just here to make the recursion work from the top level, You don't need
|
||||
# @param top This is just here to make the recursion work from the top level, You don't need
|
||||
# to set this
|
||||
proc ::hdb::set_save {hpath mode {top true}} {
|
||||
if [ catch {
|
||||
@ -956,7 +956,7 @@ if [ catch {
|
||||
foreach ps [lrange [split [string trim $hnode /] /] 0 end-1] {
|
||||
set hp $hp/$ps
|
||||
hsetprop $hp nxsave true
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
hsetprop $hnode nxsave $mode
|
||||
|
@ -1,5 +1,5 @@
|
||||
# The attributes and values for sics objects and instrument dictionaries must comply
|
||||
# with the following lists.
|
||||
# with the following lists.
|
||||
|
||||
set boolean {true false}
|
||||
# INSTRUMENT DICTIONARIES MUST PROVIDE THE FOLLOWING INFORMATION
|
||||
@ -49,7 +49,7 @@ set chopperadapter_attlist [subst {
|
||||
sdsinfo {print}
|
||||
nxalias {text}
|
||||
mutable [subst {{$boolean}}]
|
||||
}]
|
||||
}]
|
||||
|
||||
set environment_controller_attlist [subst {
|
||||
$sobj_attlist
|
||||
@ -59,12 +59,12 @@ set environment_controller_attlist [subst {
|
||||
set histmem_attlist [subst {
|
||||
$sobj_attlist
|
||||
mutable [subst {{$boolean}}]
|
||||
}]
|
||||
}]
|
||||
|
||||
# A macro can be attached to an hdb node as a command or a script
|
||||
set macro_attlist [subst {
|
||||
$sobj_attlist
|
||||
}]
|
||||
}]
|
||||
|
||||
set motor_attlist [subst {
|
||||
$sobj_attlist
|
||||
@ -72,40 +72,40 @@ set motor_attlist [subst {
|
||||
savecmd {print}
|
||||
nxalias {text}
|
||||
mutable [subst {{$boolean}}]
|
||||
}]
|
||||
}]
|
||||
|
||||
set configurablevirtualmotor_attlist [subst {
|
||||
$motor_attlist
|
||||
}]
|
||||
}]
|
||||
|
||||
set nxscript_attlist [subst {
|
||||
$sobj_attlist
|
||||
}]
|
||||
}]
|
||||
|
||||
set scanobject_attlist [subst {
|
||||
$sobj_attlist
|
||||
}]
|
||||
}]
|
||||
|
||||
set sct_object_attlist [subst {
|
||||
$sobj_attlist
|
||||
}]
|
||||
}]
|
||||
|
||||
set sicsdata_attlist [subst {
|
||||
$sobj_attlist
|
||||
mutable [subst {{$boolean}}]
|
||||
}]
|
||||
}]
|
||||
|
||||
set sicsvariable_attlist [subst {
|
||||
$sobj_attlist
|
||||
mutable [subst {{$boolean}}]
|
||||
}]
|
||||
}]
|
||||
|
||||
set singlecounter_attlist [subst {
|
||||
$sobj_attlist
|
||||
mutable [subst {{$boolean}}]
|
||||
}]
|
||||
}]
|
||||
# INSTRUMENT DICTIONARIES MUST PROVIDE THE FOLLOWING INFORMATION
|
||||
if 1 {
|
||||
if 1 {
|
||||
set nexus_classes { NXaperture NXattenuator NXbeam_stop NXbeam NXbending_magnet NXcharacterizations NXcollimator NXcrystal NXdata NXdetector NXdisk_chopper NXentry NXenvironment NXevent_data NXfermi_chopper NXfilter NXflipper NXgeometry NXguide NXinsertion_device NXinstrument NXlog NXmirror NXmoderator NXmonitor NXnote NXorientation NXpositioner NXprocess NXroot NXsample NXsensor NXshape NXsource NXtranslation NXuser NXvelocity_selector}
|
||||
|
||||
set dict_privilege_list {
|
||||
@ -115,7 +115,7 @@ if 1 {
|
||||
# uniformly.
|
||||
set dict_datatype_list { @none NX_CHAR NX_FLOAT32 NX_INT32 }
|
||||
|
||||
# link = name of an nxalias
|
||||
# link = name of an nxalias
|
||||
set dict_property_list [subst {
|
||||
{data control nxsave} {$boolean}
|
||||
klass {@none $nexus_classes}
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
##
|
||||
# @file Provides generic code and parameters for configuring the ANSTO histogram memory server
|
||||
# The instrument specific histogram memory configuration files must define an initialisation
|
||||
# function with the following signature
|
||||
# The instrument specific histogram memory configuration files must define an initialisation
|
||||
# function with the following signature
|
||||
# @code proc ::histogram_memory::initialize {}
|
||||
# this function should call the generic initalisation function,
|
||||
# this function should call the generic initalisation function,
|
||||
# ::histogram_memory::ic_initialize
|
||||
#
|
||||
#@see ::histogram_memory::ic_initialize
|
||||
@ -104,7 +104,7 @@ namespace eval histogram_memory {
|
||||
::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
|
||||
::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_preset Float user preset true detector true true
|
||||
@ -232,9 +232,9 @@ namespace eval histogram_memory {
|
||||
} message ] {
|
||||
return -code error "([info level 0]) $message"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
##
|
||||
# @brief Returns the histogram memory server clock scale.
|
||||
#
|
||||
@ -454,7 +454,7 @@ namespace eval histogram_memory {
|
||||
sicslist setatt $script_name long_name x_pixel_offset
|
||||
sicslist setatt $script_name units "mm"
|
||||
unset script_name
|
||||
|
||||
|
||||
sicsdatafactory new ::histogram_memory::time_channel_array
|
||||
proc time_channel {args} {
|
||||
variable state
|
||||
@ -502,7 +502,7 @@ proc ::histogram_memory::calc_boundaries {values channels} {
|
||||
if {$bbnum > $maxbblen} {
|
||||
error "ERROR: The number of bin boundaries must be less than or equal to $maxbblen"
|
||||
}
|
||||
set BOUNDARIES ""
|
||||
set BOUNDARIES ""
|
||||
if {$bbnum > 2} {
|
||||
set BOUNDARIES $values
|
||||
} elseif {$bbnum == 2} {
|
||||
@ -517,7 +517,7 @@ proc ::histogram_memory::calc_boundaries {values channels} {
|
||||
# error "ERROR: $leftbb and $rightbb must bound a channel >= 0 or <= $maxchan"
|
||||
# }
|
||||
for {set bb $leftbb; set i 0} {$i < $maxbblen} {incr i; set bb [expr {$bb + $bstep}]} {
|
||||
lappend BOUNDARIES $bb
|
||||
lappend BOUNDARIES $bb
|
||||
}
|
||||
} else {
|
||||
error "ERROR: You must specify at least two bin boundaries"
|
||||
@ -534,7 +534,7 @@ set hmm_xml ""
|
||||
# @brief Provides a standard set of subcommands for the histogram server table
|
||||
# configuration commands.
|
||||
#
|
||||
# @param tag Table identifier, one of BAT CAT FAT NAT OAT SAT SRV
|
||||
# @param tag Table identifier, one of BAT CAT FAT NAT OAT SAT SRV
|
||||
# @param attributes Defines the list of attributes which you will be allowed to set.
|
||||
# @param element_list Defines the list of elements which you will be allowed to set.
|
||||
# Use "" if your table doesn't contain any elements.
|
||||
@ -546,15 +546,15 @@ set hmm_xml ""
|
||||
# -clear clears the table\n
|
||||
# -init A list of name value pairs. If you use attribute or element names then
|
||||
# the corresponding table entries will be initilised to the given values, any
|
||||
# attributes or elements which aren't specified will be cleared. You can also
|
||||
# specify extra parameters to store in the table which might be required to
|
||||
# attributes or elements which aren't specified will be cleared. You can also
|
||||
# specify extra parameters to store in the table which might be required to
|
||||
# specify limits or constants which may be necessary for deriving configuration
|
||||
# parameters.\n
|
||||
# -get return the value for the named attribute or element\n
|
||||
# -attlist list all of the attributes with their values.\n
|
||||
# TODO Maintain "proposed" and "current" tables. Provide a setcurrent command which can
|
||||
# only be called by the upload_config command to set the proposed tables as current
|
||||
# TODO Allow for top level content in tables and attributes in sub-elements
|
||||
# TODO Allow for top level content in tables and attributes in sub-elements
|
||||
proc HISTMEM_TABLE {tpath args} {
|
||||
global hmm_xml
|
||||
|
||||
@ -564,25 +564,25 @@ proc HISTMEM_TABLE {tpath args} {
|
||||
foreach {opt arglist} [::utility::get_opt_arglist $args] {}
|
||||
switch -- $opt {
|
||||
"-dump" {
|
||||
foreach {k v} $hmm_xml {clientput $k; foreach {name val} $v {clientput "$name: $val"}}
|
||||
foreach {k v} $hmm_xml {clientput $k; foreach {name val} $v {clientput "$name: $val"}}
|
||||
}
|
||||
"-allowed_attributes" {
|
||||
if {[llength $arglist] == 0} {
|
||||
set retVal [::utility::tabget hmm_xml $tpath/_ALLOWED_ATTRIBUTES_]
|
||||
} else {
|
||||
} else {
|
||||
::utility::tabset hmm_xml $tpath/_ALLOWED_ATTRIBUTES_ [lindex $arglist 0]
|
||||
}
|
||||
}
|
||||
"-allowed_elements" {
|
||||
if {[llength $arglist] == 0} {
|
||||
set retVal [::utility::tabget hmm_xml $tpath/_ALLOWED_ELEMENTS_]
|
||||
} else {
|
||||
} else {
|
||||
::utility::tabset hmm_xml $tpath/_ALLOWED_ELEMENTS_ [lindex $arglist 0]
|
||||
::utility::tabset hmm_xml $tpath/_ELEMENTS_ [lindex $arglist 0]
|
||||
}
|
||||
}
|
||||
"-setel" {
|
||||
set element [lindex $arglist 0]
|
||||
set element [lindex $arglist 0]
|
||||
set value [lindex $arglist 1]
|
||||
if {[lsearch [::utility::tabget hmm_xml $tpath/_ALLOWED_ELEMENTS_] $element] >= 0} {
|
||||
::utility::tabset hmm_xml $tpath/$element/_CONTENT_ $value
|
||||
@ -591,7 +591,7 @@ proc HISTMEM_TABLE {tpath args} {
|
||||
}
|
||||
}
|
||||
"-setatt" {
|
||||
set attname [lindex $arglist 0]
|
||||
set attname [lindex $arglist 0]
|
||||
set value [lindex $arglist 1]
|
||||
if {[lsearch [::utility::tabget hmm_xml $tpath/_ALLOWED_ATTRIBUTES_] $attname] >= 0} {
|
||||
::utility::tabset hmm_xml $tpath/_ATTLIST_/$attname $value
|
||||
@ -600,19 +600,19 @@ proc HISTMEM_TABLE {tpath args} {
|
||||
}
|
||||
}
|
||||
"-getel" {
|
||||
set element [lindex $arglist 0]
|
||||
set element [lindex $arglist 0]
|
||||
set retVal [::utility::tabget hmm_xml $tpath/$element/_CONTENT_]
|
||||
}
|
||||
"-getatt" {
|
||||
set attribute [lindex $arglist 0]
|
||||
set attribute [lindex $arglist 0]
|
||||
set retVal [::utility::tabget hmm_xml $tpath/_ATTLIST_/$attribute]
|
||||
}
|
||||
"-delel" {
|
||||
set element [lindex $arglist 0]
|
||||
set element [lindex $arglist 0]
|
||||
::utility::tabdel hmm_xml $tpath/$element
|
||||
}
|
||||
"-delatt" {
|
||||
set attribute [lindex $arglist 0]
|
||||
set attribute [lindex $arglist 0]
|
||||
::utility::tabdel hmm_xml $tpath/_ATTLIST_/$attribute
|
||||
}
|
||||
"-clear" {
|
||||
@ -657,7 +657,7 @@ proc HISTMEM_TABLE {tpath args} {
|
||||
}
|
||||
}
|
||||
|
||||
##
|
||||
##
|
||||
# @brief Base Address Table configuration parameters as maintained by SICS
|
||||
#
|
||||
proc BAT_TABLE {args} {
|
||||
@ -665,7 +665,7 @@ proc BAT_TABLE {args} {
|
||||
set attributes { NO_BAT_ENTRIES NO_BAT_PERIODS NO_REPEAT_ENTRY NO_REPEAT_TABLE NO_EXECUTE_TABLE }
|
||||
set elements {{PERIOD_INDICES }}
|
||||
|
||||
set tag BAT
|
||||
set tag BAT
|
||||
foreach {opt arglist} [::utility::get_opt_arglist $args] {}
|
||||
switch -- $opt {
|
||||
"" {
|
||||
@ -745,7 +745,7 @@ proc BAT_TABLE {args} {
|
||||
}
|
||||
}
|
||||
|
||||
##
|
||||
##
|
||||
# @brief CAlibration Table configuration parameters as maintained by SICS
|
||||
#
|
||||
proc CAT_TABLE {args} {
|
||||
@ -753,7 +753,7 @@ proc CAT_TABLE {args} {
|
||||
set attributes { FRAME_FREQUENCY SIZE_PERIOD COUNT_METHOD COUNT_SIZE READ_DATA_TYPE }
|
||||
set elements {{MESYTEC_MPSD8_CHANNEL_GAINS MESYTEC_MPSD8_THRESHOLDS MESYTEC_TUBE_PAIR_RESISTANCE_RATIOS MESYTEC_TUBE_MAGNIFICATIONS MESYTEC_TUBE_OFFSETS MESYTEC_TUBE_HISTOGRAM_WEIGHTS }}
|
||||
|
||||
set tag CAT
|
||||
set tag CAT
|
||||
foreach {opt arglist} [::utility::get_opt_arglist $args] {}
|
||||
switch -- $opt {
|
||||
"" {
|
||||
@ -833,7 +833,7 @@ proc CAT_TABLE {args} {
|
||||
}
|
||||
}
|
||||
|
||||
##
|
||||
##
|
||||
# @brief Frequency Address Table configuration parameters as maintained by SICS
|
||||
#
|
||||
proc FAT_TABLE {args} {
|
||||
@ -842,7 +842,7 @@ proc FAT_TABLE {args} {
|
||||
|
||||
set elements {{ }}
|
||||
|
||||
set tag FAT
|
||||
set tag FAT
|
||||
foreach {opt arglist} [::utility::get_opt_arglist $args] {}
|
||||
switch -- $opt {
|
||||
"" {
|
||||
@ -1052,7 +1052,7 @@ proc OAT_TABLE {args} {
|
||||
}
|
||||
}
|
||||
|
||||
# @brief Spatial Allocation Table configuration parameters as maintained by SICS
|
||||
# @brief Spatial Allocation Table configuration parameters as maintained by SICS
|
||||
#
|
||||
# Only one element, ie SPLIT with no content just attributes.
|
||||
proc SAT_TABLE {args} {
|
||||
@ -1198,7 +1198,7 @@ proc ::histogram_memory::max_chan_num {axis} {
|
||||
}
|
||||
##
|
||||
# @brief When called without arguments this returns the name of the filler defaults file
|
||||
# for the histogram server. When called with an argument it sets the current name of the
|
||||
# for the histogram server. When called with an argument it sets the current name of the
|
||||
# filler defaults file.
|
||||
#
|
||||
# When anstohm_linked.xml is uploaded to the histogram server it calls this via
|
||||
@ -1245,7 +1245,7 @@ proc ::histogram_memory::number_of_channels {axis} {
|
||||
# TODO Set current oat table after uploading proposed oat_table
|
||||
proc ::histogram_memory::upload_config {filler_defaults} {
|
||||
if [ catch {
|
||||
::histogram_memory::synch_tables
|
||||
::histogram_memory::synch_tables
|
||||
::histogram_memory::filler_defaults $filler_defaults
|
||||
hmm astop
|
||||
hmm configure init 1
|
||||
@ -1325,7 +1325,7 @@ proc ::histogram_memory::get_frame_source {} {
|
||||
proc ::histogram_memory::set_frame_source {srce} {
|
||||
variable ic_fsrce_values
|
||||
|
||||
if [ catch {
|
||||
if [ catch {
|
||||
if {[lsearch $ic_fsrce_values $srce] == -1} {
|
||||
error "ERROR: $srce is invalid, valid values are \"$ic_fsrce_values\""
|
||||
}
|
||||
@ -1359,7 +1359,7 @@ proc ::histogram_memory::get_frame_freq {} {
|
||||
# @param freq Frequency in Hz.\n
|
||||
# @param frame_source INTERNAL or EXTERNAL(default)
|
||||
#
|
||||
# If freq=0 then it sets the frequency to 50Hz with an internal frame source. This is useful
|
||||
# If freq=0 then it sets the frequency to 50Hz with an internal frame source. This is useful
|
||||
# if you are setting the frequency from a chopper which is stopped.
|
||||
proc ::histogram_memory::set_frame_freq {freq {frame_source EXTERNAL}} {
|
||||
variable state
|
||||
@ -1521,7 +1521,7 @@ proc ::histogram_memory::ic_initialize {} {
|
||||
::histogram_memory::clear_tables
|
||||
# FAT_TABLE -set VIEW_MAG_X -1 VIEW_MAG_Y -1
|
||||
|
||||
foreach hm_obj [sicslist type histmem] {
|
||||
foreach hm_obj [sicslist type histmem] {
|
||||
set host [dict get $::HISTMEM_HOSTPORT HMM HOST]
|
||||
set port [dict get $::HISTMEM_HOSTPORT HMM PORT]
|
||||
$hm_obj configure hmaddress http://$host:$port
|
||||
@ -1578,7 +1578,7 @@ Publish SAT_TABLE user
|
||||
# if {$monitor_controlled == "true"} {
|
||||
# set hm_start {hmm count}
|
||||
# } else {
|
||||
# bm setmode timer
|
||||
# bm setmode timer
|
||||
# bm setpreset 32000000
|
||||
# }
|
||||
if {$blocking == "block"} {
|
||||
@ -1607,7 +1607,7 @@ Publish SAT_TABLE user
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
proc ::histogram_memory::veto {action} {
|
||||
switch $action {
|
||||
"on" {
|
||||
@ -1671,7 +1671,7 @@ Publish SAT_TABLE user
|
||||
return [SplitReply [hmm_mode]]
|
||||
}
|
||||
if [ catch {
|
||||
set modes $ic_count_methods
|
||||
set modes $ic_count_methods
|
||||
if {[lsearch $modes $method] == -1} {
|
||||
error "ERROR: Count mode, $method, must be one of $modes"
|
||||
}
|
||||
@ -1744,7 +1744,7 @@ Publish SAT_TABLE user
|
||||
proc ::histogram_memory::stop_condition {condition} {
|
||||
variable state
|
||||
if [ catch {
|
||||
array set count_stop {immediate IMMEDIATE period AT_END_OF_PERIOD}
|
||||
array set count_stop {immediate IMMEDIATE period AT_END_OF_PERIOD}
|
||||
if {$condition == ""} {
|
||||
return $state(stop_cond)
|
||||
} else {
|
||||
@ -1843,7 +1843,7 @@ namespace eval ::histogram_memory {
|
||||
# @brief Set stop condition for histogram memory
|
||||
#
|
||||
# @param condition
|
||||
#command stop_condition {text:immediate,period condition}
|
||||
#command stop_condition {text:immediate,period condition}
|
||||
}
|
||||
|
||||
|
||||
@ -1855,7 +1855,7 @@ namespace eval ::histogram_memory {
|
||||
proc _histmem {cmd args} {
|
||||
#TODO Add "continue"
|
||||
set reply ""
|
||||
if [ catch {
|
||||
if [ catch {
|
||||
switch $cmd {
|
||||
"start" {
|
||||
eval "::histogram_memory::start $args"
|
||||
|
@ -11,7 +11,7 @@ namespace eval histogram_memory {
|
||||
variable state
|
||||
if [ catch {
|
||||
#set deg_per_radian [SplitReply [deg_per_rad]]
|
||||
set deg_per_radian 57.29577951308232
|
||||
set deg_per_radian 57.29577951308232
|
||||
set max_chan [OAT_TABLE X -getdata MAX_CHAN]
|
||||
set bb_zero_offset [expr -1*($max_chan-1)]
|
||||
set det_width_mm [SplitReply [detector_active_width_mm]]
|
||||
|
@ -25,7 +25,7 @@ proc ::histogram_memory::select_read_type {type} {
|
||||
# Instrument specific X and Y dimension names
|
||||
variable INST_NXC
|
||||
variable INST_NYC
|
||||
|
||||
|
||||
if [catch {
|
||||
$HMOBJ configure read_data_period_number 0
|
||||
|
||||
@ -49,67 +49,67 @@ proc ::histogram_memory::select_read_type {type} {
|
||||
$HMOBJ configure rank 2
|
||||
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure $INST_NXC]]
|
||||
$HMOBJ configure dim1 [SplitReply [$HMOBJ configure oat_ntc_eff]]
|
||||
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_XT"
|
||||
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_XT"
|
||||
set hmm_ext "_xt"
|
||||
}
|
||||
"HISTOGRAM_YT" - "HISTOPERIOD_YT" {
|
||||
$HMOBJ configure rank 2
|
||||
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure oat_ntc_eff]]
|
||||
$HMOBJ configure dim1 [SplitReply [$HMOBJ configure $INST_NYC]]
|
||||
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_YT"
|
||||
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_YT"
|
||||
set hmm_ext "_ty"
|
||||
}
|
||||
"HISTOGRAM_X" - "HISTOPERIOD_X" {
|
||||
$HMOBJ configure rank 1
|
||||
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure $INST_NXC]]
|
||||
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_X"
|
||||
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_X"
|
||||
set hmm_ext "_x"
|
||||
}
|
||||
"HISTOGRAM_Y" - "HISTOPERIOD_Y" {
|
||||
$HMOBJ configure rank 1
|
||||
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure $INST_NYC]]
|
||||
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_Y"
|
||||
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_Y"
|
||||
set hmm_ext "_y"
|
||||
}
|
||||
"HISTOGRAM_T" - "HISTOPERIOD_T" {
|
||||
$HMOBJ configure rank 1
|
||||
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure oat_ntc_eff]]
|
||||
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_T"
|
||||
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_T"
|
||||
set hmm_ext "_t"
|
||||
}
|
||||
"TOTAL_HISTOGRAM_XY" {
|
||||
$HMOBJ configure rank 2
|
||||
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure $INST_NXC]]
|
||||
$HMOBJ configure dim1 [SplitReply [$HMOBJ configure $INST_NYC]]
|
||||
$HMOBJ configure READ_DATA_TYPE $type
|
||||
$HMOBJ configure READ_DATA_TYPE $type
|
||||
set hmm_ext "_total_xy"
|
||||
}
|
||||
"TOTAL_HISTOGRAM_XT" {
|
||||
$HMOBJ configure rank 2
|
||||
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure $INST_NXC]]
|
||||
$HMOBJ configure dim1 [SplitReply [$HMOBJ configure oat_ntc_eff]]
|
||||
$HMOBJ configure READ_DATA_TYPE $type
|
||||
$HMOBJ configure READ_DATA_TYPE $type
|
||||
set hmm_ext "_total_xt"
|
||||
}
|
||||
"TOTAL_HISTOGRAM_YT" {
|
||||
$HMOBJ configure rank 2
|
||||
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure oat_ntc_eff]]
|
||||
$HMOBJ configure dim1 [SplitReply [$HMOBJ configure $INST_NYC]]
|
||||
$HMOBJ configure READ_DATA_TYPE $type
|
||||
$HMOBJ configure READ_DATA_TYPE $type
|
||||
set hmm_ext "_total_ty"
|
||||
}
|
||||
"TOTAL_HISTOGRAM_XP" {
|
||||
$HMOBJ configure rank 2
|
||||
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure $INST_NXC]]
|
||||
$HMOBJ configure dim1 [expr 1 + [SplitReply [$HMOBJ configure maximum_period]]]
|
||||
$HMOBJ configure READ_DATA_TYPE $type
|
||||
$HMOBJ configure READ_DATA_TYPE $type
|
||||
set hmm_ext "_total_xp"
|
||||
}
|
||||
"TOTAL_HISTOGRAM_YP" {
|
||||
$HMOBJ configure rank 2
|
||||
$HMOBJ configure dim0 [expr 1 + [SplitReply [$HMOBJ configure maximum_period]]]
|
||||
$HMOBJ configure dim1 [SplitReply [$HMOBJ configure $INST_NYC]]
|
||||
$HMOBJ configure READ_DATA_TYPE $type
|
||||
$HMOBJ configure READ_DATA_TYPE $type
|
||||
set hmm_ext "_total_py"
|
||||
}
|
||||
"TOTAL_HISTOGRAM_X" {
|
||||
@ -149,14 +149,14 @@ publish ::histogram_memory::select_read_type user
|
||||
|
||||
##
|
||||
# @brief Instrument specific configurations can redefine this
|
||||
# to select extra read data types or override one of the
|
||||
# to select extra read data types or override one of the
|
||||
# common data types for the histogram memory.
|
||||
proc ::histogram_memory::is_select_read_type {type} {
|
||||
variable HMOBJ
|
||||
# Instrument specific X and Y dimension names
|
||||
variable INST_NXC
|
||||
variable INST_NYC
|
||||
|
||||
|
||||
return "notfound"
|
||||
}
|
||||
publish ::histogram_memory::is_select_read_type user
|
||||
@ -166,7 +166,7 @@ publish ::histogram_memory::is_select_read_type user
|
||||
# specific type then set a common type.
|
||||
proc ::histogram_memory::hmm_set_read_type {type} {
|
||||
variable HMOBJ
|
||||
|
||||
|
||||
if [ catch {
|
||||
set hmm_ext [is_select_read_type $type]
|
||||
if {$hmm_ext == "notfound"} {
|
||||
@ -205,7 +205,7 @@ proc ::histogram_memory::set_axes {typelist} {
|
||||
# Instrument specific X and Y dimension names
|
||||
variable INST_NXC
|
||||
variable INST_NYC
|
||||
|
||||
|
||||
if [catch {
|
||||
set signal 1
|
||||
foreach type $typelist {
|
||||
@ -555,7 +555,7 @@ hsetprop $HP_HMM data true
|
||||
hsetprop $HP_HMM klass parameter
|
||||
hsetprop $HP_HMM nxalias hmscobj_hmm
|
||||
hsetprop $HP_HMM sicsdev none
|
||||
#hsetprop /sics/hmscobj/data
|
||||
#hsetprop /sics/hmscobj/data
|
||||
#sicspoll add /sics/hmscobj/data hdb
|
||||
|
||||
sicslist setatt $HMSCOBJ kind scobj
|
||||
|
@ -1,6 +1,6 @@
|
||||
##
|
||||
# @file Implements control for the Ordela high voltage power supply using the odrhvps protocol handler.
|
||||
#
|
||||
#
|
||||
# This controller implements voltage ramping and always reads the current value before
|
||||
# attempting to set the new voltage.
|
||||
|
||||
@ -28,10 +28,10 @@ proc ::scobj::dethvps::rqValue {nextSubState cmd} {
|
||||
#
|
||||
# @param vPath, Hdb node path for the voltage.
|
||||
proc ::scobj::dethvps::rdValue {vPath} {
|
||||
variable RAMPIDLE
|
||||
variable RAMPSTOP
|
||||
variable RAMPIDLE
|
||||
variable RAMPSTOP
|
||||
variable RAMPSTART
|
||||
variable RAMPBUSY
|
||||
variable RAMPBUSY
|
||||
variable MAXPOTVAL
|
||||
variable RAMPINTEREST
|
||||
|
||||
@ -98,10 +98,10 @@ proc ::scobj::dethvps::rdValue {vPath} {
|
||||
##
|
||||
# @brief Checks the target voltage and sets the ramping superstate and ramp direction.
|
||||
proc ::scobj::dethvps::setValue {nextSubState} {
|
||||
variable RAMPIDLE
|
||||
variable RAMPSTOP
|
||||
variable RAMPIDLE
|
||||
variable RAMPSTOP
|
||||
variable RAMPSTART
|
||||
variable RAMPBUSY
|
||||
variable RAMPBUSY
|
||||
|
||||
set catch_status [ catch {
|
||||
set par [sct target]
|
||||
@ -135,10 +135,10 @@ proc ::scobj::dethvps::setValue {nextSubState} {
|
||||
##
|
||||
# @brief Checks that a command has been acknowledged
|
||||
proc ::scobj::dethvps::getACK {} {
|
||||
variable RAMPIDLE
|
||||
variable RAMPSTOP
|
||||
variable RAMPIDLE
|
||||
variable RAMPSTOP
|
||||
variable RAMPSTART
|
||||
variable RAMPBUSY
|
||||
variable RAMPBUSY
|
||||
|
||||
set catch_status [ catch {
|
||||
set currSuperState [sct ramping]
|
||||
@ -173,11 +173,11 @@ proc ::scobj::dethvps::getACK {} {
|
||||
#
|
||||
# @param cmd, The set voltage command
|
||||
proc ::scobj::dethvps::ramping {cmd} {
|
||||
variable RAMPIDLE
|
||||
variable RAMPSTOP
|
||||
variable RAMPIDLE
|
||||
variable RAMPSTOP
|
||||
variable RAMPSTART
|
||||
variable RAMPBUSY
|
||||
variable MINRAMPINTERVAL
|
||||
variable RAMPBUSY
|
||||
variable MINRAMPINTERVAL
|
||||
|
||||
set catch_status [ catch {
|
||||
set rampstep [sct rampstep]
|
||||
@ -213,10 +213,10 @@ proc ::scobj::dethvps::ramping {cmd} {
|
||||
##
|
||||
# @brief Command interface for voltage controller
|
||||
proc ::scobj::dethvps::drvCmd {} {
|
||||
variable RAMPIDLE
|
||||
variable RAMPSTOP
|
||||
variable RAMPIDLE
|
||||
variable RAMPSTOP
|
||||
variable RAMPSTART
|
||||
variable RAMPBUSY
|
||||
variable RAMPBUSY
|
||||
variable potValPath
|
||||
|
||||
set catch_status [ catch {
|
||||
|
@ -44,9 +44,9 @@ namespace eval ::scobj::jogmotor {
|
||||
}
|
||||
return idle
|
||||
}
|
||||
|
||||
|
||||
proc jogCmd {sct_controller axis} {
|
||||
variable cmd_table
|
||||
variable cmd_table
|
||||
|
||||
set jcmd [string tolower [lindex [sct target] 0]]
|
||||
switch $jcmd [subst {
|
||||
@ -76,7 +76,7 @@ namespace eval ::scobj::jogmotor {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
# TODO Check thread 0 and motion control disabled?
|
||||
proc check_motor {} {
|
||||
set val [sct target]
|
||||
@ -171,8 +171,8 @@ proc updatestatus {} {
|
||||
namespace import ::scobj::jogmotor::*
|
||||
##
|
||||
# Eg
|
||||
# hfactory /controllers plain spy none
|
||||
#
|
||||
# hfactory /controllers plain spy none
|
||||
#
|
||||
# makesctcontroller /controllers/sct_mc1 std localhost:62034
|
||||
#
|
||||
# mk_sct_jogmotor sct_mc1 chi index { 1 0 2 15 3 20 }
|
||||
|
@ -51,7 +51,7 @@ proc ::scobj::positmotor::setVal {ID2valXfn motor table} {
|
||||
proc ::scobj::positmotor::noResponse {} {
|
||||
return idle
|
||||
}
|
||||
|
||||
|
||||
##
|
||||
# @brief Creates a controller which can drive motors to discrete labelled positions
|
||||
#
|
||||
@ -69,7 +69,7 @@ proc mkPosit {sct_controller name type motor klass table} {
|
||||
lappend ilist $i
|
||||
}
|
||||
sicslist setatt $name values [join $ilist ","]
|
||||
sicslist setatt $name klass $klass
|
||||
sicslist setatt $name klass $klass
|
||||
sicslist setatt $name long_name $name
|
||||
hfactory /sics/$name/precision script "getmotpar $motor precision" "$motor precision " float 1
|
||||
hsetprop /sics/$name read ::scobj::positmotor::reqVal report $motor
|
||||
@ -137,7 +137,7 @@ proc ::scobj::positmotor::mot2ID {mot precision table} {
|
||||
namespace import ::scobj::positmotor::*
|
||||
##
|
||||
# Eg
|
||||
#
|
||||
#
|
||||
# makesctcontroller sct_mc3 std localhost:62034
|
||||
#
|
||||
# mkPosit sct_mc3 diameter float apx sample {2.5 0 5.0 -23 7.5 -47}
|
||||
|
@ -203,7 +203,7 @@ proc ::nexus::link {args} {
|
||||
|
||||
|
||||
##
|
||||
# @brief Initialise state variables
|
||||
# @brief Initialise state variables
|
||||
proc ::nexus::init {} {
|
||||
variable state
|
||||
variable nexusdic
|
||||
@ -298,7 +298,7 @@ proc ::nexus::isValidFileType {type} {
|
||||
# state(file,open) true
|
||||
# /data/currentfiletype == UNKNOWN
|
||||
proc ::nexus::newfile {type {namestyle data}} {
|
||||
::nexus::newfile_collection -filetype $type -savetype $namestyle
|
||||
::nexus::newfile_collection -filetype $type -savetype $namestyle
|
||||
}
|
||||
|
||||
##
|
||||
@ -428,8 +428,8 @@ proc ::nexus::newfile_collection {args} {
|
||||
##
|
||||
# @brief Save data to the currently open file and then close it.
|
||||
#
|
||||
# @param point This is the array index for mutable data elements
|
||||
#
|
||||
# @param point This is the array index for mutable data elements
|
||||
#
|
||||
# This function provides the top level call to the recursive ::nexus::savetree
|
||||
# function, it should only be called by the ::nexus::save command.
|
||||
#
|
||||
@ -544,8 +544,8 @@ proc ::nexus::save {{point 0} {callType "normalsave"}} {
|
||||
} else {
|
||||
|
||||
::nexus::CallESProcs
|
||||
# timestamp force [expr {[clock seconds] - $start_seconds_array($data_label)}]
|
||||
timestamp force [expr {[clock seconds] - $start_seconds}]
|
||||
# timestamp force [expr {[clock seconds] - $start_seconds_array($data_label)}]
|
||||
timestamp force [expr {[clock seconds] - $start_seconds}]
|
||||
dataFileName force $currFilename($data_label)
|
||||
file_status force $file_states(O)
|
||||
::nexus::nxreopenfile $currFilename($data_label)
|
||||
@ -558,7 +558,7 @@ proc ::nexus::save {{point 0} {callType "normalsave"}} {
|
||||
} message ] {
|
||||
nxscript puttext data_save_error "([info level 0]) $message"
|
||||
set caught_exception true
|
||||
}
|
||||
}
|
||||
if {[info exists data_label] && [info exists currFilename($data_label)]} {
|
||||
::nexus::nxclosefile $currFilename($data_label)
|
||||
file_status force $file_states(C)
|
||||
@ -601,7 +601,7 @@ proc ::nexus::save {{point 0} {callType "normalsave"}} {
|
||||
}
|
||||
} message ] {
|
||||
return -code error "([info level 0]) $message"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
##
|
||||
@ -631,21 +631,21 @@ proc ::nexus::save {{point 0} {callType "normalsave"}} {
|
||||
}
|
||||
} message ] {
|
||||
return -code error "([info level 0]) $message"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
##
|
||||
# @brief Traverse the hdb subtree from the given path and save the data in the currently open file
|
||||
#
|
||||
# @param hpath path of subtree to save, must not be "/"
|
||||
# @param pt Current array index for mutable data (optional default=0)
|
||||
# @param pt Current array index for mutable data (optional default=0)
|
||||
proc ::nexus::savetree {hpath pt filestatus} {
|
||||
set caught_exception false
|
||||
|
||||
foreach child [hlist /$hpath] {
|
||||
if [ catch {
|
||||
array unset p_arr
|
||||
array set p_arr [hlistprop /$hpath/$child tcllist]
|
||||
array set p_arr [hlistprop /$hpath/$child tcllist]
|
||||
if {([info exists p_arr(type)] == 0) || ($p_arr(type) != "nxvgroup")} {
|
||||
set data_type [lindex [split [hinfo /$hpath/$child] , ] 0]
|
||||
if {[info exists p_arr(data)] && ($p_arr(data) == true) && ($p_arr(nxsave) == true) } {
|
||||
@ -687,14 +687,14 @@ proc ::nexus::savetree {hpath pt filestatus} {
|
||||
|
||||
##
|
||||
# @brief Recursive portion of gen_nxdict function
|
||||
#
|
||||
#
|
||||
# @param hpath hdb subtree path to generate dictionary fragment from, must not be "/"
|
||||
# @param dictPath parent path for nexus dictionary fragment.
|
||||
# @param name name for child dictionary path
|
||||
# @param nxc Nexus class name
|
||||
#
|
||||
#
|
||||
# If the klass name doesn't begin with NX then construct the SDS name by replacing '/' with '_' in the
|
||||
# hdb path
|
||||
# hdb path
|
||||
#
|
||||
# @see gen_nxdict
|
||||
proc ::nexus::_gen_nxdict {hpath dictPath name nxc} {
|
||||
@ -707,11 +707,11 @@ proc ::nexus::_gen_nxdict {hpath dictPath name nxc} {
|
||||
if {$nxc == "NXentry"} {
|
||||
::nexus::_gen_nxdict $hpath/$child $dictPath $child $nxclass
|
||||
} else {
|
||||
::nexus::_gen_nxdict $hpath/$child $dictPath/$name,$nxc $child $nxclass
|
||||
::nexus::_gen_nxdict $hpath/$child $dictPath/$name,$nxc $child $nxclass
|
||||
}
|
||||
}
|
||||
}
|
||||
array set p_arr [hlistprop /$hpath tcllist]
|
||||
array set p_arr [hlistprop /$hpath tcllist]
|
||||
set data_type [lindex [split [hinfo /$hpath] , ] 0]
|
||||
if {$data_type != "none" || $p_arr(type) == "nxvgroup"} {
|
||||
#XXX Do we need to check data_type here. This would skip NXVGROUP nodes
|
||||
@ -769,9 +769,9 @@ proc ::nexus::gen_NXentry_name {baseName} {
|
||||
##
|
||||
# @brief Generate a nexus dictionary file from the hdb tree
|
||||
#
|
||||
# An entry in the nexus dictionary is generated for each node in the
|
||||
# An entry in the nexus dictionary is generated for each node in the
|
||||
# hdb tree which has the following properties and values, data=true and nxsave=true
|
||||
#
|
||||
#
|
||||
# @param baseName The base name of the file without suffix
|
||||
# @param nexusdic Name of the nexus dictionary that will be created.
|
||||
# @return Full path to the nexus dictionary.
|
||||
@ -780,7 +780,7 @@ proc ::nexus::gen_nxdict {nexusdic} {
|
||||
variable nxdictionary
|
||||
set catch_status [catch {
|
||||
set nxdict_path $cfPath(nexus)/$nexusdic
|
||||
array unset nxdictionary
|
||||
array unset nxdictionary
|
||||
foreach hp [hlist /] {
|
||||
if {[hpropexists /$hp data] } {
|
||||
if {[hgetpropval /$hp data] == true} {
|
||||
@ -825,15 +825,15 @@ proc ::nexus::gen_nxdict {nexusdic} {
|
||||
sicslist setatt $sobj savecmd ::nexus::motor::save
|
||||
sicslist setatt $sobj sdsinfo ::nexus::motor::sdsinfo
|
||||
}
|
||||
foreach sobj [sicslist type configurablevirtualmotor] {
|
||||
foreach sobj [sicslist type configurablevirtualmotor] {
|
||||
sicslist setatt $sobj savecmd ::nexus::motor::save
|
||||
sicslist setatt $sobj sdsinfo ::nexus::motor::sdsinfo
|
||||
}
|
||||
foreach sobj [sicslist type TasMot] {
|
||||
foreach sobj [sicslist type TasMot] {
|
||||
sicslist setatt $sobj savecmd ::nexus::motor::save
|
||||
sicslist setatt $sobj sdsinfo ::nexus::motor::sdsinfo
|
||||
}
|
||||
foreach sobj [sicslist type histmem] {
|
||||
foreach sobj [sicslist type histmem] {
|
||||
sicslist setatt $sobj savecmd ::nexus::histmem::save
|
||||
sicslist setatt $sobj sdsinfo ::nexus::histmem::sdsinfo
|
||||
}
|
||||
@ -871,7 +871,7 @@ proc ::nexus::gen_nxdict {nexusdic} {
|
||||
#
|
||||
# @param dtype hdb data type
|
||||
# @return Nexus data type
|
||||
proc ::nexus::hdb2nx_type {dtype} {
|
||||
proc ::nexus::hdb2nx_type {dtype} {
|
||||
switch $dtype {
|
||||
int {return NX_INT32}
|
||||
intar {return NX_INT32}
|
||||
@ -889,7 +889,7 @@ proc ::nexus::hdb2nx_type {dtype} {
|
||||
#
|
||||
# The savecmd attribute of any histogram memory objects should be set to this function
|
||||
#
|
||||
# @see set_sobj_attributes
|
||||
# @see set_sobj_attributes
|
||||
proc ::nexus::histmem::save {hm nxalias hpath data_type filestatus args} {
|
||||
variable HMOBJ
|
||||
|
||||
@ -1313,7 +1313,7 @@ proc ::nexus::script::sdsinfo {sdsName data_type sobj args} {
|
||||
if {$param(mutable) == true} {
|
||||
set sdsStr "$sdsName -type $dtype $units_att -rank 2 -dim {-1,$size}"
|
||||
} else {
|
||||
set sdsStr "$sdsName -type $dtype $units_att -rank 1 -dim {$size}"
|
||||
set sdsStr "$sdsName -type $dtype $units_att -rank 1 -dim {$size}"
|
||||
}
|
||||
}
|
||||
} message ] {
|
||||
@ -1326,12 +1326,12 @@ namespace import ::nexus::*
|
||||
foreach expt $::nexus::exports {
|
||||
publish $expt user
|
||||
sicslist setatt $expt privilege internal
|
||||
}
|
||||
}
|
||||
|
||||
# TODO Return filename from nxcreatefile and call nxreopen nxclose etc
|
||||
|
||||
# dictalias is a global hash which records the alias which the value of
|
||||
# a sics object (eg motors) is written to. The has is indexed by the
|
||||
# a sics object (eg motors) is written to. The has is indexed by the
|
||||
# objects name. It is useful for making links to datasets.
|
||||
# dim0 = vertical axis on detector
|
||||
# dim1 = horizontal axis on detector
|
||||
|
@ -1,4 +1,4 @@
|
||||
set sim_mode [SplitReply [plc_simulation]]
|
||||
set sim_mode [SplitReply [plc_simulation]]
|
||||
|
||||
namespace eval plc {
|
||||
}
|
||||
|
@ -93,7 +93,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"
|
||||
|
@ -13,7 +13,7 @@
|
||||
#TODO Get rid of duplication in bmonscan and hmscan code
|
||||
|
||||
namespace eval scan {
|
||||
variable ic_runscanpar
|
||||
variable ic_runscanpar
|
||||
|
||||
variable ic_hmm_datatype
|
||||
variable save_filetype
|
||||
@ -132,7 +132,7 @@ proc ::scan::ic_initialize {} {
|
||||
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
|
||||
# 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
|
||||
@ -143,7 +143,7 @@ proc ::scan::ic_initialize {} {
|
||||
preset float=0,inf
|
||||
datatype text=[join [array names ::nexus::histmem_filetype_spec] , ]
|
||||
savetype text=save,nosave
|
||||
force boolean
|
||||
force boolean
|
||||
}]
|
||||
scriptcallback connect hmscan SCANEND ::scan::hmscanend_event
|
||||
scriptcallback connect bmonscan SCANEND ::scan::bmonscanend_event
|
||||
@ -178,7 +178,7 @@ proc ::scan::check_limit {scan_variable limit_name target} {
|
||||
#
|
||||
# NOTE: The sics scan object alread checks if a variable is drivable
|
||||
# so we don't have to.
|
||||
# TODO We can't check limits of virtual motors yet because the
|
||||
# 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
|
||||
@ -216,7 +216,7 @@ proc ::scan::check_scanvar {sobj uobj} {
|
||||
# Returning an error will cause the scan to abort before it starts\n
|
||||
# eg\n
|
||||
# return -code error "error message"
|
||||
proc ::scan::pre_hmm_scan_prepare {} {}
|
||||
proc ::scan::pre_hmm_scan_prepare {} {}
|
||||
|
||||
##
|
||||
# @brief Do some pre-scan checks and prime the DAE
|
||||
@ -294,7 +294,7 @@ proc ::scan::hmm_scan_finish {sobj uobj} {
|
||||
# and clear any data links
|
||||
::nexus::newfile clear data
|
||||
if {$reset_position == "true"} {
|
||||
# set reset_position "false"
|
||||
# set reset_position "false"
|
||||
foreach svar $scanvarlist initpos $scaninitposlist {
|
||||
set svtype [getatt $svar type]
|
||||
if {$svtype == "motor" || $svtype == "configurablevirtualmotor"} {
|
||||
@ -339,7 +339,7 @@ proc ::scan::bm_writepoint {sobj uobj pt} {
|
||||
|
||||
#TODO Feedback for Histogram memory scan
|
||||
proc ::scan::hmm_writepoint {sobj uobj pt} {
|
||||
variable save_filetype
|
||||
variable save_filetype
|
||||
# Write hdb tree
|
||||
::nexus::save $pt
|
||||
}
|
||||
@ -348,10 +348,10 @@ proc ::scan::donothing {args} {}
|
||||
|
||||
proc ::scan::bm_count {sobj uobj point mode preset} {
|
||||
::scan::hdb_bmonscan -set mode $mode
|
||||
::scan::hdb_bmonscan -set preset $preset
|
||||
::scan::hdb_bmonscan -set feedback scanpoint $point;
|
||||
::scan::hdb_bmonscan -set feedback mode $mode;
|
||||
::scan::hdb_bmonscan -set feedback preset $preset;
|
||||
::scan::hdb_bmonscan -set preset $preset
|
||||
::scan::hdb_bmonscan -set feedback scanpoint $point;
|
||||
::scan::hdb_bmonscan -set feedback mode $mode;
|
||||
::scan::hdb_bmonscan -set feedback preset $preset;
|
||||
::scan::hdb_bmonscan -set feedback scan_variable_value [SplitReply [[lindex $::scan::scanvarlist 0]]]
|
||||
::monitor::count $mode $preset
|
||||
}
|
||||
@ -396,7 +396,7 @@ proc ::scan::bm_scan_prepare {sobj uobj} {
|
||||
|
||||
::scan::hdb_bmonscan -set feedback status BUSY
|
||||
run_mode "bmonscan"
|
||||
|
||||
|
||||
array set bm_fb [::scan::hdb_bmonscan -list feedback]
|
||||
set ::histogram_memory::histmem_axes(SVAR) [SplitReply [sicslist [lindex $::scan::scanvarlist 0] hdb_path] ]
|
||||
::nexus::newfile BEAM_MONITOR $save_filetype
|
||||
@ -480,7 +480,7 @@ namespace eval scan {
|
||||
switch $arg {
|
||||
"force" {
|
||||
if [string is boolean $val] {
|
||||
set force_scan $val
|
||||
set force_scan $val
|
||||
} else {
|
||||
error "ERROR: force must be true or false"
|
||||
}
|
||||
@ -512,7 +512,7 @@ namespace eval scan {
|
||||
# hmscan ignores mode and preset, we use FAT_COUNT_METHOD and FAT_COUNT_STOP
|
||||
::histogram_memory::count_method $mode
|
||||
::histogram_memory::count_size $preset
|
||||
hmscan clear
|
||||
hmscan clear
|
||||
foreach scanvar $scanvarlist start $startlist step $steplist {
|
||||
hmscan add $scanvar $start $step
|
||||
}
|
||||
@ -523,7 +523,7 @@ namespace eval scan {
|
||||
"monitor" { set bms_mode "monitor" }
|
||||
default {return -code error "ERROR: mode should be 'time' or 'monitor' not $mode"}
|
||||
}
|
||||
bmonscan clear
|
||||
bmonscan clear
|
||||
foreach scanvar $scanvarlist start $startlist step $steplist {
|
||||
bmonscan add $scanvar $start $step
|
||||
}
|
||||
@ -560,7 +560,7 @@ namespace eval scan {
|
||||
# Default filetype for histogram memory scans
|
||||
set ic_hmm_datatype "HISTOGRAM_XYT"
|
||||
# Default save uniquely numbered files
|
||||
set savetype "save"
|
||||
set savetype "save"
|
||||
set reset_position [SplitReply [::scan::runscan_reset_position]]
|
||||
|
||||
checkarg $scanvar varname "Expecting a scan variable name, not $scanvar"
|
||||
@ -568,7 +568,7 @@ namespace eval scan {
|
||||
checkarg $step double "Expecing a float for $scanvar step value, not $step"
|
||||
lappend scanvarlist $scanvar
|
||||
lappend startlist $start
|
||||
lappend steplist $step
|
||||
lappend steplist $step
|
||||
for {set argindex 0} {1} {incr argindex 3} {
|
||||
set par [lindex $args $argindex]
|
||||
if {[string length $par] == 0} {
|
||||
@ -613,7 +613,7 @@ namespace eval scan {
|
||||
return $message
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#TODO Add counter (monitor_1 monitor_2 ... histmem) and filetype BEAM_MONITOR HISTMEM_?
|
||||
##
|
||||
# @brief Run a histogram memory scan
|
||||
@ -639,11 +639,11 @@ namespace eval scan {
|
||||
set force_scan false
|
||||
|
||||
set hm_ft_names [array names ::nexus::histmem_filetype_spec]
|
||||
|
||||
|
||||
# Default filetype for histogram memory scans
|
||||
set ic_hmm_datatype "HISTOGRAM_XYT"
|
||||
# Default save uniquely numbered files
|
||||
set savetype "save"
|
||||
set savetype "save"
|
||||
set reset_position [SplitReply [::scan::runscan_reset_position]]
|
||||
if {[is_drivable $scanvar] == 0} {
|
||||
error "The scan variable <$scanvar> must be drivable"
|
||||
@ -673,7 +673,7 @@ namespace eval scan {
|
||||
switch $arg {
|
||||
"force" {
|
||||
if [string is boolean $val] {
|
||||
set force_scan $val
|
||||
set force_scan $val
|
||||
} else {
|
||||
error "ERROR: force must be true or false"
|
||||
}
|
||||
@ -705,7 +705,7 @@ namespace eval scan {
|
||||
# hmscan ignores mode and preset, we use FAT_COUNT_METHOD and FAT_COUNT_STOP
|
||||
::histogram_memory::count_method $mode
|
||||
::histogram_memory::count_size $preset
|
||||
hmscan clear
|
||||
hmscan clear
|
||||
hmscan add $scanvar $start $step
|
||||
} elseif {$det_type == "bmon"} {
|
||||
set mode [string tolower $mode]
|
||||
@ -714,7 +714,7 @@ namespace eval scan {
|
||||
"monitor" { set bms_mode "monitor" }
|
||||
default {return -code error "ERROR: mode should be 'time' or 'monitor' not $mode"}
|
||||
}
|
||||
bmonscan clear
|
||||
bmonscan clear
|
||||
bmonscan add $scanvar $start $step
|
||||
} else {
|
||||
return -code error "ERROR: detector type should be 'histmem' or 'bmon' not $det_type"
|
||||
@ -744,6 +744,6 @@ namespace eval scan {
|
||||
}
|
||||
namespace import ::scan::runscan
|
||||
namespace import ::scan::mscan
|
||||
publish runscan user
|
||||
publish runscan user
|
||||
publish mscan user
|
||||
sicslist setatt runscan privilege internal
|
||||
|
@ -12,7 +12,7 @@ if {$sim_mode == "true"} {
|
||||
switch $status {
|
||||
"CALIBRATED REACTOR POWER" {
|
||||
return [lindex $opal_status 0]
|
||||
}
|
||||
}
|
||||
"CNS HELIUM INLET TEMPERATURE" {
|
||||
return [lindex $opal_status 1]
|
||||
}
|
||||
@ -32,7 +32,7 @@ if {$sim_mode == "true"} {
|
||||
}
|
||||
publish opal user
|
||||
} else {
|
||||
MakeAsyncQueue lss_chan LSS 137.157.204.67 31250
|
||||
MakeAsyncQueue lss_chan LSS 137.157.204.67 31250
|
||||
MakeLSSMonitor opal lss_chan 0
|
||||
}
|
||||
::utility::macro::getset float reactor_power {} {
|
||||
@ -41,7 +41,7 @@ if {$sim_mode == "true"} {
|
||||
if [string is double $value] {
|
||||
return "reactor_power = $value"
|
||||
} else {
|
||||
return "reactor_power = -1"
|
||||
return "reactor_power = -1"
|
||||
}
|
||||
}
|
||||
sicslist setatt reactor_power klass source
|
||||
@ -57,9 +57,9 @@ proc ::source::ic_initialize {guide} {
|
||||
set str [opal "CNS HELIUM INLET TEMPERATURE"]
|
||||
set value [lindex [lindex [split $str =] 1] 0]
|
||||
if [string is double $value] {
|
||||
return "cns_inlet_temp = $value"
|
||||
return "cns_inlet_temp = $value"
|
||||
} else {
|
||||
return "cns_inlet_temp = -1"
|
||||
return "cns_inlet_temp = -1"
|
||||
}
|
||||
}
|
||||
sicslist setatt cns_inlet_temp klass source
|
||||
@ -73,7 +73,7 @@ proc ::source::ic_initialize {guide} {
|
||||
if [string is double $value] {
|
||||
return "cns_outlet_temp = $value"
|
||||
} else {
|
||||
return "cns_outlet_temp = -1"
|
||||
return "cns_outlet_temp = -1"
|
||||
}
|
||||
}
|
||||
sicslist setatt cns_outlet_temp klass source
|
||||
@ -87,7 +87,7 @@ proc ::source::ic_initialize {guide} {
|
||||
if [string is double $value] {
|
||||
return "cns_flow = $value"
|
||||
} else {
|
||||
return "cns_flow = -1"
|
||||
return "cns_flow = -1"
|
||||
}
|
||||
}
|
||||
sicslist setatt cns_flow klass source
|
||||
|
@ -18,9 +18,9 @@
|
||||
# This configuration does not create a GumTree interface or let you
|
||||
# save nexus data files.
|
||||
|
||||
# Required by server_config.tcl
|
||||
# Required by server_config.tcl
|
||||
VarMake Instrument Text Internal
|
||||
Instrument bare_dingo
|
||||
Instrument bare_dingo
|
||||
Instrument lock
|
||||
|
||||
#START SERVER CONFIGURATION SECTION
|
||||
@ -30,24 +30,24 @@ source server_config.tcl
|
||||
|
||||
set sicsroot ../
|
||||
source util/utility.tcl
|
||||
ServerOption LogFileBaseName $sicsroot/log/serverlog
|
||||
ServerOption LogFileBaseName $sicsroot/log/serverlog
|
||||
|
||||
###### installprotocolhandler
|
||||
###### installprotocolhandler
|
||||
|
||||
ServerOption statusfile $sicsroot/log/status.tcl
|
||||
ServerOption RedirectFile $sicsroot/log/stdout
|
||||
ServerOption LogFileDir $sicsroot/log
|
||||
ServerOption statusfile $sicsroot/log/status.tcl
|
||||
ServerOption RedirectFile $sicsroot/log/stdout
|
||||
ServerOption LogFileDir $sicsroot/log
|
||||
ServerOption QuieckPort [get_portnum $quieckport ]
|
||||
ServerOption ServerPort [get_portnum $serverport ]
|
||||
ServerOption InterruptPort [get_portnum $interruptport ]
|
||||
ServerOption TelWord sicslogin
|
||||
ServerOption TelWord sicslogin
|
||||
ServerOption TelnetPort [get_portnum $telnetport ]
|
||||
ServerOption ReadUserPasswdTimeout 600000
|
||||
ServerOption AcceptTimeOut 10
|
||||
ServerOption ReadTimeOut 1000
|
||||
SicsUser manager ansto 1
|
||||
SicsUser user sydney 2
|
||||
SicsUser spy 007 3
|
||||
ServerOption ReadUserPasswdTimeout 600000
|
||||
ServerOption AcceptTimeOut 10
|
||||
ServerOption ReadTimeOut 1000
|
||||
SicsUser manager ansto 1
|
||||
SicsUser user sydney 2
|
||||
SicsUser spy 007 3
|
||||
|
||||
Motor dummy_motor asim [params \
|
||||
asyncqueue mc1\
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
|
||||
source $cfPath(anticollider)/anticollider_common.tcl
|
||||
source $cfPath(anticollider)/anticollider_common.tcl
|
||||
|
||||
# NOTE: This is called with a list of motorname target pairs
|
||||
proc ::anticollider::enable {args} {
|
||||
|
@ -5,7 +5,7 @@ namespace eval counter {
|
||||
variable isc_numchannels
|
||||
variable isc_monitor_address
|
||||
variable isc_portlist
|
||||
variable isc_beam_monitor_list
|
||||
variable isc_beam_monitor_list
|
||||
|
||||
variable isc_cm_address
|
||||
variable isc_cm_port
|
||||
@ -18,11 +18,11 @@ proc ::counter::cm_initialize {} {
|
||||
if [ catch {
|
||||
variable isc_cm_address
|
||||
variable isc_cm_port
|
||||
|
||||
|
||||
|
||||
MakeAsyncQueue cmserver CAMERA $isc_cm_address $isc_cm_port
|
||||
MakeCounter cm1 anstocamera cmserver
|
||||
|
||||
|
||||
sicslist setatt cm1 privilege internal
|
||||
::utility::macro::getset text cm1_mode {} {
|
||||
return [cm1 getmode]
|
||||
@ -78,7 +78,7 @@ proc ::counter::isc_initialize {} {
|
||||
|
||||
set isc_cm_address [dict get $::CAMERA_HOSTPORT HOST]
|
||||
set isc_cm_port [dict get $::CAMERA_HOSTPORT PORT]
|
||||
::counter::cm_initialize
|
||||
::counter::cm_initialize
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error "$message"
|
||||
|
@ -70,7 +70,7 @@ Motor stth $motor_driver_type [params \
|
||||
absEncHome $stth_Home\
|
||||
cntsPerX 4096]
|
||||
stth part sample
|
||||
stth long_name stth
|
||||
stth long_name stth
|
||||
stth softlowerlim 0
|
||||
stth softupperlim 360
|
||||
stth home 0
|
||||
@ -185,7 +185,7 @@ sz home 0
|
||||
#
|
||||
|
||||
# mc2: Camera translation axis along beam
|
||||
# Gearbox ?, Gear ratio ?,
|
||||
# Gearbox ?, Gear ratio ?,
|
||||
set dy_Home 0
|
||||
set dyStepRate ?
|
||||
Motor dy $motor_driver_type [params \
|
||||
|
@ -24,10 +24,10 @@ set 20sample_table {
|
||||
6 203.7
|
||||
7 161.7
|
||||
8 119.7
|
||||
9 77.7
|
||||
10 35.7
|
||||
11 -46.3
|
||||
12 -88.3
|
||||
9 77.7
|
||||
10 35.7
|
||||
11 -46.3
|
||||
12 -88.3
|
||||
13 -130.3
|
||||
14 -172.3
|
||||
15 -214.3
|
||||
|
@ -1,5 +1,5 @@
|
||||
set sim_mode [SplitReply [plc_simulation]]
|
||||
if {$sim_mode == "false"} {
|
||||
if {$sim_mode == "false"} {
|
||||
MakeAsyncQueue plc_chan SafetyPLC [dict get $::PLC_HOSTPORT HOST] [dict get $::PLC_HOSTPORT PORT]
|
||||
MakeSafetyPLC plc plc_chan 0
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
# Author: Jing Chen (jgn@ansto.gov.au)
|
||||
|
||||
# Required by server_config.tcl
|
||||
# Required by server_config.tcl
|
||||
VarMake Instrument Text Internal
|
||||
Instrument dingo
|
||||
Instrument dingo
|
||||
Instrument lock
|
||||
|
||||
#START SERVER CONFIGURATION SECTION
|
||||
@ -66,7 +66,7 @@ foreach m [sicslist type motor] {
|
||||
}
|
||||
|
||||
server_init
|
||||
|
||||
|
||||
clientput "serverport [get_portnum $::serverport]"
|
||||
|
||||
###########################################
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
|
||||
source $cfPath(anticollider)/anticollider_common.tcl
|
||||
source $cfPath(anticollider)/anticollider_common.tcl
|
||||
::anticollider::loadscript acscript.txt
|
||||
|
@ -34,7 +34,7 @@ command SimpleRun {
|
||||
float=0:inf steptime
|
||||
int=1:inf numsteps
|
||||
} {
|
||||
|
||||
|
||||
# RadCollOff
|
||||
histmem mode time
|
||||
histmem preset $steptime
|
||||
@ -68,7 +68,7 @@ command RadCollRun {
|
||||
int=1:inf oscno
|
||||
int=1:inf reps
|
||||
} {
|
||||
|
||||
|
||||
# RadCollOn $oscno
|
||||
histmem mode unlimited
|
||||
newfile HISTOGRAM_XY
|
||||
@ -102,7 +102,7 @@ float=0:inf time
|
||||
}
|
||||
RadCollOff
|
||||
}
|
||||
# RadCollScan
|
||||
# RadCollScan
|
||||
command RadCollScan {
|
||||
text=drivable motor
|
||||
float start
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
# Euler cradle scan commands for texture runs
|
||||
# AJS Dec 2010
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
proc SetHistoSync {framenum} {
|
||||
histmem stop
|
||||
bat_table -set NO_BAT_ENTRIES $framenum NO_BAT_PERIODS $framenum
|
||||
bat_table -set NO_BAT_ENTRIES $framenum NO_BAT_PERIODS $framenum
|
||||
bat_table -set NO_REPEAT_ENTRY 1 NO_REPEAT_TABLE 1 NO_EXECUTE_TABLE 1 PERIOD_INDICES { 0 1 }
|
||||
fat_table -set NOS_PERIODS $framenum
|
||||
oat_table -set T {0 2200000} NTC 1
|
||||
@ -22,7 +22,7 @@ publish SetHistoSync user
|
||||
|
||||
proc SetHistoNormal {} {
|
||||
histmem stop
|
||||
bat_table -set NO_BAT_ENTRIES 1 NO_BAT_PERIODS 1
|
||||
bat_table -set NO_BAT_ENTRIES 1 NO_BAT_PERIODS 1
|
||||
bat_table -set NO_REPEAT_ENTRY 0 NO_REPEAT_TABLE 0 NO_EXECUTE_TABLE 0 PERIOD_INDICES { 0}
|
||||
fat_table -set NOS_PERIODS 1
|
||||
oat_table -set T {0 2200000} NTC 1
|
||||
@ -32,7 +32,7 @@ proc SetHistoNormal {} {
|
||||
}
|
||||
|
||||
# continous scan for EPHI- the euler cradle phi stage (innermost axis)
|
||||
# note make sure controller 2 has the PHISCAN code in it
|
||||
# note make sure controller 2 has the PHISCAN code in it
|
||||
|
||||
publish SetHistoNormal user
|
||||
|
||||
@ -77,7 +77,7 @@ broadcast $scval $stval
|
||||
|
||||
|
||||
# this we needed when it didn't work properly
|
||||
# proc ::histogram_memory::pre_count {} {}
|
||||
# proc ::histogram_memory::pre_count {} {}
|
||||
# ephi send SHC
|
||||
# ephi send SPC=25000
|
||||
# ephi send BCG
|
||||
|
@ -5,7 +5,7 @@ namespace eval counter {
|
||||
variable isc_numchannels
|
||||
variable isc_monitor_address
|
||||
variable isc_portlist
|
||||
variable isc_beam_monitor_list
|
||||
variable isc_beam_monitor_list
|
||||
proc set_sobj_attributes {} {
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ source $cfPath(environment)/temperature/lakeshore340_common.tcl
|
||||
# @param settle, settling time in seconds
|
||||
# @param range, lakeshore range
|
||||
# @param upperlimit, upper temperature limit Kelvin
|
||||
# @param lowerlimit, lower temperature limit Kelvin
|
||||
# @param lowerlimit, lower temperature limit Kelvin
|
||||
proc ::environment::temperature::add_ls340 {tcn tc_dfltURL mport args} {
|
||||
variable tc_dfltPar
|
||||
variable moxaPortMap
|
||||
@ -41,7 +41,7 @@ proc ::environment::temperature::add_ls340 {tcn tc_dfltURL mport args} {
|
||||
}
|
||||
}
|
||||
|
||||
sicslist setatt $tcn environment_name ${tcn}_cntrl
|
||||
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 ] {
|
||||
|
@ -1,4 +1,4 @@
|
||||
set hpaths [list experiment detector detector/monitor detector/histmem ]
|
||||
set hpaths [list experiment detector detector/monitor detector/histmem ]
|
||||
|
||||
# Maps devices (eg motors) to hipadaba paths.
|
||||
# obj name path
|
||||
|
@ -10,7 +10,7 @@ proc ::histogram_memory::init_OAT_TABLE {args} {
|
||||
} else {
|
||||
set resolution "hires"
|
||||
}
|
||||
# We don't need a MAX_CHAN parameter for time because the time channel
|
||||
# We don't need a MAX_CHAN parameter for time because the time channel
|
||||
# is scaled by calling the ::histogram_memory::clock_scale function
|
||||
OAT_TABLE X -setdata MAX_CHAN 3872
|
||||
OAT_TABLE X -setdata MAX_CHAN_PERSEG 992
|
||||
@ -64,7 +64,7 @@ proc ::histogram_memory::oat_bins {axis} {
|
||||
set bb0 3871.5
|
||||
set bb1 [expr $bb0+$bstep]
|
||||
FAT_TABLE -set MULTI_HOST_HISTO_STITCH_OVERLAP [expr abs(32.0/$bstep)]
|
||||
}
|
||||
}
|
||||
return [list $bb0 $bb1]
|
||||
} else {
|
||||
return [OAT_TABLE -get $axis]
|
||||
@ -78,7 +78,7 @@ proc ::histogram_memory::oat_bins {axis} {
|
||||
# @brief Returns the current number of channels for a given axis.
|
||||
proc ::histogram_memory::number_of_channels {axis} {
|
||||
array set channID {X NXC Y NYC T NTC}
|
||||
if [ catch {
|
||||
if [ catch {
|
||||
if {$axis == "X"} {
|
||||
set nch_perseg [OAT_TABLE -get $channID($axis)]
|
||||
set overlap [FAT_TABLE -get MULTI_HOST_HISTO_STITCH_OVERLAP]
|
||||
|
@ -122,7 +122,7 @@ proc histmem_acquire_period_sequence { Np Nf } {
|
||||
histmem start
|
||||
|
||||
set dlytime [ expr int( 1000 * $Nf / 50. ) ]
|
||||
# clientput "Waiting for" $dlytime "ms..."
|
||||
# clientput "Waiting for" $dlytime "ms..."
|
||||
after $dlytime
|
||||
|
||||
# clientput "tc1 reading is: " [tc1 get]
|
||||
|
@ -43,7 +43,7 @@ proc histmem_acquire_period_sequence { Np Nf } {
|
||||
histmem start
|
||||
|
||||
set dlytime [ expr int( 1000 * $Nf / 50. ) ]
|
||||
# clientput "Waiting for" $dlytime "ms..."
|
||||
# clientput "Waiting for" $dlytime "ms..."
|
||||
# after $dlytime
|
||||
|
||||
# clientput "tc1 reading is: " [tc1 get]
|
||||
|
@ -103,7 +103,7 @@ set move_count 10
|
||||
# Set axis_config as follows to use different axis configurations
|
||||
# 0: tilt stage configuration
|
||||
# 1: eulerian cradle
|
||||
# 2: small omega
|
||||
# 2: small omega
|
||||
# 3: Oxford magnet sample stick
|
||||
set axis_config 0
|
||||
|
||||
@ -427,7 +427,7 @@ oct long_name oct
|
||||
|
||||
# Monochromator Focusing (Ge)
|
||||
## ffr 31/7/2012
|
||||
## absEncHome was found to be 16777217 on 31/7/2012 when the
|
||||
## absEncHome was found to be 16777217 on 31/7/2012 when the
|
||||
## encoder clocked over to 114 counts to give a posn
|
||||
## reading of 4793.458008
|
||||
## The encoder has a 12bit resolution (ie 12bits/turn 4096)
|
||||
|
@ -1,5 +1,5 @@
|
||||
set sim_mode [SplitReply [plc_simulation]]
|
||||
if {$sim_mode == "false"} {
|
||||
if {$sim_mode == "false"} {
|
||||
MakeAsyncQueue plc_chan SafetyPLC 137.157.211.21 30001
|
||||
MakeSafetyPLC plc plc_chan 0
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
MakeHM hmm SIM
|
||||
#MakeHMControl_ANSTO hmc bm hmm
|
||||
source $cfPath(hmm)/hmm_configuration_common_1.tcl
|
||||
source $cfPath(hmm)/hmm_configuration_common_1.tcl
|
||||
|
||||
# Beam monitor controlled hmm controller.
|
||||
proc ::histogram_memory::hmc {_start _preset _mode _pause} {
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
|
||||
# Required by server_config.tcl
|
||||
# Required by server_config.tcl
|
||||
VarMake Instrument Text Internal
|
||||
Instrument wombat
|
||||
Instrument wombat
|
||||
Instrument lock
|
||||
|
||||
#START SERVER CONFIGURATION SECTION
|
||||
@ -54,13 +54,13 @@ source gumxml.tcl
|
||||
|
||||
# The Alice Thing
|
||||
# Qlink : 9600, 8 data, 1 stop, No Parity, None Flow
|
||||
# LS340 : 9600, 7 data, 1 stop, Odd Parity, None Flow
|
||||
# LS340 : 9600, 7 data, 1 stop, Odd Parity, None Flow
|
||||
# Julabo: 9600, 7 data, 1 stop, Even Parity, RTS/CTS Flow
|
||||
# add_qlink qlink 137.157.201.86 4004 5
|
||||
# add_sct_ls340 tc1 137.157.201.86 4001 "\r" 5.0 5.0
|
||||
# add_lh45 tc2 137.157.201.86 4003 1
|
||||
|
||||
# Eurotherm
|
||||
# Eurotherm
|
||||
# add_et2000 name IP PORT MODBUS_ADDR TOL
|
||||
# add_et2000 et2000 10.157.205.19 502 1 5
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
|
||||
# Cycle motors
|
||||
# Cycle motors
|
||||
clientput "drive to zero reference"
|
||||
drive ss2vg 10 ss2hg 10 ss1vg 10 ss1hg 10
|
||||
drive som 0 ss1vo 0 ss2vo 0 ss2vo 0 ss2ho 0 sphi 0 schi 90 sx 0 sz 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
|
||||
source $cfPath(anticollider)/anticollider_common.tcl
|
||||
source $cfPath(anticollider)/anticollider_common.tcl
|
||||
::anticollider::loadscript acscript.txt
|
||||
|
@ -5,7 +5,7 @@ namespace eval counter {
|
||||
variable isc_numchannels
|
||||
variable isc_monitor_address
|
||||
variable isc_portlist
|
||||
variable isc_beam_monitor_list
|
||||
variable isc_beam_monitor_list
|
||||
proc set_sobj_attributes {} {
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ source $cfPath(environment)/temperature/lakeshore340_common.tcl
|
||||
# @param settle, settling time in seconds
|
||||
# @param range, lakeshore range
|
||||
# @param upperlimit, upper temperature limit Kelvin
|
||||
# @param lowerlimit, lower temperature limit Kelvin
|
||||
# @param lowerlimit, lower temperature limit Kelvin
|
||||
proc ::environment::temperature::add_ls340 {tcn tc_dfltURL mport args} {
|
||||
variable tc_dfltPar
|
||||
variable moxaPortMap
|
||||
@ -41,7 +41,7 @@ proc ::environment::temperature::add_ls340 {tcn tc_dfltURL mport args} {
|
||||
}
|
||||
}
|
||||
|
||||
sicslist setatt $tcn environment_name ${tcn}_cntrl
|
||||
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 ] {
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
set hpaths [list experiment detector detector/monitor detector/histmem ]
|
||||
set hpaths [list experiment detector detector/monitor detector/histmem ]
|
||||
|
||||
#A "motor part" may have a group path which can be appended to the
|
||||
#following paths.
|
||||
|
@ -4,7 +4,7 @@ set sim_mode [SplitReply [hmm_simulation]]
|
||||
|
||||
proc ::histogram_memory::init_OAT_TABLE {} {
|
||||
if [ catch {
|
||||
# We don't need a MAX_CHAN parameter for time because the time channel
|
||||
# We don't need a MAX_CHAN parameter for time because the time channel
|
||||
# is scaled by calling the ::histogram_memory::clock_scale function
|
||||
OAT_TABLE X -setdata MAX_CHAN 128
|
||||
OAT_TABLE Y -setdata MAX_CHAN 512
|
||||
@ -19,7 +19,7 @@ proc ::histogram_memory::init_OAT_TABLE {} {
|
||||
hmm configure fat_frame_frequency $freq
|
||||
hmm configure fat_frame_source INTERNAL
|
||||
|
||||
OAT_TABLE -set X { 127.5 126.5 } NXC 128 Y { -0.5 3.5 } NYC 128 T { 0 20000 } NTC 1
|
||||
OAT_TABLE -set X { 127.5 126.5 } NXC 128 Y { -0.5 3.5 } NYC 128 T { 0 20000 } NTC 1
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
|
@ -1,6 +1,6 @@
|
||||
# This must be loaded by motor_configuration.tcl
|
||||
|
||||
set ephi_Home 6647698
|
||||
set ephi_Home 6647698
|
||||
set echi_Home 8919294
|
||||
set eom_Home 23165482
|
||||
|
||||
|
@ -166,7 +166,7 @@ Motor mchi $motor_driver_type [params \
|
||||
absEncHome $mchi_Home\
|
||||
cntsPerX 4096]
|
||||
mchi home -0.2546
|
||||
mchi softlowerlim -2
|
||||
mchi softlowerlim -2
|
||||
mchi softupperlim 2
|
||||
mchi speed 1
|
||||
mchi movecount $move_count
|
||||
@ -393,7 +393,7 @@ Motor stth $motor_driver_type [params \
|
||||
absEnc 1\
|
||||
absEncHome $stth_Home\
|
||||
cntsPerX -93207]
|
||||
stth softlowerlim -156.75
|
||||
stth softlowerlim -156.75
|
||||
stth softupperlim 5.25
|
||||
stth home 0
|
||||
stth speed 0.5
|
||||
|
@ -1,5 +1,5 @@
|
||||
set sim_mode [SplitReply [plc_simulation]]
|
||||
if {$sim_mode == "false"} {
|
||||
if {$sim_mode == "false"} {
|
||||
MakeAsyncQueue plc_chan SafetyPLC 137.157.211.21 30002
|
||||
MakeSafetyPLC plc plc_chan 0
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
|
||||
# Required by server_config.tcl
|
||||
# Required by server_config.tcl
|
||||
VarMake Instrument Text Internal
|
||||
Instrument echidna
|
||||
Instrument echidna
|
||||
Instrument lock
|
||||
|
||||
#START SERVER CONFIGURATION SECTION
|
||||
|
@ -1,6 +1,6 @@
|
||||
MakeHM hmm SIM
|
||||
#MakeHMControl_ANSTO hmc bm hmm
|
||||
source $cfPath(hmm)/hmm_configuration_common_1.tcl
|
||||
source $cfPath(hmm)/hmm_configuration_common_1.tcl
|
||||
|
||||
# Beam monitor controlled hmm controller.
|
||||
proc ::histogram_memory::hmc {_start _preset _mode _pause} {
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
|
||||
source $cfPath(anticollider)/anticollider_common.tcl
|
||||
source $cfPath(anticollider)/anticollider_common.tcl
|
||||
|
||||
# NOTE: This is called with a list of motorname target pairs
|
||||
proc ::anticollider::enable {args} {
|
||||
|
@ -185,7 +185,7 @@ set chname ch$chN
|
||||
hfactory $fermiPath/$chname/intlck_status/$field plain user int
|
||||
}
|
||||
|
||||
|
||||
|
||||
hfactory $chPath/control plain user none
|
||||
hfactory $chPath/control/device_error plain user text
|
||||
|
||||
@ -238,7 +238,7 @@ set chname ch$chN
|
||||
hsetprop $fermiPath "RDGAINPHASE" ${scobjNS}::rdVal $fermiPath {prop_gain int_gain phase_gain}
|
||||
hsetprop $fermiPath "RDSYNMOTDIR" ${scobjNS}::rdVal $fermiPath {ref_delay ref_period sync_srce motdir}
|
||||
hsetprop $fermiPath "RDIDLE" ${scobjNS}::rdVal $fermiPath idle_toggle
|
||||
|
||||
|
||||
|
||||
if {$sim_mode == "false"} {
|
||||
sct_fermi poll $fermiPath $pollrate
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
# Drive the 3 Monochromator blades as a "bunch"
|
||||
|
||||
# Drive the 3 Monochromator blades as a "bunch"
|
||||
#
|
||||
# Author: Jing Chen, jgn@ansto.gov.au
|
||||
#
|
||||
#
|
||||
# Date: 11/11/2011
|
||||
|
||||
# get a specified parameter value of a motor
|
||||
@ -79,25 +79,25 @@ proc DriveMono {mot focus} {
|
||||
set translateDis [expr $focus - [getSetting $mot position]]
|
||||
|
||||
# Determine if the movement is within the ranges of the three motors
|
||||
if {[expr $mraPosition + $translateDis] > $mraSoftupperlim ||
|
||||
[expr $mraPosition + $translateDis] < $mraSoftlowerlim} {
|
||||
if {[expr $mraPosition + $translateDis] > $mraSoftupperlim ||
|
||||
[expr $mraPosition + $translateDis] < $mraSoftlowerlim} {
|
||||
broadcast "Error: the movement is out of the range limit of motor mra"
|
||||
set moveFlag 0
|
||||
}
|
||||
|
||||
if {[expr $mrbPosition + $translateDis] > $mrbSoftupperlim ||
|
||||
if {[expr $mrbPosition + $translateDis] > $mrbSoftupperlim ||
|
||||
[expr $mrbPosition + $translateDis] < $mrbSoftlowerlim} {
|
||||
broadcast "Error: the movement is out of the range limit of motor mrb"
|
||||
set moveFlag 0
|
||||
}
|
||||
|
||||
if {[expr $mrcPosition + $translateDis] > $mrcSoftupperlim ||
|
||||
if {[expr $mrcPosition + $translateDis] > $mrcSoftupperlim ||
|
||||
[expr $mrcPosition + $translateDis] < $mrcSoftlowerlim} {
|
||||
broadcast "Error: the movement is out of the range limit of motor mrc"
|
||||
set moveFlag 0
|
||||
}
|
||||
|
||||
# move the three motors
|
||||
# move the three motors
|
||||
if {$moveFlag == 1} {
|
||||
# Unlock the three motors
|
||||
mra fixed -1
|
||||
|
@ -5,7 +5,7 @@ namespace eval counter {
|
||||
variable isc_numchannels
|
||||
variable isc_monitor_address
|
||||
variable isc_portlist
|
||||
variable isc_beam_monitor_list
|
||||
variable isc_beam_monitor_list
|
||||
proc set_sobj_attributes {} {
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ proc ::histogram_memory::init_OAT_TABLE {} {
|
||||
hmm configure fat_frame_frequency $freq
|
||||
hmm configure fat_frame_source INTERNAL
|
||||
|
||||
OAT_TABLE -set X { -0.5 0.5 } NXC 16 Y { -0.5 0.5 } NYC 1024 T { 0 200000 } NTC 1
|
||||
OAT_TABLE -set X { -0.5 0.5 } NXC 16 Y { -0.5 0.5 } NYC 1024 T { 0 200000 } NTC 1
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
@ -92,7 +92,7 @@ proc ::histogram_memory::isc_initialize {} {
|
||||
::histogram_memory::set_graphtype "two_theta" "boundaries"
|
||||
|
||||
# MJL TODO detector geometry for Kookaburra TBD. Figures need revision during commissioning
|
||||
# Width = 25mm spacing * 16 tubes = 5000mm (??? degree coverage)
|
||||
# Width = 25mm spacing * 16 tubes = 5000mm (??? degree coverage)
|
||||
# Height = 1015mm (tube length)
|
||||
# Radius = 2400mm
|
||||
detector_active_height_mm 1015
|
||||
|
@ -90,7 +90,7 @@ bex home 0
|
||||
|
||||
# mc1: Premonochromator Crystal Si(111) Tilt
|
||||
# Gearbox 55:1, 0.5 degree
|
||||
# Encoder 2P12,
|
||||
# Encoder 2P12,
|
||||
set pmchi_Home 8410424
|
||||
set pmchiStepRate [expr $motorrate*55.0/0.5]
|
||||
Motor pmchi $motor_driver_type [params \
|
||||
@ -118,12 +118,12 @@ pmchi home 0
|
||||
|
||||
|
||||
# mc1: Premonochromator Crystal Si(111) Rotate
|
||||
# Gearbox 50:1, pitch 1 degree
|
||||
# Gearbox 50:1, pitch 1 degree
|
||||
# Encoder 2P25
|
||||
# Crystal B 0, 18889883
|
||||
# Crystal HOPG position 179.603806, 2149592
|
||||
# Crystal HOPG position 179.603806, 2149592
|
||||
# Crystal HOPG loading position 49.740612, 14253738
|
||||
set pmom_Home 2102963
|
||||
set pmom_Home 2102963
|
||||
set pmomStepRate [expr $motorrate*50.0]
|
||||
Motor pmom $motor_driver_type [params \
|
||||
asyncqueue mc1\
|
||||
@ -150,9 +150,9 @@ pmom home 0
|
||||
|
||||
|
||||
# mc1: Main Detector - X Translate
|
||||
# Gearbox 20:1, pitch 5mm
|
||||
# Gearbox 20:1, pitch 5mm
|
||||
# Encoder 2p17
|
||||
set mdet_Home 521939864
|
||||
set mdet_Home 521939864
|
||||
set mdetStepRate [expr $motorrate *20.0/5.0]
|
||||
Motor mdet $motor_driver_type [params \
|
||||
asyncqueue mc1\
|
||||
@ -214,9 +214,9 @@ att home 0
|
||||
|
||||
# mc2: CC1 Monochromator Stage Tilt
|
||||
# Gearbox 20:1, screw pitch 356
|
||||
# Encoder 2p17
|
||||
# Encoder 2p17
|
||||
# 68.681
|
||||
set m1chi_Home 15016533
|
||||
set m1chi_Home 15016533
|
||||
set m1chiSetRate [expr $motorrate*20*100/68.681]
|
||||
Motor m1chi $motor_driver_type [params \
|
||||
asyncqueue mc2\
|
||||
@ -243,7 +243,7 @@ m1chi home 0
|
||||
|
||||
|
||||
# mc2: CC1 Monochromator Stage Rotation
|
||||
# Gearbox 100:1, screw pitch 356
|
||||
# Gearbox 100:1, screw pitch 356
|
||||
# Encoder 2p25
|
||||
# m1om_Home 13617081
|
||||
set m1om_Home 30395150
|
||||
@ -279,7 +279,7 @@ m1om Creep_Substep 0.04
|
||||
|
||||
|
||||
# mc2: CC1 Monochromator Stage X Translation
|
||||
# Gearbox 20:1, pitch 5mm
|
||||
# Gearbox 20:1, pitch 5mm
|
||||
# Encoder 2p17
|
||||
set m1x_Home 3754723
|
||||
set m1xSetRate [expr $motorrate*20.0/5.0]
|
||||
@ -299,14 +299,14 @@ Motor m1x $motor_driver_type [params \
|
||||
absEncHome $m1x_Home\
|
||||
cntsPerX [expr -131072/5.0]]
|
||||
m1x speed 0.3
|
||||
m1x part crystal
|
||||
m1x part crystal
|
||||
m1x long_name m1x
|
||||
m1x softlowerlim -82
|
||||
m1x softupperlim 49
|
||||
m1x softlowerlim -82
|
||||
m1x softupperlim 49
|
||||
m1x home 0
|
||||
|
||||
# mc2: Slit system - 1 TOP Blade
|
||||
# Gearbox 55:1, pitch 0.5mm
|
||||
# Gearbox 55:1, pitch 0.5mm
|
||||
# Encoder 2p13
|
||||
set ss1u_Home 918407
|
||||
set ss1uSetRate [expr $motorrate*55.0/0.5]
|
||||
@ -333,10 +333,10 @@ ss1u softupperlim 37
|
||||
ss1u home 0
|
||||
|
||||
|
||||
# mc2: Slit system - 1 BOTTOM Blade
|
||||
# mc2: Slit system - 1 BOTTOM Blade
|
||||
# Gearbox 55:1, pitch 0.5mm
|
||||
# Encoder 2p13
|
||||
set ss1d_Home 1157895
|
||||
set ss1d_Home 1157895
|
||||
set ss1dSetRate [expr $motorrate*55.0/0.5]
|
||||
Motor ss1d $motor_driver_type [params \
|
||||
asyncqueue mc2\
|
||||
@ -354,7 +354,7 @@ Motor ss1d $motor_driver_type [params \
|
||||
absEncHome $ss1d_Home\
|
||||
cntsPerX 16384]
|
||||
ss1d speed 0.1
|
||||
ss1d part slits
|
||||
ss1d part slits
|
||||
ss1d long_name ss1d
|
||||
ss1d softlowerlim -37.8
|
||||
ss1d softupperlim 35
|
||||
@ -392,7 +392,7 @@ ss1l home 0
|
||||
# mc2: Slit system - 1 RIGHT Blade
|
||||
# Gearbox 55:1, pitch 0.5mm
|
||||
# Encoder 2p13
|
||||
set ss1r_Home 1656697
|
||||
set ss1r_Home 1656697
|
||||
set ss1rSetRate [expr $motorrate*55.0/0.5]
|
||||
Motor ss1r $motor_driver_type [params \
|
||||
asyncqueue mc2\
|
||||
@ -418,8 +418,8 @@ ss1r home 0
|
||||
|
||||
|
||||
# mc2: Sample Changer (Sample Stage) Z Translation
|
||||
# Gearbox 1:1
|
||||
#set samz_Home
|
||||
# Gearbox 1:1
|
||||
#set samz_Home
|
||||
#set samzSetRate 25000
|
||||
#Motor samz $motor_driver_type [params \
|
||||
asyncqueue mc2\
|
||||
@ -448,7 +448,7 @@ ss1r home 0
|
||||
# Motor Controller 3
|
||||
# Motor Controller 3
|
||||
############################
|
||||
#
|
||||
#
|
||||
|
||||
# mc3: Slit system - 2 TOP Blade
|
||||
# Gearbox 55:1, pitch 0.5mm
|
||||
@ -568,7 +568,7 @@ ss2r home 0
|
||||
|
||||
# mc3: CC2 Analyser Stage - Tilt
|
||||
# Gearbox 20:1, screw pitch 356
|
||||
# Encoder 2p17
|
||||
# Encoder 2p17
|
||||
# 68.681
|
||||
set m2chi_Home 15512615
|
||||
set m2chiSetRate [expr $motorrate*20*100/68.681]
|
||||
@ -598,7 +598,7 @@ m2chi home 0
|
||||
|
||||
# set m2om_Home 15776972
|
||||
# mc3: CC2 Analyser Stage - Rotation
|
||||
# Gearbox 100:1, screw pitch 356
|
||||
# Gearbox 100:1, screw pitch 356
|
||||
# Encoder 2p25
|
||||
set m2om_Home 23155978
|
||||
set m2omSetRate [expr $motorrate*100.0*356.0/360.0]
|
||||
@ -631,10 +631,10 @@ m2om Creep_Factor 0.5
|
||||
m2om Creep_Substep 0.04
|
||||
|
||||
|
||||
# mc3: CC2 Analyser Stage - X Translate
|
||||
# Gearbox 20:1, pitch 5mm
|
||||
# mc3: CC2 Analyser Stage - X Translate
|
||||
# Gearbox 20:1, pitch 5mm
|
||||
# Encoder 2p17
|
||||
set m2x_Home 524680153
|
||||
set m2x_Home 524680153
|
||||
set m2xSetRate [expr $motorrate*20.0/5.0]
|
||||
Motor m2x $motor_driver_type [params \
|
||||
asyncqueue mc3\
|
||||
@ -660,9 +660,9 @@ m2x home 0
|
||||
|
||||
|
||||
# mc3: CC2 Analyser Stage - Y Translation
|
||||
# Gearbox 20:1, pitch 5mm
|
||||
# Gearbox 20:1, pitch 5mm
|
||||
# Encoder 2p17
|
||||
set m2y_Home 516940434
|
||||
set m2y_Home 516940434
|
||||
set m2ySetRate [expr $motorrate*20.0/5.0]
|
||||
Motor m2y $motor_driver_type [params \
|
||||
asyncqueue mc3\
|
||||
|
@ -28,10 +28,10 @@ set 20sample_table {
|
||||
6 203.7
|
||||
7 161.7
|
||||
8 119.7
|
||||
9 77.7
|
||||
10 35.7
|
||||
11 -46.3
|
||||
12 -88.3
|
||||
9 77.7
|
||||
10 35.7
|
||||
11 -46.3
|
||||
12 -88.3
|
||||
13 -130.3
|
||||
14 -172.3
|
||||
15 -214.3
|
||||
|
@ -1,4 +1,4 @@
|
||||
# TODO Make readonly getset macro for AttFactor
|
||||
# TODO Make readonly getset macro for AttFactor
|
||||
|
||||
##
|
||||
# @file The velocity selector position is used as the reference for other instrument
|
||||
|
@ -1,5 +1,5 @@
|
||||
set sim_mode [SplitReply [plc_simulation]]
|
||||
if {$sim_mode == "false"} {
|
||||
if {$sim_mode == "false"} {
|
||||
# MakeAsyncQueue plc_chan SafetyPLC 137.157.204.79 31001
|
||||
# MakeSafetyPLC plc plc_chan 0
|
||||
}
|
||||
|
@ -13,17 +13,17 @@ proc filecounts_log {fname txt} {
|
||||
|
||||
proc thresholdscan {minVoltage maxVoltage stepVoltage minBMThreshold manBMThreshold stepBMThreshold scantime} {
|
||||
|
||||
# following is used to obtain an optimal BM threshold
|
||||
# following is used to obtain an optimal BM threshold
|
||||
set fileCounts ../log/bmcounts.log
|
||||
set fileCountsDiff ../log/bmcountsdiff.log
|
||||
|
||||
variable curCount
|
||||
|
||||
|
||||
set fd [open $fileCounts w]
|
||||
close $fd
|
||||
set fd [open $fileCountsDiff w]
|
||||
close $fd
|
||||
|
||||
|
||||
set txt ""
|
||||
for {set thres $minBMThreshold} {$thres <= $manBMThreshold} {incr thres $stepBMThreshold} {
|
||||
lappend txt $thres
|
||||
@ -51,8 +51,8 @@ proc thresholdscan {minVoltage maxVoltage stepVoltage minBMThreshold manBMThresh
|
||||
lappend diff [expr [lindex $curCount $ind]-[lindex $curCount [expr $ind-1]]]
|
||||
}
|
||||
set txt "$vol : $diff"
|
||||
filecounts_log $fileCountsDiff $txt
|
||||
|
||||
filecounts_log $fileCountsDiff $txt
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
# Author: Jing Chen (jgn@ansto.gov.au)
|
||||
|
||||
# Required by server_config.tcl
|
||||
# Required by server_config.tcl
|
||||
VarMake Instrument Text Internal
|
||||
Instrument kookaburra
|
||||
Instrument kookaburra
|
||||
Instrument lock
|
||||
|
||||
#START SERVER CONFIGURATION SECTION
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
|
||||
source $cfPath(anticollider)/anticollider_common.tcl
|
||||
source $cfPath(anticollider)/anticollider_common.tcl
|
||||
|
||||
# NOTE: This is called with a list of motorname target pairs
|
||||
proc ::anticollider::enable {args} {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user