108 lines
2.8 KiB
Tcl
108 lines
2.8 KiB
Tcl
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
|
|
|
# @file This is a barebones SICS configuration file for testing the camera
|
|
# driver.
|
|
#
|
|
# Usage: You must first launch the simulated camera server and then runsics
|
|
# with this configuration.
|
|
# Eg
|
|
# cd TEST_SICS/fakeCameraServer
|
|
# ./SIM_DINGO_CAMSERVER.py
|
|
# Then launch SICS from the server directory as follows,
|
|
# ./runsics.py --dev -c camtest_configuration.tcl -t fakedev start
|
|
# You should then be able to run a scan as follows,
|
|
# iscan add dummy_motor 0 0.1
|
|
# iscan run 5 timer 3
|
|
#
|
|
# NOTE\n
|
|
# This configuration does not create a GumTree interface or let you
|
|
# save nexus data files.
|
|
|
|
# Required by server_config.tcl
|
|
VarMake Instrument Text Internal
|
|
Instrument bare_dingo
|
|
Instrument lock
|
|
|
|
#START SERVER CONFIGURATION SECTION
|
|
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
|
|
#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
|
|
#MakeAsyncQueue cmserver CAMERA 192.168.56.1 33000
|
|
#MakeAsyncQueue cmserver CAMERA 192.168.1.2 33000
|
|
#MakeAsyncQueue cmserver CAMERA localhost 33000
|
|
MakeCounter cm1 anstocamera cmserver
|
|
MakeScanCommand iscan cm1 dingo.hdd recover.bin
|
|
foreach {n v} {
|
|
clock 1
|
|
bin 1
|
|
size 2048
|
|
gain 1
|
|
flip 0
|
|
xstart 1
|
|
ystart 1
|
|
xend 2048
|
|
yend 2048
|
|
exposure 0.777
|
|
temperature -50
|
|
threshold 800
|
|
shutteropentime 100
|
|
shutterclosetime 200
|
|
} {
|
|
cm1 setpar $n 0 $v
|
|
}
|
|
## SCAN TEST EXAMPLE
|
|
# iscan add dummy_motor 0 0.1
|
|
# iscan run 5 timer 3
|
|
|
|
exe batchpath ../batch
|
|
exe syspath ../batch
|
|
clientput "serverport [get_portnum $::serverport]"
|