def get_status(self):
""" Get the status bits of the current axis.
@return tuple(int, dict): the current status as an integer and the
dictionary explaining the current status.
"""
status_bits = c_long()
self.aptdll.MOT_GetStatusBits(self.SerialNum, pointer(status_bits))
# Check at least whether magnet is moving:
if self._test_bit(status_bits.value, 4):
return 1, self._create_status_dict()
elif self._test_bit(status_bits.value, 5):
return 2, self._create_status_dict()
else:
return 0, self._create_status_dict()
评论列表
文章目录