def test_seqdev(session): # Device move sm1 = session.getDevice('sm1') sd = SeqDev(sm1, 3) assert repr(sd) == 'sm1 -> 3.000' sm1.start(0) sm1.wait() assert sm1.read(0) == 0 sd.check() sd.run() while not sd.isCompleted(): pass assert sm1.read(0) == 3
def run(self): while self.dev.status(0)[0] == status.BUSY: # if still BUSY, stop first self.dev.stop() session.delay(0.3) self.dev.wait() session.delay(0.3) try: self.dev.wait() NicosSeqDev.run(self) except Exception: while True: # stop first self.dev.stop() session.delay(0.3) self.dev.wait() session.delay(0.3) if self.dev.status(0)[0] != status.BUSY: NicosSeqDev.run(self) break
def run(self): self.set_limit() SeqDev.run(self)