Merge branch 'merge-replace' of /home/ferdi/workspace/GIT/sicsdev_git into merge-replace

This commit is contained in:
Ferdi Franceschini
2013-04-20 18:57:53 +10:00
9 changed files with 102 additions and 55 deletions

View File

@@ -0,0 +1,39 @@
#!/usr//bin/env python
# vim: ts=8 sts=4 sw=4 expandtab
# Author: Douglas Clowes (dcl@ansto.gov.au) 2012-06-29
from twisted.internet import reactor
from twisted.python import log
from twisted.internet.task import LoopingCall
import argparse
import random
import re
import sys
import time
import inspect
from galilfactory import GalilFactory
def device_iterator():
now = time.time()
def main(**kwargs):
parser = argparse.ArgumentParser( description="Generates fake Galil controllers for testing SICS" )
parser.add_argument("instrument", help="The instrument name")
args = parser.parse_args()
basePort = {
'echidna': 62034, 'wombat': 62134, 'kowari': 62335, 'quokka': 62430, 'platypus': 62530,
'pelican': 62630, 'taipan': 62730, 'lyrebird': 62830, 'kookaburra': 62930
}
log.startLogging(sys.stdout)
devices = {}
for dev in range(0, 6):
port = basePort[args.instrument] + dev
controllerName = "mc%d" % (dev + 1)
factory = GalilFactory(port)
devices[controllerName] = factory.device
reactor.listenTCP(port, factory)
reactor.run()
if __name__ == '__main__':
main()

View File

@@ -13,8 +13,12 @@ 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/hvcommands.tcl
config/commands/pulser.tcl
config/motors/sct_positmotor_common.tcl
config/environment/sct_protek_common.tcl
config/environment/sct_mvp.tcl
config/environment/sct_syr.tcl
config/environment/temperature/sct_lakeshore_340.tcl
config/environment/temperature/sct_lakeshore_336.tcl
config/environment/temperature/sct_julabo_lh45.tcl

View File

@@ -9,14 +9,14 @@ fileeval $cfPath(beamline)/sct_RFGen.tcl
::scobj::rfgen::mkRFGen {
name "polarizer_flipper"
address 1
opCurr 50
opFreq 193
opCurr 51
opFreq 230
K1 0
K2 1
K3 1
IP 137.157.202.149
PORT 4001
tuning 1
tuning 0
interval 2
currtol 1
compCurr 1
@@ -27,14 +27,14 @@ fileeval $cfPath(beamline)/sct_RFGen.tcl
::scobj::rfgen::mkRFGen {
name "analyzer_flipper"
address 9
opCurr 45
opCurr 46
opFreq 198
K1 0
K2 0
K3 0
IP 137.157.202.149
PORT 4002
tuning 1
tuning 0
interval 2
currtol 1
compCurr 1

View File

@@ -73,6 +73,7 @@ proc ::exp_mode::omega_2theta { arg1 arg2 {s1vg 0} {s2vg 0} {s3vg 0} {s4vg 0}} {
if {![string is double $arg1] || ![string is double $arg2]} {
return -code error "omega and two theta should be a proper number"
}
statemon start om2th
if {[catch {
::exp_mode::set_omega $arg1
::exp_mode::set_two_theta $arg2
@@ -85,7 +86,7 @@ proc ::exp_mode::omega_2theta { arg1 arg2 {s1vg 0} {s2vg 0} {s3vg 0} {s4vg 0}} {
return -code error "ERROR: all the slit openings need to be numbers"
}
drive ss1u [expr 0.5 * $s1vg] ss1d [expr -0.5 * $s1vg] ss2u [expr 0.5 * $s2vg] ss2d [expr -0.5 * $s2vg] ss3u [expr 0.5 * $s3vg] ss3d [expr -0.5 * $s3vg] ss4u [expr 0.5 * $s4vg] ss4d [expr -0.5*$s4vg]
statemon stop om2th
return -code ok
}
}

View File

@@ -47,7 +47,7 @@ set sphi_home 7450470
set sx_home 8574000
set sy_home 7500000
set sz_home 8927484
set dy_home 8860668
set dy_home 8862120
set dz_home 7788617
#Measured or computed step rate for sz (Sample Raise)
@@ -384,8 +384,8 @@ Motor dy $motor_driver_type [params \
cntsPerX [expr -8192/10.0]]
dy part detector
dy long_name longitudinal_translation
dy softlowerlim 2436
dy softupperlim 3530
dy softlowerlim 0
dy softupperlim 1093
dy speed 2
dy home 0
dy precision 0.1
@@ -881,26 +881,26 @@ Motor analz $motor_driver_type [params \
axis F\
units mm\
hardlowerlim 0\
hardupperlim 1215\
hardupperlim 1607\
maxSpeed 1.5\
maxAccel 0.5\
maxDecel 0.5\
stepsPerX [expr 25000/0.25]\
stepsPerX [expr 55 * 25000.0/5.0]\
absEnc 1\
absEncHome 7983619\
cntsPerX [expr 8192./25.] ]
absEncHome 5842645.0\
cntsPerX -[expr 8192.0/5.0] ]
analz part polarizer
analz long_name z_translation
analz softlowerlim 0
analz softupperlim 1227
analz home 591.699
analz softupperlim 1607
analz home 0
analz backlash_offset -0.5
analz precision 0.004
analz speed 1
## Polarization Analyzer Rotation
set analtilt_lowerlim -12
set analtilt_upperlim 12
set analtilt_lowerlim -16
set analtilt_upperlim 16
Motor analtilt $motor_driver_type [params \
asyncqueue mc2\
axis D\
@@ -916,8 +916,8 @@ Motor analtilt $motor_driver_type [params \
cntsPerX -8192]
analtilt part polarizer
analtilt long_name rotation
analtilt softlowerlim $analtilt_lowerlim
analtilt softupperlim $analtilt_upperlim
analtilt softlowerlim -15.8
analtilt softupperlim 14.4
analtilt backlash_offset 0.5
analtilt precision 0.01
analtilt home 0

View File

@@ -1,6 +1,6 @@
set sim_mode [SplitReply [plc_simulation]]
if {$sim_mode == "false"} {
MakeAsyncQueue plc_chan SafetyPLC 137.157.204.79 30001
MakeAsyncQueue plc_chan SafetyPLC 137.157.211.22 31001
MakeSafetyPLC plc plc_chan 0
}

View File

@@ -25,6 +25,9 @@ fileeval $cfPath(motors)/positmotor_configuration.tcl
fileeval $cfPath(parameters)/parameters.tcl
fileeval $cfPath(plc)/plc.tcl
fileeval $cfPath(counter)/counter.tcl
fileeval $cfPath(environment)/sct_syr.tcl
fileeval $cfPath(environment)/sct_mvp.tcl
fileeval $cfPath(environment)/sct_protek_common.tcl
fileeval $cfPath(environment)/magneticField/sct_bruker_BEC1.tcl
fileeval $cfPath(environment)/temperature/sct_lakeshore_336.tcl
fileeval $cfPath(environment)/temperature/sct_lakeshore_340.tcl
@@ -37,16 +40,14 @@ fileeval $cfPath(chopper)/chopper.tcl
fileeval $cfPath(commands)/commands.tcl
fileeval $cfPath(anticollider)/anticollider.tcl
fileeval $cfPath(beamline)/polanal.tcl
fileeval $cfPath(commands)/pulser.tcl
fileeval $cfPath(commands)/hvcommands.tcl
source gumxml.tcl
::utility::mkVar ::anticollider::protect_detector text manager protect_detector false detector true false
::anticollider::protect_detector "true"
# Driver for Bruker BEC1 power supply (1-Tesla Magnet)
# driver short-name IP-address MoxaPort Tolerance(Amps)
#add_bruker_BEC1 ma1 137.157.202.152 4444 0.1
#add_sct_ls340 tc1 137.157.202.150 4001 "\r" 5.0 5.0
server_init
###########################################
# WARNING: Do not add any code below server_init, if you do SICS may fail to initialise properly.

View File

@@ -12,39 +12,39 @@ makesctcontroller sct_mc4 std mc4-quokka:$port4
# label pos
#index position
set 20sample_table {
20 453.7
19 411.7
18 369.7
17 327.7
16 285.7
15 203.7
14 161.7
13 119.7
12 77.7
11 35.7
10 -46.3
9 -88.3
8 -130.3
7 -172.3
6 -214.3
5 -296.3
4 -338.3
3 -380.3
2 -422.3
1 -464.3
1 453.7
2 411.7
3 369.7
4 327.7
5 285.7
6 203.7
7 161.7
8 119.7
9 77.7
10 35.7
11 -46.3
12 -88.3
13 -130.3
14 -172.3
15 -214.3
16 -296.3
17 -338.3
18 -380.3
19 -422.3
20 -464.3
}
set 10sample_table {
10 203.40042
9 161.40042
8 119.40042
7 77.40042
6 35.40042
5 -46.5996
4 -88.5996
3 -130.5996
2 -172.5996
1 -214.5996
1 203.40042
2 161.40042
3 119.40042
4 77.40042
5 35.40042
6 -46.5996
7 -88.5996
8 -130.5996
9 -172.5996
10 -214.5996
}
mkPosit sct_mc1 sampleNum float samx sample $20sample_table

View File

@@ -59,3 +59,5 @@ server_init
# 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
sicspoll intervall /instrument/detector/max_binrate 1
sicspoll intervall /instrument/detector/total_maprate 1