api接口说明 ============================ 标志位变量区 +++++++++++++++++++++++++++++++++++ +-------------------+----------+--------+------------------------------------------------------------------------------+ | 数据内容 | 数据类型 | 偏移量 | 说明 | +-------------------+----------+--------+------------------------------------------------------------------------------+ | heart_beat_flag | Bool | 0.0 | 通讯连接后,Max内部定期循环发送True-False-True-False (周期1s) | | | | | | | (心跳信号) | | | | +-------------------+----------+--------+------------------------------------------------------------------------------+ | max_ready_flag | Bool | 0.1 | Max端的Ready信号 | | | | | | | (Ready信号) | | | PLC发送命令前,需要查询此状态: | | | | | | | | | | - 为True,表示此时Max准备好接收来自plc的命令,plc可以发送命令请求信号。 | | | | | | | | | | - 为False,表示此时Max还未准备好接收来自plc的命令,plc不要发送命令请求信号。 | +-------------------+----------+--------+------------------------------------------------------------------------------+ | max_done_flag | Bool | 0.2 | Max端的命令执行完成信号 | | | | | | | (Done信号) | | | PLC发送命令请求信号后,需要查询此状态: | | | | | | | | | | - 为True,表示此时Max端已经执行完PLC发送的命令。 | | | | | | | | | | - 为False,表示此时Max端处于命令执行的busy状态。 | +-------------------+----------+--------+------------------------------------------------------------------------------+ | plc_request_flag | Bool | 0.3 | PLC端的命令请求信号 | | | | | | | (命令请求信号) | | | - 设置为True,表示触发命令。 | | | | | | | | | | - PLC需要根据时序要求,在Max命令执行完成后复位为False。 | +-------------------+----------+--------+------------------------------------------------------------------------------+ | 系统预留 | Byte | 1 | 请勿使用 | +-------------------+----------+--------+------------------------------------------------------------------------------+ PLC数据发送区 +++++++++++++++++++++++++++++++++++ .. table:: :widths: auto :class: longtable +----------------------+----------------------+---------------+------------------------------------------------------------+ | 数据内容 | 数据类型 | 偏移量 | 说明 | +----------------------+----------------------+---------------+------------------------------------------------------------+ | cmd | UInt | 2.0 | 指令码,支持切换工件、获取点位等。 | | | | | | | | | | 各指令详细信息见下文。 | +----------------------+----------------------+---------------+------------------------------------------------------------+ | token | UInt | 4.0 | 某些指令需要用到该值 | +----------------------+----------------------+---------------+------------------------------------------------------------+ | vs_id | UInt | 6.0 | 视觉服务id | +----------------------+----------------------+---------------+------------------------------------------------------------+ | tool_id | UInt | 8.0 | 工具id | +----------------------+----------------------+---------------+------------------------------------------------------------+ | task_codename | UInt | 10.0 | 任务代号 | +----------------------+----------------------+---------------+------------------------------------------------------------+ | item_codename | UInt | 12.0 | 工件代号 | +----------------------+----------------------+---------------+------------------------------------------------------------+ | vision_codename | UInt | 14.0 | 视觉命令代号 | +----------------------+----------------------+---------------+------------------------------------------------------------+ | 系统预留 | Array[0..41] of Byte | 16.0 ~57.0 | 请勿使用 | +------------+---------+----------------------+---------------+------------------------------------------------------------+ | cart_pose | x | DInt | 58.0 | 笛卡尔坐标值,默认是保留3位小数点 | +------------+---------+----------------------+---------------+ | | | y | DInt | 62.0 | - 即这里的x/y/z/a/b/c/d是(真实的浮点数 * 1000)后取整的值 | +------------+---------+----------------------+---------------+ | | | z | DInt | 66.0 | - 小数点位数可以在Max中进行设置 | +------------+---------+----------------------+---------------+ | | | a | DInt | 70.0 | - 如果姿态是欧拉角形式,则d没有用到,填0即可 | +------------+---------+----------------------+---------------+ | | | b | DInt | 74.0 | | +------------+---------+----------------------+---------------+ | | | c | DInt | 78.0 | | +------------+---------+----------------------+---------------+ | | | d | DInt | 82.0 | | +------------+---------+----------------------+---------------+------------------------------------------------------------+ | joints | j1 | DInt | 86.0 | 关节坐标值,默认是保留3位小数点 | | +---------+----------------------+---------------+ | | | j2 | DInt | 90.0 | - 即这里的j1~j6是(真实的浮点数 * 1000)后取整的值 | | +---------+----------------------+---------------+ | | | j3 | DInt | 94.0 | - 小数点位数可以在Max中进行设置 | | +---------+----------------------+---------------+ | | | j4 | DInt | 98.0 | | | +---------+----------------------+---------------+ | | | j5 | DInt | 102.0 | | | +---------+----------------------+---------------+ | | | j6 | DInt | 106.0 | | +------------+---------+----------------------+---------------+------------------------------------------------------------+ | usr_cmd_in | str_1 | Array[0..49] of Char | 110.0 | 用户指令(xyzUsrCmd)的5个字符串输入参数 | | +---------+----------------------+---------------+ | | | str_2 | Array[0..49] of Char | 160.0 | | | +---------+----------------------+---------------+ | | | str_3 | Array[0..49] of Char | 210.0 | | | +---------+----------------------+---------------+ | | | str_4 | Array[0..49] of Char | 260.0 | | | +---------+----------------------+---------------+ | | | str_5 | Array[0..49] of Char | 310.0 | | | +---------+----------------------+---------------+------------------------------------------------------------+ | | dint_1 | DInt | 360.0 | 用户指令(xyzUsrCmd)的10个DInt输入参数 | | +---------+----------------------+---------------+ | | | dint_2 | DInt | 364.0 | | | +---------+----------------------+---------------+ | | | dint_3 | DInt | 368.0 | | | +---------+----------------------+---------------+ | | | dint_4 | DInt | 372.0 | | | +---------+----------------------+---------------+ | | | dint_5 | DInt | 376.0 | | | +---------+----------------------+---------------+ | | | dint_6 | DInt | 380.0 | | | +---------+----------------------+---------------+ | | | dint_7 | DInt | 384.0 | | | +---------+----------------------+---------------+ | | | dint_8 | DInt | 388.0 | | | +---------+----------------------+---------------+ | | | dint_9 | DInt | 392.0 | | | +---------+----------------------+---------------+ | | | dint_10 | DInt | 396.0 | | | +---------+----------------------+---------------+------------------------------------------------------------+ | | Real_1 | Real | 400.0 | 用户指令(xyzUsrCmd)的10个Real输入参数 | | +---------+----------------------+---------------+ | | | Real_2 | Real | 404.0 | | | +---------+----------------------+---------------+ | | | Real_3 | Real | 408.0 | | | +---------+----------------------+---------------+ | | | Real_4 | Real | 412.0 | | | +---------+----------------------+---------------+ | | | Real_5 | Real | 416.0 | | | +---------+----------------------+---------------+ | | | Real_6 | Real | 420.0 | | | +---------+----------------------+---------------+ | | | Real_7 | Real | 424.0 | | | +---------+----------------------+---------------+ | | | Real_8 | Real | 428.0 | | | +---------+----------------------+---------------+ | | | Real_9 | Real | 432.0 | | | +---------+----------------------+---------------+ | | | Real_10 | Real | 436.0 | | +------------+---------+----------------------+---------------+------------------------------------------------------------+ | 系统预留 | Array[0..59] of Byte | 440.0 ~499.0 | 请勿使用 | +----------------------+----------------------+---------------+------------------------------------------------------------+ PLC数据接收区 +++++++++++++++++++++++++++++++++++ .. table:: :widths: auto :class: longtable +-------------------------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | 数据内容 | 数据类型 | 偏移量 | 说明 | +--------------+----------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | xyz_error | error | Bool | 500.0 | 是否错误。 | | | | | | | | | | | | True:有错误; False:无错误 | | +----------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | | 系统预留 | Byte | 501.0 | 请勿占用 | | +----------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | | error_code | DInt | 502.0 | 错误代码 | +--------------+----------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | token | UInt | 506.0 | 会用于某些指令的输入参数 | +-------------------------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | pose_num | UInt | 508.0 | 点位数量 | +-------------------------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | pipeline_num | UInt | 510.0 | 运动流程编号 | +-------------------------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | register_num | UInt | 512.0 | 抓取序号 | +-------------------------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | object_name | UInt | 514.0 | 物体名称 | +--------------+----------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | dint_value_6 | value_1 | DInt | 516.0 | 某些指令的输出参数,可在Max中自定义其含义 | | +----------------+--------------------------------------+-----------------+ | | | value_2 | DInt | 520.0 | | | +----------------+--------------------------------------+-----------------+ | | | value_3 | DInt | 524.0 | | | +----------------+--------------------------------------+-----------------+ | | | value_4 | DInt | 528.0 | | | +----------------+--------------------------------------+-----------------+ | | | value_5 | DInt | 532.0 | | | +----------------+--------------------------------------+-----------------+ | | | value_6 | DInt | 536.0 | | +--------------+----------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | 系统预留 | Array[0..59] of Byte | 540.0~599.0 | 请勿占用 | +--------------+----------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | cart_pose | x | DInt | 600.0 | 同上 | | +----------------+--------------------------------------+-----------------+ | | | y | DInt | 604.0 | | | +----------------+--------------------------------------+-----------------+ | | | z | DInt | 608.0 | | | +----------------+--------------------------------------+-----------------+ | | | a | DInt | 612.0 | | | +----------------+--------------------------------------+-----------------+ | | | b | DInt | 616.0 | | | +----------------+--------------------------------------+-----------------+ | | | c | DInt | 620.0 | | | +----------------+--------------------------------------+-----------------+ | | | d | DInt | 624.0 | | +--------------+----------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | joints | j1 | DInt | 628.0 | 同上 | | +----------------+--------------------------------------+-----------------+ | | | j2 | DInt | 632.0 | | | +----------------+--------------------------------------+-----------------+ | | | j3 | DInt | 636.0 | | | +----------------+--------------------------------------+-----------------+ | | | j4 | DInt | 640.0 | | | +----------------+--------------------------------------+-----------------+ | | | j5 | DInt | 644.0 | | | +----------------+--------------------------------------+-----------------+ | | | j6 | DInt | 648.0 | | +--------------+----------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | usr_cmd_out | str_1 | Array[0..49] of Char | 652.0 | 用户指令(xyzUsrCmd)的5个字符串输出参数 | | +----------------+--------------------------------------+-----------------+ | | | str_2 | Array[0..49] of Char | 702.0 | | | +----------------+--------------------------------------+-----------------+ | | | str_3 | Array[0..49] of Char | 752.0 | | | +----------------+--------------------------------------+-----------------+ | | | str_4 | Array[0..49] of Char | 802.0 | | | +----------------+--------------------------------------+-----------------+ | | | str_5 | Array[0..49] of Char | 852.0 | | | +----------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | | dint_1 | DInt | 902.0 | 用户指令(xyzUsrCmd)的10个DInt输出参数 | | +----------------+--------------------------------------+-----------------+ | | | dint_2 | DInt | 906.0 | | | +----------------+--------------------------------------+-----------------+ | | | dint_3 | DInt | 910.0 | | | +----------------+--------------------------------------+-----------------+ | | | dint_4 | DInt | 914.0 | | | +----------------+--------------------------------------+-----------------+ | | | dint_5 | DInt | 918.0 | | | +----------------+--------------------------------------+-----------------+ | | | dint_6 | DInt | 922.0 | | | +----------------+--------------------------------------+-----------------+ | | | dint_7 | DInt | 926.0 | | | +----------------+--------------------------------------+-----------------+ | | | dint_8 | DInt | 930.0 | | | +----------------+--------------------------------------+-----------------+ | | | dint_9 | DInt | 934.0 | | | +----------------+--------------------------------------+-----------------+ | | | dint_10 | DInt | 938.0 | | | +----------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | | Real_1 | Real | 942.0 | 用户指令(xyzUsrCmd)的10个Real输出参数 | | +----------------+--------------------------------------+-----------------+ | | | Real_2 | Real | 946.0 | | | +----------------+--------------------------------------+-----------------+ | | | Real_3 | Real | 950.0 | | | +----------------+--------------------------------------+-----------------+ | | | Real_4 | Real | 954.0 | | | +----------------+--------------------------------------+-----------------+ | | | Real_5 | Real | 958.0 | | | +----------------+--------------------------------------+-----------------+ | | | Real_6 | Real | 962.0 | | | +----------------+--------------------------------------+-----------------+ | | | Real_7 | Real | 966.0 | | | +----------------+--------------------------------------+-----------------+ | | | Real_8 | Real | 970.0 | | | +----------------+--------------------------------------+-----------------+ | | | Real_9 | Real | 974.0 | | | +----------------+--------------------------------------+-----------------+ | | | Real_10 | Real | 978.0 | | +--------------+----------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | Trajectory | Way_Point_Num | UInt | 982.0 | Way_Point_Num: 轨迹中的点位数量,一段轨迹最多支持20个点。 | | | | | | | | | | | | Way_Point_Type和Way_Points共同确定每个坐标点的运动类型和具体坐标值,顺序如下: | | | | | | | | | | | | --- | | | | | | | | | | | | 第1个点: | | | | | | | | | | | | Wap_Point_Type: 992.0 | | | | | | | | | | | | Way_Points: | | | | | | | | | | | | data1(DInt): 1012.0 | | | | | | | | +----------------+--------------------------------------+-----------------+ data2(DInt): 1016.0 | | | 系统预留 | Array[0..7] of Byte | 984.0 | | | | | | | data3(DInt): 1020.0 | | | | | | | | | | | | data4(DInt): 1024.0 | | | | | | | | | | | | data5(DInt): 1028.0 | | | | | | | | | | | | data6(DInt): 1032.0 | | | | | | | | | | | | --- | | | | | | | | | | | | 第2个点: | | | | | | | | +----------------+--------------------------------------+-----------------+ Way_Point_Type: 993.0 | | | Way_Point_Type | Array[0..19] of Byte | 992.0 | | | | | | | Way_Points: | | | | | | data1(DInt): 1036.0 | | | | | | | | | | | | data2(DInt): 1040.0 | | | | | | | | | | | | data3(DInt): 1044.0 | | | | | | | | | | | | data4(DInt): 1048.0 | | | | | | | | | | | | data5(DInt): 1052.0 | | | | | | | | | | | | data6(DInt): 1056.0 | | +----------------+--------------------------------------+-----------------+ | | | Way_Points | Array[0..19] of Struct | 1012.0 | | | | | | | 其他点位依次类推 | | | | 其中Struct类型是 Array[0..5] of DInt | | | | | | | | --- | | | | | | | | | | | | 其中Way_Point_Type取值复位和含义如下: | | | | | | | | | | | | - 11:moveJ(joints), 对应点位的6个值是joints。机器人需要用MoveJ方式执行该点位 | | | | | | | | | | | | - 12:moveL(joints),对应点位的6个值是joints。机器人需要用MoveL方式执行该点位 | | | | | | | | | | | | - 21:moveJ(cart_pose),对应点位的6个值是cart_pose(xyzabc)。机器人需要用MoveJ方式执行该点位 | | | | | | | | | | | | - 22:moveL(cart_pose),对应点位的6个值是cart_pose(xyzabc)。机器人需要用MoveL方式执行该点位 | | | | | | | +--------------+----------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ | 系统预留 | Array[0..107] of Byte | 1492.0 ~ 1599.0 | | +-------------------------------+--------------------------------------+-----------------+---------------------------------------------------------------------------------------------+ 支持的指令 +++++++++++++++++++++++++++++++++++ 每条指令涉及数据发送区和数据接收区。下列指令仅列出数据名称,具体数据偏移量请查阅上文地址表。 +-------------------------------------------------------------------------------------------+ | **心跳信号** | +-----------+-------------------------------------------------------------------------------+ | 功能描述 | 通信连接后,Max定期循环发送True-False-True-...到heart_beat_flag标志位,周期1s | +-----------+-------------------------------------------------------------------------------+ +------------------------------------------------------------------------+ | **切换任务(xyzSwitchTask)** | +---------------+--------------------------------------------------------+ | 功能描述 | 切换Max中的任务流图 | +---------------+----------------------+---------------------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+---------------------------------+ | PLC数据发送区 | cmd | 用户需要填 ``502`` | | +----------------------+---------------------------------+ | | task_codename | Max中的任务代号,后缀".t"不用填 | +---------------+----------------------+---------------------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+ | | | xyz_error:error_code | | +---------------+----------------------+---------------------------------+ +-----------------------------------------------------------+ | **切换工具(xyzSwitchTool)** | +---------------+-------------------------------------------+ | 功能描述 | | +---------------+----------------------+--------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+--------------------+ | PLC数据发送区 | cmd | 用户需要填 ``503`` | | +----------------------+--------------------+ | | tool_id | 工具id | +---------------+----------------------+--------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+ | | | xyz_error:error_code | | +---------------+----------------------+--------------------+ +-----------------------------------------------------------+ | **呼叫视觉命令(xyzCallVisionCmd)** | +---------------+-------------------------------------------+ | 功能描述 | | +---------------+----------------------+--------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+--------------------+ | PLC数据发送区 | cmd | 用户需要填 ``504`` | | +----------------------+--------------------+ | | vs_id | 视觉服务id | | +----------------------+--------------------+ | | vision_codename | 视觉命令代号 | +---------------+----------------------+--------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+ | | | xyz_error:error_code | | +---------------+----------------------+--------------------+ +------------------------------------------------------------------------------------------+ | **请求抓取目标点位(xyzReqGraspPose)** | +---------------+--------------------------------------------------------------------------+ | 功能描述 | 异步请求 抓取点的位姿 | +---------------+----------------------+---------------------------------------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+---------------------------------------------------+ | PLC数据发送区 | cmd | 用户需要填 ``507`` | | +----------------------+---------------------------------------------------+ | | vs_id | 视觉服务id | +---------------+----------------------+---------------------------------------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+---------------------------------------------------+ | | xyz_error:error_code | | | +----------------------+---------------------------------------------------+ | | token | 在执行"获取抓取目标点位(xyzGetGraspPose)"时使用到 | +---------------+----------------------+---------------------------------------------------+ +-----------------------------------------------------------------------------------------+ | **获取抓取目标点位(xyzGetGraspPose)** | +---------------+-------------------------------------------------------------------------+ | 功能描述 | 使用该指令前需先调用“请求抓取目标点位(xyzReqGraspPose)” | +---------------+----------------------+--------------------------------------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+--------------------------------------------------+ | PLC数据发送区 | cmd | 用户需要填 ``508`` | | +----------------------+--------------------------------------------------+ | | token | “请求抓取目标点位(xyzReqGraspPose)”中返回的token | +---------------+----------------------+--------------------------------------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+--------------------------------------------------+ | | xyz_error:error_code | | | +----------------------+--------------------------------------------------+ | | cart_pose | 抓取目标点的位姿数据 | | +----------------------+--------------------------------------------------+ | | pose_num | 当前可供抓取的点位数量 | | +----------------------+--------------------------------------------------+ | | pipeline_num | 运动流程编号 | | +----------------------+--------------------------------------------------+ | | register_num | 抓取序号 | | +----------------------+--------------------------------------------------+ | | dint_value_6 | 可在Max中中自定义含义 | +---------------+----------------------+--------------------------------------------------+ +----------------------------------------------------------------------------------+ | **请求物体位姿(xyzReqObjPose)** | +---------------+------------------------------------------------------------------+ | 功能描述 | 异步请求 物体位姿 | +---------------+----------------------+-------------------------------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+-------------------------------------------+ | PLC数据发送区 | cmd | 用户需要填 ``509`` | | +----------------------+-------------------------------------------+ | | vs_id | 视觉服务id | +---------------+----------------------+-------------------------------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+-------------------------------------------+ | | xyz_error:error_code | | | +----------------------+-------------------------------------------+ | | token | 在执行“获取物体位姿(xyzGetObjPose)”时用到 | +---------------+----------------------+-------------------------------------------+ +-----------------------------------------------------------------------------------+ | **获取物体位姿(xyzGetObjPose)** | +---------------+-------------------------------------------------------------------+ | 功能描述 | 使用该指令前需先调用“请求物体位姿(xyzReqObjPose)” | +---------------+----------------------+--------------------------------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+--------------------------------------------+ | PLC数据发送区 | cmd | 用户需要填 ``510`` | | +----------------------+--------------------------------------------+ | | token | “请求物体位姿(xyzReqObjPose)”中返回的token | +---------------+----------------------+--------------------------------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+--------------------------------------------+ | | xyz_error:error_code | | | +----------------------+--------------------------------------------+ | | cart_pose | 物体的位姿数据 | | +----------------------+--------------------------------------------+ | | pose_num | 当前物体位姿个数 | | +----------------------+--------------------------------------------+ | | object_name | 物体名称 | | +----------------------+--------------------------------------------+ | | dint_value_6 | 可在Max中中自定义含义 | +---------------+----------------------+--------------------------------------------+ +-----------------------------------------------------------+ | **重置任务(xyzResetTask)** | +---------------+-------------------------------------------+ | 功能描述 | 下位机在初始化时需要调用该指令 | +---------------+----------------------+--------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+--------------------+ | PLC数据发送区 | cmd | 用户需要填 ``511`` | +---------------+----------------------+--------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+--------------------+ | | xyz_error:error_code | | +---------------+----------------------+--------------------+ +----------------------------------------------------------------------------------+ | **发送机器人当前关节坐标(xyzSendCurrentJoints)** | +---------------+------------------------------------------------------------------+ | 功能描述 | | +---------------+----------------------+-------------------------------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+-------------------------------------------+ | PLC数据发送区 | cmd | 用户需要填 ``512`` | | +----------------------+-------------------------------------------+ | | joints | 机器人当前的角度信息。 | | | | | | | | 如果机器人轴数小于6轴,则需要对应位置补零 | +---------------+----------------------+-------------------------------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+-------------------------------------------+ | | xyz_error:error_code | | +---------------+----------------------+-------------------------------------------+ +----------------------------------------------------------------------------------------------+ | **发送机器人当前笛卡尔坐标(xyzSendCurrentCartPose)** | +---------------+------------------------------------------------------------------------------+ | 功能描述 | | +---------------+----------------------+-------------------------------------------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+-------------------------------------------------------+ | PLC数据发送区 | cmd | 用户需要填 ``513`` | | +----------------------+-------------------------------------------------------+ | | cart_pose | 机器人当前姿态数据 | | | | | | | | 如果机器人是欧拉角形式,则只需给a,b,c赋值,d赋值0即可 | +---------------+----------------------+-------------------------------------------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+-------------------------------------------------------+ | | xyz_error:error_code | | +---------------+----------------------+-------------------------------------------------------+ +---------------------------------------------------------------------------------+ | **发送机器人当前扩展轴坐标(xyzSendCurrentExtJoints)** | +---------------+-----------------------------------------------------------------+ | 功能描述 | | +---------------+----------------------+------------------------------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+------------------------------------------+ | PLC数据发送区 | cmd | 用户需要填 ``514`` | | +----------------------+------------------------------------------+ | | joints | 机器人当前扩展轴的角度信息 | | | | | | | | 如果扩展轴数不足6的,需要补零后发送六个数 | +---------------+----------------------+------------------------------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+------------------------------------------+ | | xyz_error:error_code | | +---------------+----------------------+------------------------------------------+ +-----------------------------------------------------------+ | **请求抓放规划(xyzReqPickPlace)** | +---------------+-------------------------------------------+ | 功能描述 | | +---------------+----------------------+--------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+--------------------+ | PLC数据发送区 | cmd | 用户需要填 ``517`` | | +----------------------+--------------------+ | | vs_id | 视觉服务id | +---------------+----------------------+--------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+--------------------+ | | xyz_error:error_code | | +---------------+----------------------+--------------------+ +-----------------------------------------------------------+ | **获取取料入框轨迹(xyzGetPickin)** | +---------------+-------------------------------------------+ | 功能描述 | | +---------------+----------------------+--------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+--------------------+ | PLC数据发送区 | cmd | 用户需要填 ``518`` | | +----------------------+--------------------+ | | vs_id | 视觉服务id | +---------------+----------------------+--------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+--------------------+ | | xyz_error:error_code | | | +----------------------+--------------------+ | | pipeline_num | 运动流程编号 | | +----------------------+--------------------+ | | register_num | 抓取序号 | | +----------------------+--------------------+ | | Trajectory | 轨迹 | +---------------+----------------------+--------------------+ +-----------------------------------------------------------+ | **获取取料出框轨迹(xyzGetPickout)** | +---------------+-------------------------------------------+ | 功能描述 | | +---------------+----------------------+--------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+--------------------+ | PLC数据发送区 | cmd | 用户需要填 ``519`` | | +----------------------+--------------------+ | | vs_id | 视觉服务id | +---------------+----------------------+--------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+--------------------+ | | xyz_error:error_code | | | +----------------------+--------------------+ | | pipeline_num | 运动流程编号 | | +----------------------+--------------------+ | | register_num | 抓取序号 | | +----------------------+--------------------+ | | Trajectory | 轨迹 | +---------------+----------------------+--------------------+ +-----------------------------------------------------------+ | **获取放料入框轨迹(xyzGetPlacein)** | +---------------+-------------------------------------------+ | 功能描述 | | +---------------+----------------------+--------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+--------------------+ | PLC数据发送区 | cmd | 用户需要填 ``520`` | | +----------------------+--------------------+ | | vs_id | 视觉服务id | +---------------+----------------------+--------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+--------------------+ | | xyz_error:error_code | | | +----------------------+--------------------+ | | pipeline_num | 运动流程编号 | | +----------------------+--------------------+ | | register_num | 抓取序号 | | +----------------------+--------------------+ | | Trajectory | 轨迹 | +---------------+----------------------+--------------------+ +-----------------------------------------------------------+ | **获取放料出框轨迹(xyzGetPlaceout)** | +---------------+-------------------------------------------+ | 功能描述 | | +---------------+----------------------+--------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+--------------------+ | PLC数据发送区 | cmd | 用户需要填 ``521`` | | +----------------------+--------------------+ | | vs_id | 视觉服务id | +---------------+----------------------+--------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+--------------------+ | | xyz_error:error_code | | | +----------------------+--------------------+ | | pipeline_num | 运动流程编号 | | +----------------------+--------------------+ | | register_num | 抓取序号 | | +----------------------+--------------------+ | | Trajectory | 轨迹 | +---------------+----------------------+--------------------+ +-----------------------------------------------------------+ | **料箱重定位(xyzUpdateTotePose)** | +---------------+-------------------------------------------+ | 功能描述 | | +---------------+----------------------+--------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+--------------------+ | PLC数据发送区 | cmd | 用户需要填 ``523`` | | +----------------------+--------------------+ | | vs_id | 视觉服务id | +---------------+----------------------+--------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+--------------------+ | | xyz_error:error_code | | +---------------+----------------------+--------------------+ +-----------------------------------------------------------+ | **工件在手上的二次定位(xyzUpdateObjPoseInHand)** | +---------------+-------------------------------------------+ | 功能描述 | | +---------------+----------------------+--------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+--------------------+ | PLC数据发送区 | cmd | 用户需要填 ``524`` | +---------------+----------------------+--------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+--------------------+ | | xyz_error:error_code | | | +----------------------+--------------------+ | | cart_pose | 放置位姿数据 | +---------------+----------------------+--------------------+ +-----------------------------------------------------------+ | **切换工件(xyzSwitchItem)** | +---------------+-------------------------------------------+ | 功能描述 | | +---------------+----------------------+--------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+--------------------+ | PLC数据发送区 | cmd | 用户需要填 ``528`` | | +----------------------+--------------------+ | | vs_id | 视觉服务id | | +----------------------+--------------------+ | | item_codename | 工件代号 | +---------------+----------------------+--------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+--------------------+ | | xyz_error:error_code | | +---------------+----------------------+--------------------+ +---------------------------------------------------------------+ | **计算抓取目标点位(xyzCalculateGraspPose)** | +---------------+-----------------------------------------------+ | 功能描述 | 该指令等价于xyzReqGraspPose + xyzGetGraspPose | +---------------+----------------------+------------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+------------------------+ | PLC数据发送区 | cmd | 用户需要填 ``529`` | | +----------------------+------------------------+ | | vs_id | 视觉服务id | +---------------+----------------------+------------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+------------------------+ | | xyz_error:error_code | | | +----------------------+------------------------+ | | cart_pose | 抓取目标点的位姿数据 | | +----------------------+------------------------+ | | pose_num | 当前可供抓取的点位数量 | | +----------------------+------------------------+ | | pipeline_num | 运动流程编号 | | +----------------------+------------------------+ | | register_num | 抓取序号 | | +----------------------+------------------------+ | | dint_value_6 | 可在Max中中自定义含义 | +---------------+----------------------+------------------------+ +--------------------------------------------------------------+ | **计算物体位姿(xyzCalculateObjectPose)** | +---------------+----------------------------------------------+ | 功能描述 | 该指令等价于xyzReqObjPose+xyzGetObjPose | +---------------+----------------------+-----------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+----------------------+-----------------------+ | PLC数据发送区 | cmd | 用户需要填 ``530`` | | +----------------------+-----------------------+ | | vs_id | 视觉服务id | +---------------+----------------------+-----------------------+ | PLC数据接收区 | xyz_error:error | | | +----------------------+-----------------------+ | | xyz_error:error_code | | | +----------------------+-----------------------+ | | cart_pose | 物体的位姿数据 | | +----------------------+-----------------------+ | | pose_num | 当前物体位姿个数 | | +----------------------+-----------------------+ | | object_name | 物体名称 | | +----------------------+-----------------------+ | | dint_value_6 | 可在Max中中自定义含义 | +---------------+----------------------+-----------------------+ +----------------------------------------------------------------------------+ | **用户指令(xyzUsrCmd)** | +---------------+------------------------------------------------------------+ | 功能描述 | 用于基础指令不支持的情况下,配合任务流图完成用户特定功能。 | | | 各个参数的含义取决于任务流图中设定的输入输出 | +---------------+-------------------------------+----------------------------+ | 相关参数 | 数据内容 | 说明 | +---------------+-------------------------------+----------------------------+ | PLC数据发送区 | cmd | 用户需要填 ``600`` | | +-------------------------------+----------------------------+ | | usr_cmd_in | 自定义输入参数 | +---------------+-------------------------------+----------------------------+ | PLC数据接收区 | xyz_error:error | | | +-------------------------------+----------------------------+ | | xyz_error:error_code | | | +-------------------------------+----------------------------+ | | usr_cmd_out | 自定义输出参数 | +---------------+-------------------------------+----------------------------+