Esempio n. 1
0
 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"
Esempio n. 2
0
    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"
Esempio n. 3
0
 def resetErrors(self):
     can_control.resetErrors(self.mAxisID)
Esempio n. 4
0
 def resetErrors(self):
     can_control.resetErrors(self.mAxisID)