#%TITLE% DETCOVER.mac
#%NAME% %B%detcover.mac%B% - control the detector cove
#%END%
#%UU%
#%MDESC% Open the cover.
def detcoverout '{
wago_writech("detcov_ctrl",1)
while (wago_readch("detcov_out")==0) {
sleep(0.01)
}
}'
#%UU%
#%MDESC% Close the cove
def detcoverin '{
wago_writech("detcov_ctrl",0)
while (wago_readch("detcov_in")==0) {
sleep(0.01)
}
}'
#%UU%
#%MDESC% Open the cover when huct closed, close it when hutch open.
#Used by the hutchtrigger macro
def detcover '{
if (HUTCH_TRIGGER_STATUS == 1)
detcoverin
else
detcoverout
}'
#%MACROS%
#%IMACROS%
#%TOC%
#%AUTHOR% A.Beteva/BLISS
#$Revision: 1.1 $$Date: 2010/09/10 08:57:42 $
#%END%
#%LOG%
#$Log: detcover.mac,v $
#Revision 1.1 2010/09/10 08:57:42 beteva
#Initial revision
#
|