- Updated drivers for delta tau, dornier choppers
- Fixed scan mode issue in hdbutil.tcl - Added driver for the FOCUS Pfeiffer vacuum thing
This commit is contained in:
@@ -17,6 +17,19 @@
|
||||
# chopperlonglist must be aligned.
|
||||
#
|
||||
# Mark Koennecke, February 2009
|
||||
#
|
||||
# If something goes wrong with this, the following things ought
|
||||
# to be checked:
|
||||
# - Is the standard Tcl scan command been properly renamed to stscan?
|
||||
# - Is a communication possible with the chopper via telnet?
|
||||
# This may not be the case because of other SICS servers blocking
|
||||
# things or the old driver being active and capturing the terminal
|
||||
# server port in SerPortServer. Scriptcontext then fails silently.
|
||||
# But may be we will fix the latter.
|
||||
# - The other thing which happens is that the parameter list of
|
||||
# the chopper differs in little ways between instances.
|
||||
#
|
||||
# Mark Koennecke, April 2009
|
||||
#--------------------------------------------------------------
|
||||
MakeSICSObj choco AstriumChopper
|
||||
#-------------------------------------------------------------
|
||||
@@ -34,14 +47,14 @@ proc astriumchopperputerror {txt} {
|
||||
# separated by ;
|
||||
#---------------------------------------------------------------
|
||||
proc astriumsplitreply {chopper reply} {
|
||||
set parlist [split $reply ";"]
|
||||
set parlist [split [string trim $reply] ";"]
|
||||
foreach par $parlist {
|
||||
catch {stscan $par "%s %s" token val} count
|
||||
if {[string first ERROR $count] < 0 && $count == 2} {
|
||||
set val [string trim $val]
|
||||
set token [string trim $token]
|
||||
catch {hupdate /sics/choco/${chopper}/${token} $val}
|
||||
hdelprop /sics/choco/${chopper}/${token} geterror
|
||||
catch {hdelprop /sics/choco/${chopper}/${token} geterror}
|
||||
} else {
|
||||
#-------- special fix for dphas and averl
|
||||
if {[string first dphas $par] >= 0} {
|
||||
@@ -123,7 +136,7 @@ proc astriumMakeChopperParameters {} {
|
||||
hfactory /sics/choco/${chopper} plain spy none
|
||||
foreach par $chopperparlist {
|
||||
set path /sics/choco/${chopper}/${par}
|
||||
hfactory $path plain user text
|
||||
hfactory $path plain internal text
|
||||
chocosct connect $path
|
||||
}
|
||||
}
|
||||
@@ -131,9 +144,9 @@ proc astriumMakeChopperParameters {} {
|
||||
hsetprop /sics/choco/asyst read astchopread
|
||||
hsetprop /sics/choco/asyst astchoppar readastriumchopperpar
|
||||
hfactory /sics/choco/stop plain user int
|
||||
# chocosct poll /sics/choco/asyst 60
|
||||
chocosct poll /sics/choco/asyst 60
|
||||
#--------- This is for debugging
|
||||
chocosct poll /sics/choco/asyst 10
|
||||
# chocosct poll /sics/choco/asyst 10
|
||||
}
|
||||
#=================== write support ==============================
|
||||
proc astchopwrite {prefix} {
|
||||
@@ -201,6 +214,7 @@ proc astchopcheckspeed {chopper} {
|
||||
set p2 /sics/choco/${chopper}/aspee
|
||||
set tst [astchopcompare $p1 $p2 50]
|
||||
if {$tst == 1 } {
|
||||
wait 1
|
||||
return idle
|
||||
} else {
|
||||
return busy
|
||||
@@ -214,7 +228,8 @@ proc astchopcheckphase {chopper} {
|
||||
}
|
||||
chocosct queue /sics/choco/asyst progress read
|
||||
set p2 [hval /sics/choco/${chopper}/dphas]
|
||||
if {abs($p2) < .03} {
|
||||
if {abs($p2) < .03} {
|
||||
wait 1
|
||||
return idle
|
||||
} else {
|
||||
return busy
|
||||
@@ -222,23 +237,27 @@ proc astchopcheckphase {chopper} {
|
||||
}
|
||||
#---------------------------------------------------------------------
|
||||
proc astchopcheckratio {} {
|
||||
global choppers
|
||||
set stop [hval /sics/choco/stop]
|
||||
if {$stop == 1} {
|
||||
return fault
|
||||
}
|
||||
set ch1 [lindex $choppers 0]
|
||||
set ch2 [lindex $choppers 1]
|
||||
chocosct queue /sics/choco/asyst progress read
|
||||
set p1 [hval /sics/choco/chopper1/aspee]
|
||||
set p2 [hval /sics/choco/chopper2/aspee]
|
||||
set p1 [hval /sics/choco/${ch1}/aspee]
|
||||
set p2 [hval /sics/choco/${ch2}/aspee]
|
||||
set target [sct target]
|
||||
if {$p2 < 10} {
|
||||
return busy
|
||||
}
|
||||
if {abs($p1/$ps - $target*1.) < .3} {
|
||||
if {abs($p1/$p2 - $target*1.) < .3} {
|
||||
set tst 1
|
||||
} else {
|
||||
set tst 0
|
||||
}
|
||||
if {$tst == 1 } {
|
||||
wait 1
|
||||
return idle
|
||||
} else {
|
||||
return busy
|
||||
@@ -377,7 +396,7 @@ proc chosta {} {
|
||||
append line [format "%-20s " ""]
|
||||
set count 1
|
||||
foreach ch $choppers {
|
||||
append line [format "%-20s " "Chopper $count"]
|
||||
append line [format "%-20s " $ch]
|
||||
incr count
|
||||
}
|
||||
append result $line "\n"
|
||||
@@ -398,7 +417,9 @@ proc chosta {} {
|
||||
return $result
|
||||
}
|
||||
#======================= Configuration Section ==========================
|
||||
set amor 1
|
||||
set amor 0
|
||||
set poldi 1
|
||||
set focus 0
|
||||
|
||||
if {$amor == 1} {
|
||||
set choppers [list chopper1 chopper2]
|
||||
@@ -410,13 +431,63 @@ if {$amor == 1} {
|
||||
set chopperheader "AMOR Chopper Status"
|
||||
makesctcontroller chocosct std psts224:3014 "\r\n" 60
|
||||
# makesctcontroller chocosct std localhost:8080 "\r\n" 60
|
||||
chocosct debug 0
|
||||
chocosct debug -1
|
||||
set maxspeed 5000
|
||||
set minphase 0
|
||||
astriumMakeChopperParameters
|
||||
astMakeChopperSpeed1 chopperspeed
|
||||
# astMakeChopperRatio chratio
|
||||
astMakeChopperPhase2 chopper2phase
|
||||
Publish chosta Spy
|
||||
}
|
||||
|
||||
#----------------------------- POLDI -----------------------------------------
|
||||
if {$poldi == 1} {
|
||||
|
||||
proc poldiastchopphaselimit {} {
|
||||
set val [sct target]
|
||||
if {$val < 80 || $val > 100} {
|
||||
error "chopper phase out of range"
|
||||
}
|
||||
return OK
|
||||
}
|
||||
|
||||
set choppers [list chopper]
|
||||
set chopperparlist [list amode aspee nspee nphas dphas averl ratio vibra t_cho \
|
||||
flowr vakum valve sumsi spver state]
|
||||
set chopperlonglist [list "Chopper Mode" "Actual Speed" "Set Speed" "Phase" "Phase Error" \
|
||||
"Loss Current" Ratio Vibration Temperature "Water Flow" Vakuum \
|
||||
Valve Sumsi]
|
||||
set chopperheader "POLDI Chopper Status"
|
||||
makesctcontroller chocosct std psts240:3005 "\r\n" 60
|
||||
# makesctcontroller chocosct std localhost:8080 "\r\n" 60
|
||||
chocosct debug -1
|
||||
set maxspeed 15000
|
||||
set minphase 80
|
||||
astriumMakeChopperParameters
|
||||
astMakeChopperSpeed1 chopperspeed
|
||||
astMakeChopperPhase1 chopperphase
|
||||
hsetprop /sics/choco/chopper/phase checklimit poldiastchopphaselimit
|
||||
Publish chosta Spy
|
||||
}
|
||||
#----------------------------- FOCUS -----------------------------------------------------
|
||||
if {$focus == 1} {
|
||||
set choppers [list fermi disk]
|
||||
set chopperparlist [list state amode aspee nspee nphas dphas averl ratio vibra t_cho \
|
||||
durch vakum valve sumsi]
|
||||
set chopperlonglist [list "Chopper State" "Chopper Mode" "Actual Speed" "Set Speed" \
|
||||
"Phase" "Phase Error" \
|
||||
"Loss Current" Ratio Vibration Temperature "Water Flow" \
|
||||
Vakuum Valve Sumsi]
|
||||
set chopperheader "FOCUS Chopper Status"
|
||||
makesctcontroller chocosct std psts227:3008 "\r\n" 60
|
||||
# makesctcontroller chocosct std localhost:8080 "\r\n" 60
|
||||
chocosct debug 0
|
||||
set maxspeed 20000
|
||||
set minphase 0
|
||||
astriumMakeChopperParameters
|
||||
astMakeChopperSpeed1 fermispeed
|
||||
astMakeChopperSpeed2 diskspeed
|
||||
astMakeChopperRatio ratio
|
||||
astMakeChopperPhase2 phase
|
||||
Publish chosta Spy
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user