Merge branch 'RELEASE-3_1' into RELEASE-3_2
Conflicts: sics/site_ansto/instrument/bilby/config/chopper/sct_astrium_chopper.tcl sics/site_ansto/instrument/hipd/wombat_configuration.tcl sics/site_ansto/instrument/pelican/pelican_configuration.tcl
This commit is contained in:
@@ -24,54 +24,18 @@ Instrument bare_dingo
|
||||
Instrument lock
|
||||
|
||||
#START SERVER CONFIGURATION SECTION
|
||||
source util/dmc2280/dmc2280_util.tcl
|
||||
source sics_ports.tcl
|
||||
|
||||
source server_config.tcl
|
||||
|
||||
set sicsroot ../
|
||||
source util/utility.tcl
|
||||
ServerOption LogFileBaseName $sicsroot/log/serverlog
|
||||
|
||||
###### installprotocolhandler
|
||||
|
||||
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 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
|
||||
|
||||
Motor dummy_motor asim [params \
|
||||
asyncqueue mc1\
|
||||
host mc1-dingo\
|
||||
port pmc1-dingo\
|
||||
axis A\
|
||||
units mm\
|
||||
hardlowerlim -500\
|
||||
hardupperlim 500\
|
||||
maxSpeed 1\
|
||||
maxAccel 5\
|
||||
maxDecel 5\
|
||||
stepsPerX [expr 25000.0/5.0]\
|
||||
absEnc 1\
|
||||
absEncHome 0\
|
||||
cntsPerX [expr 8192.0/5.0]]
|
||||
dummy_motor part instrument
|
||||
dummy_motor long_name dummy_motor
|
||||
dummy_motor softlowerlim -500
|
||||
dummy_motor softupperlim 500
|
||||
dummy_motor home 0
|
||||
|
||||
|
||||
MakeDrive
|
||||
#END SERVER CONFIGURATION SECTION
|
||||
|
||||
########################################
|
||||
# INSTRUMENT SPECIFIC CONFIGURATION
|
||||
fileeval $cfPath(source)/source.tcl
|
||||
fileeval $cfPath(plc)/plc.tcl
|
||||
fileeval $cfPath(motors)/motor_configuration.tcl
|
||||
|
||||
#MakeAsyncQueue cmserver CAMERA localhost 63300
|
||||
MakeAsyncQueue cmserver CAMERA [dict get $::CAMERA_HOSTPORT HOST] [dict get $::CAMERA_HOSTPORT PORT]
|
||||
#MakeAsyncQueue cmserver CAMERA 137.157.204.193 33000
|
||||
@@ -81,6 +45,7 @@ MakeAsyncQueue cmserver CAMERA [dict get $::CAMERA_HOSTPORT HOST] [dict get $::C
|
||||
MakeCounter cm1 anstocamera cmserver
|
||||
MakeScanCommand iscan cm1 dingo.hdd recover.bin
|
||||
foreach {n v} {
|
||||
debug 0
|
||||
clock 1
|
||||
bin 1
|
||||
size 2048
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
config/source/reactor_status_sct.tcl
|
||||
config/environment/
|
||||
config/environment/he3
|
||||
config/environment/magneticField
|
||||
config/environment/pressure
|
||||
config/environment/temperature
|
||||
config/source/source.tcl
|
||||
config/anticollider/anticollider_common.tcl
|
||||
config/plc/plc_common_1.tcl
|
||||
@@ -16,5 +20,8 @@ config/scan/scan_common_1.hdd
|
||||
config/scan/scan_common_1.tcl
|
||||
config/nexus/nxscripts_common_1.tcl
|
||||
config/commands/commands_common.tcl
|
||||
config/commands/pulser.tcl
|
||||
config/commands/hvcommands.tcl
|
||||
config/motors/sct_positmotor_common.tcl
|
||||
config/motors/sct_jogmotor_common.tcl
|
||||
config/motors/magnet_configuration.tcl
|
||||
|
||||
14
site_ansto/instrument/dingo/config/scan/dingo.hdd
Normal file
14
site_ansto/instrument/dingo/config/scan/dingo.hdd
Normal file
@@ -0,0 +1,14 @@
|
||||
*************************** DINGO Data File *******************************
|
||||
Title = !!VAR(Title)!!
|
||||
User = !!VAR(User)!!
|
||||
File Creation Startdate: !!DATE!!
|
||||
****************************************************************************
|
||||
Dummy dummy_motor = !!DRIV(dummy_motor)!!
|
||||
----------------------------------------------------------------------------
|
||||
Zero dummy_motor = !!ZERO(dummy_motor)!!
|
||||
----------------------------------------------------------------------------
|
||||
----------------------------------------------------------------------------
|
||||
Scan Zero:
|
||||
!!SCANZERO!!
|
||||
**************************** DATA ******************************************
|
||||
|
||||
@@ -1,154 +1,29 @@
|
||||
source $cfPath(scan)/scan_common_1.tcl
|
||||
proc ::scan::pre_hmm_scan_prepare {} {}
|
||||
namespace eval ::scan { }
|
||||
|
||||
proc scan_file { fname {description ""} } {
|
||||
set file_cmd "set file,path=D:\Data,basename=${fname},startnumber=1,imageformat=tif,experimentdetail=${description}"
|
||||
cmserver send $file_cmd
|
||||
}
|
||||
publish scan_file user
|
||||
|
||||
proc ::scan::cm_count {sobj uobj point mode preset} {
|
||||
# send "clear meta" command to the camera server
|
||||
clientput "sending clear meta"
|
||||
set cmd "clear meta\r\n"
|
||||
cm1 send $cmd
|
||||
# send motor position
|
||||
cm1_cmd clearmeta
|
||||
|
||||
foreach m "[sicslist type motor]" {
|
||||
if {$m == "motor" || $m == "dummy_motor"} {
|
||||
# skipit
|
||||
} else {
|
||||
set cmd "set camera, "
|
||||
append cmd "[$m]"
|
||||
append cmd "\r\n"
|
||||
cm1 send $cmd
|
||||
if {$m != "dummy_motor"} {
|
||||
cm1_cmd motor $m
|
||||
}
|
||||
}
|
||||
cm1 count $preset
|
||||
}
|
||||
|
||||
proc ::scan::cm_scan_prepare {sobj uobj} {
|
||||
|
||||
variable save_filetype
|
||||
variable check_instrument_ready
|
||||
variable force_scan
|
||||
|
||||
# [::plc::inst_ready]
|
||||
if {$force_scan || $check_instrument_ready} {
|
||||
set force_scan false
|
||||
if [catch {
|
||||
::scan::check_scanvar $sobj $uobj
|
||||
::scan::pre_hmm_scan_prepare
|
||||
}] {
|
||||
return -code error "ISCAN ABORTED: $::errorInfo"
|
||||
}
|
||||
|
||||
# send "shutter auto" command over
|
||||
shutter auto
|
||||
# send "focusflight off" command over
|
||||
focuslight off
|
||||
# send "clear meta" command to the camera server
|
||||
clientput "sending clear meta"
|
||||
set cmd "clear meta\r\n"
|
||||
cm1 send $cmd
|
||||
# send motor position
|
||||
foreach m "[sicslist type motor]" {
|
||||
if {$m == "motor" || $m == "dummy_motor"} {
|
||||
# skipit
|
||||
} else {
|
||||
set cmd "set camera, "
|
||||
append cmd "[$m]"
|
||||
append cmd "\r\n"
|
||||
cm1 send $cmd
|
||||
}
|
||||
}
|
||||
|
||||
if [catch {
|
||||
#TODO Parameterise varindex in some way
|
||||
set varindex 0;
|
||||
|
||||
set numpoints [SplitReply [$sobj np]]
|
||||
set vlist [split [$sobj getvarpar $varindex] = ]
|
||||
set scanstart [lindex $vlist 1]
|
||||
set scanstep [lindex $vlist 2]
|
||||
#::scan::camscan_cmd -set NP $numpoints
|
||||
#::scan::camscan_cmd -set scan_variable [string trim [lindex [split [lindex $vlist 0] . ] 1]];
|
||||
#::scan::camscan_cmd -set scan_start $scanstart
|
||||
#::scan::camscan_cmd -set scan_increment $scanstep
|
||||
set scanvar_pts [SplitReply [$sobj getvardata $varindex]]
|
||||
|
||||
#::scan::camscan_cmd -set feedback status BUSY
|
||||
clientput "run_mode camscan"
|
||||
run_mode "camscan"
|
||||
|
||||
#::nexus::newfile BEAM_MONITOR $save_filetype
|
||||
stdscan prepare $sobj $uobj;
|
||||
clientput "Scan start: $scanstart, Scan step: $scanstep, Number of points: $numpoints"
|
||||
}] {
|
||||
run_mode "normal"
|
||||
return -code error $::errorInfo
|
||||
}
|
||||
} else {
|
||||
return -code error "ISCAN ABORTED: Instrument not ready"
|
||||
}
|
||||
}
|
||||
|
||||
proc ::scan::cm_scan_collect {sobj uobj point} {
|
||||
set vlist [split [$sobj getvarpar 0] = ];
|
||||
|
||||
set w(NP) $point
|
||||
set sv [string trim [lindex [split [lindex $vlist 0] . ] 1]]
|
||||
set header [format "%-4.4s %-9.9s %-14s %-7.7s" NP $sv Counts Time]
|
||||
set varval [SplitReply [$sv]]
|
||||
set counts [SplitReply [::histogram_memory::total_counts]]
|
||||
set time [SplitReply [::histogram_memory::time]]
|
||||
set data [format "%-4d %-9.3f %-14d %-7.2f" $point $varval $counts $time]
|
||||
clientput $header
|
||||
clientput $data
|
||||
for {set bmn 1} {$bmn <= $::counter::isc_numchannels} {incr bmn} {
|
||||
set bmon bm$bmn
|
||||
clientput "Monitor $bmn [SplitReply [$bmon getcounts]]"
|
||||
}
|
||||
}
|
||||
|
||||
publish ::scan::cm_count user
|
||||
publish ::scan::cm_scan_prepare user
|
||||
publish ::scan::cm_scan_collect user
|
||||
|
||||
proc ::scan::isc_initialize {} {
|
||||
#::scan::ic_initialize
|
||||
|
||||
if [ catch {
|
||||
variable ic_runscanpar
|
||||
variable ic_hmm_datatype
|
||||
|
||||
set ic_hmm_datatype HISTOGRAM_XYT
|
||||
|
||||
MakeScanCommand camscan cm1 $::cfPath(scan)/scan_common_1.hdd recover.bin
|
||||
|
||||
camscan configure script
|
||||
#camscan function writeheader ::scan::donothing
|
||||
#camscan function writepoint ::scan:cm_writepoint
|
||||
camscan function count ::scan::cm_count
|
||||
#camscan function collect ::scan::cm_scan_collect
|
||||
camscan function prepare ::scan::cm_scan_prepare
|
||||
#camscan function finish ::scan::cm_scan_finish
|
||||
|
||||
# TODO Use ic_runscanpar to create the ::scan::runscan command and
|
||||
# to validate the "runscan" proc parameters.
|
||||
array set ic_runscanpar [subst {
|
||||
scanvar text=drivable
|
||||
start float
|
||||
stop float
|
||||
numpoints int=0,inf
|
||||
mode text=[join [concat [list time unlimited period count frame] $::counter::isc_beam_monitor_list ] , ]
|
||||
preset float=0,inf
|
||||
datatype text=[join [array names ::nexus::histmem_filetype_spec] , ]
|
||||
savetype text=save,nosave
|
||||
force boolean
|
||||
}]
|
||||
#scriptcallback connect hmscan SCANEND ::scan::hmscanend_event
|
||||
#scriptcallback connect bmonscan SCANEND ::scan::bmonscanend_event
|
||||
scriptcallback connect camscan SCANEND ::scan::cmscanend_event
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
}
|
||||
|
||||
MakeAsyncQueue cmserver CAMERA [dict get $::CAMERA_HOSTPORT HOST] [dict get $::CAMERA_HOSTPORT PORT]
|
||||
MakeCounter cm1 anstocamera cmserver
|
||||
foreach {n v} {
|
||||
debug 0
|
||||
clock 1
|
||||
bin 1
|
||||
size 2048
|
||||
@@ -158,12 +33,16 @@ proc ::scan::isc_initialize {} {
|
||||
ystart 1
|
||||
xend 2048
|
||||
yend 2048
|
||||
exposure 0.777
|
||||
temperature -50
|
||||
exposure 60
|
||||
temperature -80
|
||||
threshold 800
|
||||
shutteropentime 100
|
||||
shutterclosetime 200
|
||||
} {
|
||||
cm1 setpar $n 0 $v
|
||||
}
|
||||
|
||||
MakeScanCommand camscan cm1 $::cfPath(scan)/dingo.hdd recover.bin
|
||||
camscan configure script
|
||||
camscan function count ::scan::cm_count
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Author: Jing Chen (jgn@ansto.gov.au)
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
|
||||
# Required by server_config.tcl
|
||||
VarMake Instrument Text Internal
|
||||
Instrument dingo
|
||||
Instrument bare_dingo
|
||||
Instrument lock
|
||||
|
||||
#START SERVER CONFIGURATION SECTION
|
||||
@@ -14,46 +14,12 @@ MakeDrive
|
||||
|
||||
########################################
|
||||
# INSTRUMENT SPECIFIC CONFIGURATION
|
||||
|
||||
source $cfPath(hipadaba)/hipadaba_configuration.tcl
|
||||
|
||||
fileeval $cfPath(source)/source.tcl
|
||||
fileeval $cfPath(motors)/motor_configuration.tcl
|
||||
#fileeval $cfPath(motors)/positmotor_configuration.tcl
|
||||
#fileeval $cfPath(motors)/extraconfig.tcl
|
||||
fileeval $cfPath(plc)/plc.tcl
|
||||
fileeval $cfPath(counter)/counter.tcl
|
||||
fileeval $cfPath(hmm)/hmm_configuration.tcl
|
||||
fileeval $cfPath(nexus)/nxscripts.tcl
|
||||
fileeval $cfPath(motors)/motor_configuration.tcl
|
||||
fileeval $cfPath(scan)/scan.tcl
|
||||
fileeval $cfPath(commands)/commands.tcl
|
||||
fileeval $cfPath(commands)/pulser.tcl
|
||||
fileeval $cfPath(commands)/hvcommands.tcl
|
||||
fileeval $cfPath(anticollider)/anticollider.tcl
|
||||
|
||||
source gumxml.tcl
|
||||
|
||||
#::utility::mkVar ::anticollider::protect_detector text manager protect_detector false detector true false
|
||||
#::anticollider::protect_detector "true"
|
||||
|
||||
# fix all motors
|
||||
if {1} {
|
||||
set motorlist "[sicslist type motor]"
|
||||
puts $motorlist
|
||||
foreach m $motorlist {
|
||||
if {$m == "motor" || $m == "dummy_motor"} {
|
||||
# skipit
|
||||
} else {
|
||||
$m fixed 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
server_init
|
||||
|
||||
exe batchpath ../batch
|
||||
exe syspath ../batch
|
||||
clientput "serverport [get_portnum $::serverport]"
|
||||
|
||||
###########################################
|
||||
# WARNING: Do not add any code below server_init, if you do SICS may fail to initialise properly.
|
||||
|
||||
# You can add extra-configuration code in ../extraconfig.tcl
|
||||
|
||||
Reference in New Issue
Block a user