def ClickMove(self,px,py,pz): self.new_thread = thread.ControlThread(self.setdevice) self.new_thread.operation_num = 3 self.new_thread.px = px self.new_thread.py = py self.new_thread.pz = pz self.new_thread.start()
def Zero(self,motor): self.new_thread = thread.ControlThread(self.setdevice) self.new_thread.operation_num = 5 if motor == "X": self.new_thread.motor = self.new_thread.laser_stage.Xaxis elif motor == "Y": self.new_thread.motor = self.new_thread.laser_stage.Yaxis elif motor == "Z": self.new_thread.motor = self.new_thread.laser_stage.Zaxis else: print("\n\n\nError!!!!!!!\n\n\n") self.new_thread.start()
def MoveStep(self,motor,direction,steps): self.new_thread = thread.ControlThread(self.setdevice) self.new_thread.operation_num = 4 self.new_thread.mv = direction*steps if motor == "X": self.new_thread.motor = self.new_thread.laser_stage.Xaxis elif motor == "Y": self.new_thread.motor = self.new_thread.laser_stage.Yaxis elif motor == "Z": self.new_thread.motor = self.new_thread.laser_stage.Zaxis else: print("\n\n\nError!!!!!!!\n\n\n") self.new_thread.start()
def SetSpeed(self): self.steps = numpy.empty(3, dtype=int) self.speed = numpy.empty(3, dtype=int) self.steps[0] = self.ui.Step_X.value() self.steps[1] = self.ui.Step_Y.value() self.steps[2] = self.ui.Step_Z.value() self.speed[0] = self.ui.Speed_X.value() self.speed[1] = self.ui.Speed_Y.value() self.speed[2] = self.ui.Speed_Z.value() self.new_thread = thread.ControlThread(self.setdevice) self.new_thread.operation_num = 6 self.new_thread.step = self.steps self.new_thread.speed = self.speed self.new_thread.start()
def SetSpeed(self,default): self.steps = numpy.empty(3,dtype=int) self.speed = numpy.empty(3,dtype=int) if default: self.steps = [0,0,0] self.speed = [1000,1000,1000] else: self.steps[0] = self.ui.Step_X.value() self.steps[1] = self.ui.Step_Y.value() self.steps[2] = self.ui.Step_Z.value() self.speed[0] = self.ui.Speed_X.value() self.speed[1] = self.ui.Speed_Y.value() self.speed[2] = self.ui.Speed_Z.value() self.new_thread = thread.ControlThread(self.setdevice) self.new_thread.operation_num = 6 self.new_thread.step = self.steps self.new_thread.speed = self.speed self.new_thread.start() self.new_thread.wait()
def Scan(self): self.new_thread = thread.ControlThread(self.setdevice) self.new_thread.operation_num = 5 self.new_thread.po = [ self.ui.x0.value(), self.ui.y0.value(), self.ui.z0.value() ] self.new_thread.dp = [ self.ui.dx.value(), self.ui.dy.value(), self.ui.dz.value() ] self.new_thread.Np = [ self.ui.Nx.value(), self.ui.Ny.value(), self.ui.Nz.value() ] self.new_thread.start()
def Stop(self): self.new_thread = thread.ControlThread(self.setdevice) self.new_thread.operation_num = 2 self.new_thread.start()