def set_home_parameter(self, home_dir, switch_dir, home_vel, zero_offset):
""" Set the home parameters.
@param int home_dir: direction to the home position,
1 = Move forward
2 = Move backward
@param int switch_dir: Direction of the switch limit:
4 = Use forward limit switch for home datum
1 = Use forward limit switch for home datum.
@param float home_vel = default velocity
@param float zero_offset: the distance or offset (in mm or degrees) of
the limit switch from the Home position.
"""
home_dir_c = c_long(home_dir)
switch_dir_c = c_long(switch_dir)
home_vel_c = c_float(home_vel)
zero_offset_c = c_float(zero_offset)
self.aptdll.MOT_SetHomeParams(self.SerialNum, home_dir_c, switch_dir_c,
home_vel_c, zero_offset_c)
return True
评论列表
文章目录