コード例 #1
0
ファイル: motor_axis.py プロジェクト: H-Y-S/diff_control
 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
ファイル: motor_axis.py プロジェクト: H-Y-S/diff_control
    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
ファイル: motor_axis.py プロジェクト: H-Y-S/diff_control
 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
ファイル: motor_axis.py プロジェクト: H-Y-S/diff_control
 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