def setHardwareLimitSwitches(self, switch_reverse, switch_forward):
""" Set the Switch Configuration of the axis.
@param int switch_reverse: sets the switch in reverse movement
@param int switch_forward: sets the switch in forward movement
The following values are allowed:
0x01 or 1: Ignore switch or switch not present.
0x02 or 2: Switch makes on contact.
0x03 or 3: Switch breaks on contact.
0x04 or 4: Switch makes on contact - only used for homes (e.g. limit switched rotation stages).
0x05 or 5: Switch breaks on contact - only used for homes (e.g. limit switched rotations stages).
0x06 or 6: For PMD based brushless servo controllers only - uses index mark for homing.
"""
reverseLimitSwitch = c_long(switch_reverse)
forwardLimitSwitch = c_long(switch_forward)
self.aptdll.MOT_SetHWLimSwitches(self.SerialNum, reverseLimitSwitch, forwardLimitSwitch)
hardwareLimitSwitches = [reverseLimitSwitch.value, forwardLimitSwitch.value]
return hardwareLimitSwitches
评论列表
文章目录