Skip to content

远程程序设置

远程模式连接状态

查询 Modbus、外部 IO 连接状态

命令字: 0x5032 REMOTE_CONNECT_INQUIRE

请求包体:

json
{}

返回连接状态

命令字: 0x5033 REMOTE_CONNECT_RESPOND

参数类型描述
ModbusConnectboolModbus 连接状态:false 未连接,true 已连接
ExternIOConnectbool外部 IO 连接状态:false 未连接,true 已连接
typeint连接类型:0:NAN, 1:RTU, 2:TCP

响应包体:

json
{
  "ModbusConnect": false,
  "ExternIOConnect": true,
  "type": 2
}

远程作业文件设置

设置远程作业文件

命令字: 0x2C01 REMOTE_JOBFILE_SET

参数类型描述
robotint机器人号
jobFilearray作业文件列表

jobFile 数组元素:

参数类型描述
namestring作业文件名称
timesint运行次数

请求包体:

json
{
  "robot": 1,
  "jobFile": [
    {"name": "Q1", "times": 1},
    {"name": "Q2", "times": 1},
    {"name": "Q3", "times": 1},
    {"name": "Q4", "times": 1},
    {"name": "Q5", "times": 1}
    // ... 最多 10 个
  ]
}

获取远程作业文件

命令字: 0x2C02 REMOTE_JOBFILE_INQUIRE

请求包体:

json
{
  "robot": 1
}

返回作业文件查询结果

命令字: 0x2C03 REMOTE_JOBFILE_RESPOND

响应包体:

json
{
  "robot": 1,
  "jobFile": [
    {"name": "Q1", "times": 3},
    {"name": "Q2", "times": 3},
    {"name": "", "times": 1},
    {"name": "Q4", "times": 2},
    {"name": "", "times": 1}
  ]
}

远程模式参数设置

设置远程模式参数

命令字: 0x2C04 REMOTE_PARA_SET

参数类型描述
robotint机器人号
remoteDefaultSpeedint远程模式速度,范围 1~100
reserveIsStartint预约并启动:1 启动,0 关闭
reserveTrgTimeint确认启动时间,范围 200~1000ms
waitingTimeintIO 重复触发时间

请求包体:

json
{
  "robot": 1,
  "remoteDefaultSpeed": 15,
  "reserveIsStart": 1,
  "reserveTrgTime": 200,
  "waitingTime": 500
}

查询远程模式参数

命令字: 0x2C05 REMOTE_PARA_INQUIRE

请求包体:

json
{
  "robot": 1
}

返回远程模式参数查询结果

命令字: 0x2C06 REMOTE_PARA_RESPOND

响应包体:

json
{
  "robot": 1,
  "remoteDefaultSpeed": 15,
  "reserveIsStart": 1,
  "reserveTrgTime": 200,
  "waitingTime": 500
}