Пример #1
0
 def start_motion(self):
     self.acsdaqthread.start()
     nbuf = 19
     acsc.loadBuffer(self.hc, nbuf, self.acs_prg, 2048)
     acsc.enable(self.hc, 4)
     acsc.runBuffer(self.hc, nbuf)
     prgstate = acsc.getProgramState(self.hc, nbuf)
     while prgstate == 3:
         time.sleep(0.3)
         prgstate = acsc.getProgramState(self.hc, nbuf)
     self.acsdaqthread.stop()
     self.daqthread.clear()
     self.runfinished.emit()
Пример #2
0
 def start_motion(self):
     self.acsdaqthread.start()
     nbuf = 19
     acsc.loadBuffer(self.hc, nbuf, self.acs_prg, 2048)
     acsc.enable(self.hc, 4)
     acsc.runBuffer(self.hc, nbuf)
     prgstate = acsc.getProgramState(self.hc, nbuf)
     while prgstate == 3:
         time.sleep(0.3)
         prgstate = acsc.getProgramState(self.hc, nbuf)
     self.acsdaqthread.stop()
     self.daqthread.clear()
     self.runfinished.emit()
Пример #3
0
 def start_motion(self):
     self.acsdaqthread.start()
     nbuf = 19
     acsc.loadBuffer(self.hc, nbuf, self.acs_prg, 2048)
     acsc.enable(self.hc, 4)
     acsc.enable(self.hc, 5)
     acsc.runBuffer(self.hc, nbuf)
     prgstate = acsc.getProgramState(self.hc, nbuf)
     while prgstate == 3:
         time.sleep(0.3)
         prgstate = acsc.getProgramState(self.hc, nbuf)
     self.acsdaqthread.stop()
     if self.nidaq:
         self.daqthread.clear()
         print("NI tasks cleared")
     if self.fbg:
         self.fbgthread.stop()
     if self.vectrino:
         if self.settling:
             # Wait 10 minutes to measure tank settling time
             print("Waiting 10 minutes")
             t0 = time.time()
             dt = 0.0
             while not self.aborted and dt < 600:
                 time.sleep(0.5)
                 dt = time.time() - t0
         if self.recordvno:
             self.vec.stop_disk_recording()
         self.vec.stop()
         self.vec.disconnect()
     print("Tow finished")
     if self.vectrino:
         if self.vec.state == "Not connected":
             self.vecstatus = "Vectrino disconnected "
         print("Resetting Vectrino")
         self.reset_vec()
     self.towfinished.emit()
Пример #4
0
 def start_motion(self):
     self.acsdaqthread.start()
     nbuf = 19
     acsc.loadBuffer(self.hc, nbuf, self.acs_prg, 2048)
     acsc.enable(self.hc, 4)
     acsc.enable(self.hc, 5)
     acsc.runBuffer(self.hc, nbuf)
     prgstate = acsc.getProgramState(self.hc, nbuf)
     while prgstate == 3:
         time.sleep(0.3)
         prgstate = acsc.getProgramState(self.hc, nbuf)
     self.acsdaqthread.stop()
     if self.nidaq:
         self.daqthread.clear()
         print("NI tasks cleared")
     if self.fbg:
         self.fbgthread.stop()
     if self.vectrino:
         if self.settling:
             # Wait 10 minutes to measure tank settling time
             print("Waiting 10 minutes")
             t0 = time.time()
             dt = 0.0
             while not self.aborted and dt < 600:
                 time.sleep(0.5)
                 dt = time.time() - t0
         if self.recordvno:
             self.vec.stop_disk_recording()
         self.vec.stop()
         self.vec.disconnect()
     print("Tow finished")
     if self.vectrino:
         if self.vec.state == "Not connected":
             self.vecstatus = "Vectrino disconnected "
         print("Resetting Vectrino")
         self.reset_vec()
     self.towfinished.emit()