def moveImmediateSynchronous(self, newPos, newSpeed=None): possteps = self.convertPosToSteps(newPos) if newSpeed == None: newSpeed = self.mPosSpeed else: # convert from degs / second to incrs / 64 seconds newSpeed = int(newSpeed * self.mStepsPerUnit * 64) print newSpeed if can_control.isInitialized(): can_control.prepareMovement(self.mAxisID) can_control.resetErrors(self.mAxisID) can_control.setMotorPos(self.mAxisID,possteps,newSpeed) can_control.finishMovement(self.mAxisID) else: print "Could not move motors, CANBus is not intialized"
def moveImmediateSynchronous(self, newPos, newSpeed=None): possteps = self.convertPosToSteps(newPos) if newSpeed == None: newSpeed = self.mPosSpeed else: # convert from degs / second to incrs / 64 seconds newSpeed = int(newSpeed * self.mStepsPerUnit * 64) print newSpeed if can_control.isInitialized(): can_control.prepareMovement(self.mAxisID) can_control.resetErrors(self.mAxisID) can_control.setMotorPos(self.mAxisID, possteps, newSpeed) can_control.finishMovement(self.mAxisID) else: print "Could not move motors, CANBus is not intialized"
def resetErrors(self): can_control.resetErrors(self.mAxisID)