PSI UPDATE

r2720 | ffr | 2008-10-13 15:40:07 +1100 (Mon, 13 Oct 2008) | 2 lines
This commit is contained in:
Ferdi Franceschini
2008-10-13 15:40:07 +11:00
committed by Douglas Clowes
183 changed files with 20455 additions and 3661 deletions

View File

@ -1,3 +1,3 @@
83
131
NEVER, EVER modify or delete this file
You'll risk eternal damnation and a reincarnation as a cockroach!|n

View File

@ -1,6 +1,10 @@
exe batchpath ./
exe syspath ./
lotte Wuergehals was here
#--- BEGIN (commands producing errors on last restore)
#--- END (commands producing errors on last restore)
lotte UNKNOWN
lotte setAccess 2
# Motor brumm
brumm sign 1.000000
@ -12,6 +16,8 @@ brumm InterruptMode 0.000000
brumm precision 0.010000
brumm ignorefault 0.000000
brumm AccessCode 2.000000
brumm failafter 3.000000
brumm maxretry 3.000000
brumm movecount 10.000000
# Motor miau
miau sign 1.000000
@ -23,9 +29,11 @@ miau InterruptMode 0.000000
miau precision 0.010000
miau ignorefault 0.000000
miau AccessCode 2.000000
miau failafter 3.000000
miau maxretry 3.000000
miau movecount 10.000000
# Counter aba
aba SetPreset 10.000000
aba SetPreset 1000.000000
aba SetMode Timer
# Counter hugo
hugo SetPreset 1000.000000
@ -46,6 +54,8 @@ a1 InterruptMode 0.000000
a1 precision 0.010000
a1 ignorefault 0.000000
a1 AccessCode 2.000000
a1 failafter 3.000000
a1 maxretry 3.000000
a1 movecount 10.000000
# Motor a2
a2 sign 1.000000
@ -57,6 +67,8 @@ a2 InterruptMode 0.000000
a2 precision 0.010000
a2 ignorefault 0.000000
a2 AccessCode 2.000000
a2 failafter 3.000000
a2 maxretry 3.000000
a2 movecount 10.000000
# Motor a3
a3 sign 1.000000
@ -68,6 +80,8 @@ a3 InterruptMode 0.000000
a3 precision 0.010000
a3 ignorefault 0.000000
a3 AccessCode 2.000000
a3 failafter 3.000000
a3 maxretry 3.000000
a3 movecount 10.000000
# Motor a4
a4 sign 1.000000
@ -79,6 +93,8 @@ a4 InterruptMode 0.000000
a4 precision 0.010000
a4 ignorefault 0.000000
a4 AccessCode 2.000000
a4 failafter 3.000000
a4 maxretry 3.000000
a4 movecount 10.000000
# Motor a5
a5 sign 1.000000
@ -90,6 +106,8 @@ a5 InterruptMode 0.000000
a5 precision 0.010000
a5 ignorefault 0.000000
a5 AccessCode 2.000000
a5 failafter 3.000000
a5 maxretry 3.000000
a5 movecount 10.000000
# Motor a6
a6 sign 1.000000
@ -101,6 +119,8 @@ a6 InterruptMode 0.000000
a6 precision 0.010000
a6 ignorefault 0.000000
a6 AccessCode 2.000000
a6 failafter 3.000000
a6 maxretry 3.000000
a6 movecount 10.000000
# Motor sgu
sgu sign 1.000000
@ -112,6 +132,8 @@ sgu InterruptMode 0.000000
sgu precision 0.010000
sgu ignorefault 0.000000
sgu AccessCode 2.000000
sgu failafter 3.000000
sgu maxretry 3.000000
sgu movecount 10.000000
# Motor sgl
sgl sign 1.000000
@ -123,6 +145,8 @@ sgl InterruptMode 0.000000
sgl precision 0.010000
sgl ignorefault 0.000000
sgl AccessCode 2.000000
sgl failafter 3.000000
sgl maxretry 3.000000
sgl movecount 10.000000
# Counter scancter
scancter SetPreset 0.000000
@ -131,33 +155,31 @@ hm CountMode timer
hm preset 10.000000
tof CountMode timer
tof preset 10.000000
tof genbin 500.000000 300.000000 20
tof genbin 10.000000 12.000000 100
tof init
#---- tasUB module tasub
tasub mono dd 3.354610
tasub mono dd 3.350000
tasub mono hb1 1.000000
tasub mono hb2 1.000000
tasub mono vb1 1.000000
tasub mono vb2 1.000000
tasub mono ss 1
tasub ana dd 3.354610
tasub ana dd 3.350000
tasub ana hb1 1.000000
tasub ana hb2 1.000000
tasub ana vb1 1.000000
tasub ana vb2 1.000000
tasub ana ss -1
tasub cell 9.950000 9.950000 22.240000 90.000000 90.000000 90.000000
tasub ana ss 1
tasub cell 1.000000 1.000000 1.000000 90.000000 90.000000 90.000000
tasub clear
tasub addref 1.00 0.00 0.00 168.27 -23.46 0.00 0.00 5.00 5.00
tasub addref 0.00 0.00 1.00 84.78 -10.44 0.00 0.00 5.00 5.00
tasub outofplane 1
tasub const kf
tasub ss -1
tasub setub -0.100503 -0.000000 -0.000000 0.000000 -0.000000 -0.044964 0.000000 -0.100503 -0.000000
tasub setnormal 0.000000 0.000000 1.000000
tasub settarget 1.200000 0.000000 1.000000 0.000000 1.553424 1.553424
tasub r1 1.00 0.00 0.00 168.27 -23.46 0.00 0.00 5.00 5.00
tasub r2 0.00 0.00 1.00 84.78 -10.44 0.00 0.00 5.00 5.00
tasub const ki
tasub ss 1
tasub setub 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000
tasub setnormal 0.000000 0.000000 0.000000
tasub settarget 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
tasub r1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
tasub r2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
tasub update
#----- MultiMotor sa
sa recovernampos noeff a3 24 a4 48
sa recovernampos noeff a3 24 a4 48

View File

@ -10,7 +10,7 @@ testint=/entry1,NXentry/SDS testint -type NX_INT32
testmot=/entry1,NXentry/SDS position
testmot_null=/entry1,NXentry/SDS position_zeropoint
testcter_preset=/entry1,NXentry/control,NXmonitor/SDS preset
testcter_mode=/entry1,NXentry/control,NXmonitor/SDS mode -type NX_CHAR
testcter_mode=/entry1,NXentry/control,NXmonitor/SDS mode -type NX_CHAR -dim {132}
testcter_time=/entry1,NXentry/control,NXmonitor/SDS time
testcter_00=/entry1,NXentry/control,NXmonitor/SDS counts0 -type NX_INT32
testcter_01=/entry1,NXentry/control,NXmonitor/SDS counts1 -type NX_INT32

View File

@ -38,8 +38,8 @@ ServerOption InterruptPort 2913
# Syntax: SicsUser name password userRightsCode
SicsUser Mugger Mugger 1
SicsUser User User 2
SicsUser Spy Spy 3
#SicsUser Spy 007 1
#SicsUser Spy Spy 3
SicsUser Spy 007 1
#----------------- SICS Variable
VarMake lotte Text User
@ -196,3 +196,318 @@ hattach /instrument/detector hm data
hattach /instrument lotte title
restore
#-------------------------------------------------
proc farmFormat {par num} {
hsetprop /sics/farm/$par lastError none
return [format "$par %d" [string trim $num]]
}
#-----------------------------------------------
proc farmRead {par } {
hsetprop /sics/farm/$par lastError none
hsetprop /sics/farm/$par replyCommand "farmReply $par"
return $par
}
#-----------------------------------------------
proc farmReply {par reply} {
set action [string trim [hgetpropval /sics/farm/$par status]]
hsetprop /sics/farm/$par status idle
if {[string first OK $reply] >= 0} {
if {[string first get $action] >= 0} {
set idx [string first : $reply]
if {$idx > 0} {
set val [string trim [string range $reply [expr $idx +1] end]]
hupdate /sics/farm/$par $val
}
} else {
hget /sics/farm/$par
}
} else {
if {[string first ERROR $reply] < 0} {
set reply "ERROR: $reply"
}
clientPut $reply
error $reply
}
}
#=============================================
proc schconset {val} {
set com [farmFormat schnegge $val]
hsetprop /sics/farm/schneggecon replyCommand schreply
return $com
}
#----------------------------------------------
proc schreply {reply} {
clientput "schreply $reply"
if {[string first OK $reply] >= 0} {
hsetprop /sics/farm/schneggerunning readCommand schrunget
hget /sics/farm/schneggerunning
hsetprop /sics/farm/schneggerunning readCommand \
"farmReply schneggerunning"
} else {
hsetprop /sics/farm/schneggecon status idle
hsetprop /sics/farm/schneggecon lastError $reply
clientput "ERROR: $reply on schnegge"
}
}
#-----------------------------------------------
proc schrun {reply} {
clientput "schrun $reply"
hsetprop /sics/farm/schneggerunning status idle
if {[string first OK $reply] >= 0} {
set idx [string first : $reply]
if {$idx > 0} {
set val [string trim [string range $reply [expr $idx +1] end]]
hupdate /sics/farm/schneggerunning $val
if {$val == 1} {
clientput "schnegge creeping"
hsetprop /sics/farm/schneggerunning readCommand schrunget
hget /sics/farm/schneggerunning
hsetprop /sics/farm/schneggerunning readCommand \
"farmReply schneggerunning"
} else {
clientput "schnegge finished"
hsetprop /sics/farm/schneggerunning readCommand \
"farmRead schneggerunning"
hsetprop /sics/farm/schneggecon status idle
}
}
} else {
clientput "schnegge has error: $reply"
hsetprop /sics/farm/schneggerunning readCommand \
"farmRead schneggerunning"
hsetprop /sics/farm/schneggecon status idle
hsetprop /sics/farm/schneggecon lastError $reply
hsetprop /sics/farm/schneggerunning lastError $reply
}
}
#----------------------------------------------
proc schget {} {
hsetprop /sics/farm/schneggecon lastError none
hsetprop /sics/farm/schneggecon replyCommand "farmReply schneggecon"
return schnegge
}
#----------------------------------------------
proc schrunget {} {
hsetprop /sics/farm/schneggerunning lastError none
hsetprop /sics/farm/schneggerunning replyCommand schrun
return schneggerunning
}
#-----------------------------------------------
set farm 0
if {$farm == 1} {
# Generic Controller
#-------------------------------------------------------------------
MakeAsyncProtocol norma
MakeAsyncQueue farmQueue norma localhost 9090
MakeGenController farm
genconfigure asynconnect farm farmQueue
#------------------------------------------------
genconfigure makepar farm hase int
hsetprop /sics/farm/hase priv user
hsetprop /sics/farm/hase writeCommand "farmFormat hase"
hsetprop /sics/farm/hase readCommand "farmRead hase"
hsetprop /sics/farm/hase replyCommand "farmReply hase"
genconfigure makepar farm schnegge int
hsetprop /sics/farm/schnegge priv user
hsetprop /sics/farm/schnegge writeCommand "farmFormat schnegge"
hsetprop /sics/farm/schnegge readCommand "farmRead schnegge"
hsetprop /sics/farm/schnegge replyCommand "farmReply schnegge"
genconfigure makepar farm schneggerunning int
hsetprop /sics/farm/schneggerunning priv internal
hsetprop /sics/farm/schneggerunning readCommand "farmRead schneggerunning"
hsetprop /sics/farm/schneggerunning replyCommand "farmReply schneggerunning"
genconfigure makepar farm schneggecon int
hsetprop /sics/farm/schneggecon priv user
hsetprop /sics/farm/schneggecon writeCommand schconset
hsetprop /sics/farm/schneggecon readCommand schget
hsetprop /sics/farm/schneggecon replyCommand schreply
}
set farm 0
if {$farm == 1} {
#-------------- Test new async protocol controller
makesctcontroller farmser std localhost:7070
MakeSICSObj farm TestObj
#---------------------------
proc farmparcom {par} {
sct send $par
return parread
}
#------------------------
proc farmparread {} {
set rply [sct result]
if {[string first ERR $rply] >= 0} {
sct geterror $rply
return idle
}
set data [string range $rply 3 end]
set node [sct]
sct update $data
return idle
}
#--------------------------
proc farmcheck {} {
set val [sct target]
if {$val < -100 || $val > 100} {
error "Value out of range"
}
return OK
}
#---------------------------
proc farmset {par} {
set val [sct target]
sct send "$par $val"
return setreply
}
#-------------------------
proc farmsetreply {} {
set rply [sct result]
if {[string first ERR $rply] >= 0} {
sct print $rply
}
return idle
}
#--------------------------
hfactory /sics/farm/hase plain spy int
hsetprop /sics/farm/hase read farmparcom hase
hsetprop /sics/farm/hase parread farmparread
hsetprop /sics/farm/hase check farmcheck
hsetprop /sics/farm/hase write farmset hase
hsetprop /sics/farm/hase setreply farmsetreply
farmser poll /sics/farm/hase
farmser write /sics/farm/hase
hfactory /sics/farm/hugo plain spy int
hsetprop /sics/farm/hugo read farmparcom hugo
hsetprop /sics/farm/hugo parread farmparread
hsetprop /sics/farm/hugo check farmcheck
hsetprop /sics/farm/hugo write farmset hugo
hsetprop /sics/farm/hugo setreply farmsetreply
farmser poll /sics/farm/hugo
farmser write /sics/farm/hugo
hfactory /sics/farm/schnegge plain spy float
hsetprop /sics/farm/schnegge read farmparcom schnegge
hsetprop /sics/farm/schnegge parread farmparread
hsetprop /sics/farm/schnegge check farmcheck
hsetprop /sics/farm/schnegge write farmset schnegge
hsetprop /sics/farm/schnegge setreply farmsetreply
farmser poll /sics/farm/schnegge
farmser write /sics/farm/schnegge
hfactory /sics/farm/schneggerunning plain spy int
hsetprop /sics/farm/schneggerunning read farmparcom schneggerunning
hsetprop /sics/farm/schneggerunning parread farmparread
farmser poll /sics/farm/schneggerunning
hfactory /sics/farm/stone plain spy int
hsetprop /sics/farm/stone read farmparcom stone
hsetprop /sics/farm/stone parread farmparread
#farmser poll /sics/farm/stone
farmser debug -1
#----------------- drivable scriptcontext adapter
proc schneggechecklimits {} {
return [farmcheck]
}
#-----------------------------
proc schneggestatus {} {
farmser queue /sics/farm/schneggerunning progress read
set status [sct writestatus]
switch $status {
commandsent {
set runtime [SICSValue "hgetprop /sics/farm/schneggerunning read_time"]
set starttime [sct write_time]
if {$runtime > $starttime} {
sct writestatus evalcheck
}
return busy
}
evalcheck {
set tst [hval /sics/farm/schneggerunning]
if {$tst == 1} {
return busy
} else {
return idle
}
}
default {
error "schneggestatus called in bad state $status"
}
}
}
#---------------------------------------------
hsetprop /sics/farm/schnegge checklimits schneggechecklimits
hsetprop /sics/farm/schnegge checkstatus schneggestatus
#makesctdrive schnecke /sics/farm/schnegge farmser
makesctdriveobj schnecke /sics/farm/schnegge DriveAdapter farmser
}
#---------- test http
set httptest 1
if {$httptest == 1} {
makesctcontroller amorhmsct sinqhttp amorhm data 180 spy 007
#makesctcontroller amorhmsct sinqhttp localhost:8080 data 60 spy 007
MakeSICSObj amorhm HttpTest
amorhmsct debug -1
#------------------
proc statget {} {
sct send "admin/textstatus.egi"
return statrepl
}
#-----------------
proc statreply {} {
sct update [sct result]
sct utime readtime
return idle
}
#-----------------
proc readcollapse {} {
sct send "admin/processhmdata.egi?bank=0&command=sum:2:0:400"
return colread
}
#-----------------
proc colreply {} {
sct utime readtime
set data [sct result]
return idle
}
#-------------------------
hfactory /sics/amorhm/status plain spy text
hsetprop /sics/amorhm/status read statget
hsetprop /sics/amorhm/status statrepl statreply
amorhmsct poll /sics/amorhm/status 10
hattach /sics/amorhm data intvarar collapse
hsetprop /sics/amorhm/collapse read readcollapse
hsetprop /sics/amorhm/collapse colread colreply
amorhmsct poll /sics/amorhm/collapse 20
}
#source sansdruck.tcl
#MakeRS232Controller sadu pc4639 4168
#MakeRS232Controller sadu localhost 4168
#sadu replyterminator 0x04
#sadu sendterminator 0x04
#sadu timeout 1000
#source ../sim/mars/julcho.tcl

View File

@ -18,41 +18,41 @@ source testutil.tcl
source sicstcldebug.tcl
#--------------- Test Miscellaneous stuff
#source testmisc.tcl
source testmisc.tcl
#-------------- Test for motors
#source mottest.tcl
source mottest.tcl
#-------------- Test Counter
set countername aba
set errorname aba
#source countertest.tcl
source countertest.tcl
#-------------- Test Multi Counter
set countername multi
#source countertest.tcl
source countertest.tcl
#-------------- Test batch processing
#source batchtest.tcl
source batchtest.tcl
#-------------- Test scans
#source scantest.tcl
source scantest.tcl
#------------ Test peak optimization
#source optitest.tcl
source optitest.tcl
#----------- test histogram memory
#source histtest.tcl
source histtest.tcl
#----------- test sics data
#source testsicsdata.tcl
source testsicsdata.tcl
#----------- test nxscript
source nxscripttest.tcl
#------------ test SANS MultiMotor
#source testmumo.tcl
source testmumo.tcl
#------------ print test summary
cleanupTests