Пример #1
0
 def getPosition(self):
     if can_control.isInitialized():
         possteps = can_control.getMotorPos(self.mAxisID)
         
         # convert steps to pos in user units
         posval = self.convertStepsToPos(possteps)
         
         return posval
     else:
         print "Could not get motor position, CANBus is not intialized"
         return 0
Пример #2
0
    def getPosition(self):
        if can_control.isInitialized():
            possteps = can_control.getMotorPos(self.mAxisID)

            # convert steps to pos in user units
            posval = self.convertStepsToPos(possteps)

            return posval
        else:
            print "Could not get motor position, CANBus is not intialized"
            return 0
Пример #3
0
 def getPositionHex(self):
     if can_control.isInitialized():
         return "{0:08X}".format(can_control.getMotorPos(self.mAxisID))
     else:
         print "Could not get motor position, CANBus is not intialized"
         return 0
Пример #4
0
 def getPositionHex(self):
     if can_control.isInitialized():
         return "{0:08X}".format(can_control.getMotorPos(self.mAxisID))
     else:
         print "Could not get motor position, CANBus is not intialized"
         return 0