graduation-design/abandon_code/examples/ConveyorTrackRecord.py
2024-04-25 20:10:52 +08:00

19 lines
484 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from fairino import Robot
# 与机器人控制器建立连接,连接成功返回一个机器人对象
robot = Robot.RPC('192.168.58.2')
#传送带运动1-运动0-停止
status = 1
robot.ConveyorStartEnd(status)
#点记录
ret = robot.ConveyorPointIORecord()
print("记录IO检测点",ret)
ret = robot.ConveyorPointARecord()
print("记录A点",ret)
ret = robot.ConveyorRefPointRecord()
print("记录参考点",ret)
ret = robot.ConveyorPointBRecord()
print("记录B点",ret)