def main(self): vf.all_off(optic) rampT = ezca['VIS-' + optic + '_SHUTDOWN_RAMPT'] self.timer['wait_for_ALLOFF'] = rampT while not (self.timer['wait_for_ALLOFF']): log('waiting for all outputs turned off') ezca['VIS-' + optic + '_MASTERSWITCH'] = 'OFF'
def main(self): global visObj checkvis( ) # check manually here rather than in watchdog_check decorator notify('PAY_TRIPPED state, main()') resetPayloadSafe(self) vf.vis_pay_watchdog_tripped(optic) if visObj.trippedWds() != []: notify("Please reset software WD and DACKILL") return (False) if visObj.trippedWds('TWR') != []: notify("Please reset TOWER DACKILL") return (False) if visObj.trippedWds('PAY') != []: notify("Please reset PAYLOAD DACKILL") return (False) if any([i in visObj.trippedBioWds() for i in TWR_BIO]): notify("Please reset TOWER BIO") return (False) if any([i in visObj.trippedBioWds() for i in PAY_BIO]): notify("Please reset PAYLOAD BIO") return (False) # if visObj.trippedBioWds()!=[]: # notify("Please reset coil driver WD in BIO") # return(False) return True
def main(self): log('Turning off all the filters') vf.all_off(optic) time.sleep(10) log('Turning off the master switch') ezca['VIS-'+optic+'_MASTERSWITCH'] = 'OFF' return True
def main(self): log('Turning off the master switch') vf.all_off(optic) self.timer['wait_for_ALLOFF'] = 10 while not (self.timer['wait_for_ALLOFF']): log('waiting for all outputs turned off') ezca['VIS-' + optic + '_MASTERSWITCH'] = 'OFF' return True
def main(self): vf.all_off(optic) rampT = ezca['VIS-' + optic + '_SHUTDOWN_RAMPT'] self.timer['wait_for_ALLOFF'] = rampT while not (self.timer['wait_for_ALLOFF']): log('waiting for all outputs turned off') ezca['VIS-' + optic + '_MASTERSWITCH'] = 'OFF' notify("please reset WatchDog!") #Send alerts sa.vis_watchdog_tripped(optic)
def main(self): self.counter = 1 self.TRAMP = ezca['VIS-' + optic + '_PAY' + '_SHUTDOWN_RAMPT'] # should look TWR too. self.timer['waiting'] = self.TRAMP self.counter = 1 #Send alerts vf.vis_watchdog_tripped(optic)
def main(self): log('Turning off all the filters') vf.all_off(optic) self.timer['wait_for_ALLOFF'] = 10 while not (self.timer['wait_for_ALLOFF']): log('waiting for all outputs turned off') log('Turning off the master switch') ezca['VIS-' + optic + '_MASTERSWITCH'] = 'OFF' subprocess.call([ 'burtrb', '-f', reqfile, '-o', snapfile, '-l', '/tmp/controls.read.log', '-v' ]) return True
def run(self): log('waiting for all outputs turned off') if vf.all_off(optic, self): ezca.switch('VIS-' + optic + '_TM_DAMP_P', 'FMALL', 'OFF') ezca.switch('VIS-' + optic + '_TM_DAMP_Y', 'FMALL', 'OFF') ezca.get_LIGOFilter('VIS-%s_TM_OPLEV_SERVO_PIT' % optic).ramp_gain( 0, 0, False) ezca.get_LIGOFilter('VIS-%s_TM_OPLEV_SERVO_YAW' % optic).ramp_gain( 0, 0, False) log('Turning off the master switch') ezca['VIS-' + optic + '_MASTERSWITCH'] = 'OFF' return not vf.is_tripped(optic, WD, BIO)
def main(self): self.TRAMP = 10 vf.im_offload_off(optic, self.TRAMP) log('Turning on the damping filters') vf.im_damp_off(optic) vf.bf_damp_off(optic) vf.gas_damp_off(optic) self.timer['waiting'] = 10
def main(self): log('Turning on the damping filters') vf.im_damp_off(optic) vf.bf_damp_off(optic) vf.gas_damp_off(optic) time.sleep(10) return True
def main(self): log('Turning off the damping filters') vf.im_damp_off(optic) vf.gas_damp_off(optic) vf.ip_damp_off(optic) time.sleep(10) # FIXME - use proper timer return True
def run(self): log('waiting for all outputs turned off') if vf.all_off(optic, self): ezca.switch('VIS-' + optic + '_TM_DAMP_P', 'FMALL', 'OFF') ezca.switch('VIS-' + optic + '_TM_DAMP_Y', 'FMALL', 'OFF') ezca.get_LIGOFilter('VIS-%s_TM_OPLEV_SERVO_PIT' % optic).ramp_gain( 0, 0, False) ezca.get_LIGOFilter('VIS-%s_TM_OPLEV_SERVO_YAW' % optic).ramp_gain( 0, 0, False) log('Turning off the master switch') ezca['VIS-' + optic + '_MASTERSWITCH'] = 'OFF' #subprocess.call(['burtrb', '-f', reqfile, '-o', snapfile, '-l','/tmp/controls.read.log', '-v']) return True
def main(self): notify("please restart WatchDog!") vf.vis_watchdog_tripped(optic)
def pre_exec(self): global vis checkvis() if vf.is_tripped(OPTIC,WD,BIO): # if vis.trippedWds()!=[] or is_tripped_BIO(BIO): return 'TRIPPED'
def main(self): vf.all_off(optic) ezca['VIS-' + optic + '_MASTERSWITCH'] = 'OFF' notify("please reset WatchDog!") sa.vis_watchdog_tripped(optic)
def pre_exec(self): if vf.is_tripped(optic, WD, BIO): return 'TRIPPED'
def main(self): log('Turning off the oplev controls') vf.tm_damp_off(optic) vf.im_oldamp_off(optic) self.timer['wait_for_OLLOOP_OFF'] = 10 return True
def pre_exec(self): #if vf.is_tripped(optic,WD,BIO): # 2018-03-12 had had "not"!; removed, Mark B. if vf.is_tripped2(optic,WD): # 2018-03-12 had had "not"!; removed, Mark B. return 'TRIPPED'
# initialization values # initial REQUEST state request = 'ALIGNED' # NOMINAL state, which determines when node is OK nominal = 'ALIGNED' ################################################## optic = 'SR3' WD = ['TM','IM','BF','F1','F0','IP'] BIO = ['TM','IM1','IM2','GAS','IP'] ochitsuke_sec = 20 # waiting time to stay at DAMPED in seconds # Tool for taking safe snapshot reqfile = vf.req_file_path(optic)+'/autoBurt.req' snapfile = '/opt/rtcds/userapps/release/vis/k1/burtfiles/'+vf.modelName(optic)+'_guardian_safe.snap' ################################################## # STATE decorators class watchdog_check(GuardStateDecorator): """Decorator to check watchdog""" def pre_exec(self): #if vf.is_tripped(optic,WD,BIO): # 2018-03-12 had had "not"!; removed, Mark B. if vf.is_tripped2(optic,WD): # 2018-03-12 had had "not"!; removed, Mark B. return 'TRIPPED' ################################################## class INIT(GuardState): index = 0 goto = True
def run(self): notify("please reset WatchDog!") #if not vf.is_tripped(optic,WD,BIO): if not vf.is_tripped2(optic,WD): return True
def main(self): log('Turning off the oplev controls') vf.tm_damp_off(optic) vf.im_oldamp_off(optic) time.sleep(10) return True
def run(self): if not vf.is_tripped(optic, WD, BIO): return True
def main(self): vf.all_off(optic) ezca['VIS-'+optic+'_MASTERSWITCH'] = 'OFF' notify("please reset WatchDog!") sa.vis_watchdog_tripped(optic) # 2018-03-13 getting annoying, Mark B.
def pre_exec(self): if vf.is_tripped(optic, WD, BIO): log("I_am_tripped.") #sa.sendmail("["+optic+"]Tripped",optic+" is tripped!") return 'TRIPPED'
def pre_exec(self): if vf.is_pretripped(optic): log("I_am_pre-tripped.") return 'PRE_TRIPPED'
def main(self): lib.pay_off(self, optic, oaOffFlag=False) notify("please restart WatchDog!") vf.vis_pay_watchdog_tripped(optic)