SICS-655 Update tasmots when driving axes.
SICS-512 Experimental anticollider for m2, s2 and a2
This commit is contained in:
@@ -33,7 +33,8 @@ fileeval $cfPath(scan)/scan.tcl
|
|||||||
fileeval $cfPath(commands)/commands.tcl
|
fileeval $cfPath(commands)/commands.tcl
|
||||||
fileeval $cfPath(commands)/pulser.tcl
|
fileeval $cfPath(commands)/pulser.tcl
|
||||||
fileeval $cfPath(commands)/hvcommands.tcl
|
fileeval $cfPath(commands)/hvcommands.tcl
|
||||||
fileeval $cfPath(anticollider)/anticollider.tcl
|
namespace eval anticollider { proc ::anticollider::init {} {} }
|
||||||
|
#fileeval $cfPath(anticollider)/anticollider.tcl
|
||||||
#fileeval $cfPath(tasmad)/taspub_sics/tasp.tcl
|
#fileeval $cfPath(tasmad)/taspub_sics/tasp.tcl
|
||||||
#fileeval $cfPath(tasmad)/taspub_sics/tasscript.tcl
|
#fileeval $cfPath(tasmad)/taspub_sics/tasscript.tcl
|
||||||
fileeval $cfPath(environment)/temperature/sct_eurotherm_2000.tcl
|
fileeval $cfPath(environment)/temperature/sct_eurotherm_2000.tcl
|
||||||
@@ -71,32 +72,62 @@ server_init
|
|||||||
# WARNING: Do not add any code below server_init, if you do SICS may fail to initialise properly.
|
# WARNING: Do not add any code below server_init, if you do SICS may fail to initialise properly.
|
||||||
|
|
||||||
# Provide tasmot notifications to GumTree when real motors move
|
# Provide tasmot notifications to GumTree when real motors move
|
||||||
hchain /sample/ei /instrument/crystal/m2
|
proc m2tasupdate {} {
|
||||||
hchain /sample/en /instrument/crystal/m2
|
tasub update
|
||||||
hchain /sample/ki /instrument/crystal/m2
|
hupdate /sample/ei
|
||||||
hchain /sample/qh /instrument/crystal/m2
|
hupdate /sample/en
|
||||||
hchain /sample/qk /instrument/crystal/m2
|
hupdate /sample/ki
|
||||||
hchain /sample/ql /instrument/crystal/m2
|
hupdate /sample/qh
|
||||||
hchain /sample/qm /instrument/crystal/m2
|
hupdate /sample/qk
|
||||||
|
hupdate /sample/ql
|
||||||
|
hupdate /sample/qm
|
||||||
|
}
|
||||||
|
publish m2tasupdate user
|
||||||
|
|
||||||
hchain /sample/qh /sample/s1
|
proc s1s2tasupdate {} {
|
||||||
hchain /sample/qk /sample/s1
|
tasub update
|
||||||
hchain /sample/ql /sample/s1
|
hupdate /sample/qh
|
||||||
hchain /sample/qm /sample/s1
|
hupdate /sample/qk
|
||||||
|
hupdate /sample/ql
|
||||||
|
hupdate /sample/qm
|
||||||
|
}
|
||||||
|
publish s1s2tasupdate user
|
||||||
|
|
||||||
hchain /sample/qh /sample/s2
|
proc a2tasupdate {} {
|
||||||
hchain /sample/qk /sample/s2
|
tasub update
|
||||||
hchain /sample/ql /sample/s2
|
hupdate /sample/ef
|
||||||
hchain /sample/qm /sample/s2
|
hupdate /sample/en
|
||||||
|
hupdate /sample/kf
|
||||||
|
hupdate /sample/qh
|
||||||
|
hupdate /sample/qk
|
||||||
|
hupdate /sample/ql
|
||||||
|
hupdate /sample/qm
|
||||||
|
}
|
||||||
|
publish a2tasupdate user
|
||||||
|
|
||||||
hchain /sample/ef /instrument/detector/a2
|
scriptcallback connect m2 MOTEND m2tasupdate
|
||||||
hchain /sample/en /instrument/detector/a2
|
scriptcallback connect s1 MOTEND s1s2tasupdate
|
||||||
hchain /sample/kf /instrument/detector/a2
|
scriptcallback connect s2 MOTEND s1s2tasupdate
|
||||||
hchain /sample/qh /instrument/detector/a2
|
scriptcallback connect a2 MOTEND a2tasupdate
|
||||||
hchain /sample/qk /instrument/detector/a2
|
|
||||||
hchain /sample/ql /instrument/detector/a2
|
|
||||||
hchain /sample/qm /instrument/detector/a2
|
|
||||||
|
|
||||||
|
set MY_INSTRUMENT_IS_BROKEN_AND_I_DIDNT_FIXIT false
|
||||||
|
if {$MY_INSTRUMENT_IS_BROKEN_AND_I_DIDNT_FIXIT} {
|
||||||
|
AntiCollisionInstall
|
||||||
|
anticollision register m2
|
||||||
|
anticollision register s2
|
||||||
|
anticollision register a2
|
||||||
|
array set tasacscript_levels {m2 0 s2 1 a2 2}
|
||||||
|
proc tasacscript {args} {
|
||||||
|
anticollision clear
|
||||||
|
array set targets $args
|
||||||
|
foreach {mot target} $args {
|
||||||
|
anticollision add $::tasacscript_levels($mot) $mot $targets($mot)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
publish tasacscript user
|
||||||
|
anticollision script tasacscript
|
||||||
|
}
|
||||||
# fix all motors
|
# fix all motors
|
||||||
if {0} {
|
if {0} {
|
||||||
foreach m [sicslist type motor] {
|
foreach m [sicslist type motor] {
|
||||||
|
|||||||
Reference in New Issue
Block a user