def run_mr(args): connect(args) tune_up_mt(args) if args.force_wr_reset >= 2: print("Tune up and Quit DONE") return shot_controller = acq400_hapi.ShotControllerWithDataHandler(args.uuts, args) if args.zombie_timeout != 0: shot_controller.zombie_timeout = args.zombie_timeout if args.set_arm != 0: tee_up(args) run_shot(args, shot_controller) else: shot_controller.handle_data(args) post_shot_checks(args) if args.get_epics4: run_epics_offload(args) if args.get_mdsplus: run_mdsplus_offload(args) print("FINISHED {} uuts".format(len(args.uuts)))
def upload(args): uuts = [acq400_hapi.Acq400(u) for u in args.uuts] [acq400_hapi.Acq400UI.exec_args(uut, args) for uut in uuts] st = None acq400_hapi.cleanup.init() shot_controller = acq400_hapi.ShotControllerWithDataHandler(uuts, args) if args.wrtd_tx != 0: trigger_action = WrtdAction(uuts[0], args.wrtd_tx) for u in uuts: print("si5326_tune_phase on {}, this may take 30s".format(u.uut)) u.s0.si5326_tune_phase = 1 elif args.remote_trigger: trigger_action = ActionScript(args.remote_trigger) else: trigger_action = None st = SOFT_TRIGGER try: if args.capture == 0: state = '99' while state != '0': state = uuts[0].s0.state.split()[0] print("state:{}".format(state)) if state == '1': if trigger_action: trigger_action() elif st: uut.s0.soft_trigger = '1' time.sleep(1) shot_controller.handle_data(args) else: set_shot(args, uuts) cap = 0 while cap < args.capture: shot_controller.run_shot(soft_trigger=st, remote_trigger=trigger_action) cap += 1 if args.capture == -1: shot_controller.handle_data(args) except acq400_hapi.cleanup.ExitCommand: print("ExitCommand raised and caught") finally: print("Finally, going down")
def run_mr(args): args.uuts = [ acq400_hapi.Acq2106(u, has_comms=False, has_wr=True) for u in args.uut ] tune_up_mt(args) shot_controller = acq400_hapi.ShotControllerWithDataHandler( args.uuts, args) if args.set_arm != 0: tee_up(args) shot_controller.run_shot(remote_trigger=args.rt) else: shot_controller.handle_data(args) if args.get_epics4: run_postprocess_command(args.get_epics4, args.uut) if args.get_mdsplus: run_postprocess_command(args.get_mdsplus, args.uut)
def run_mr(args): args.uuts = [ acq400_hapi.Acq2106(u, has_comms=False, has_wr=True) for u in args.uut ] tune_up_mt(args) shot_controller = acq400_hapi.ShotControllerWithDataHandler( args.uuts, args) if args.set_arm != 0: tee_up(args) run_shot(args, shot_controller) else: shot_controller.handle_data(args) post_shot_checks(args) if args.get_epics4: run_epics_offload(args) if args.get_mdsplus: run_mdsplus_offload(args)