Appearance
远程程序
预约执行状态
远程模式界面,上位机查询预约执行状态时,发送。
命令字: 0x5500
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| robot | int | 是 | 选择机器人,取值范围 [1,4] |
请求示例
json
{
"robot": 1
}控制器回复预约执行状态查询结果。
命令字: 0x5501
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| robot | int | 选择机器人,取值范围 [1,4] |
| current | object | 当前任务状态 |
| current.station | int | 工位编号 |
| current.name | string | 程序名称 |
| current.runtime | int | 运行时间 |
| current.times | int | 运行次数 |
| current.count | int | 已运行次数 |
| current.status | int | 状态:0-无预约,1-预约中,2-运行中,3-已预约,4-程序暂停 |
| queue | array | 预约队列 |
| queue[].station | int | 工位编号 |
| queue[].name | string | 程序名称 |
| queue[].times | int | 运行次数 |
| queue[].count | int | 已运行次数 |
| queue[].status | int | 状态 |
响应示例
json
{
"robot": 1,
"current": {
"station": 1,
"name": "Q1",
"runtime": 1,
"times": 3,
"count": 1,
"status": 2
},
"queue": [
{
"station": 1,
"name": "Q4",
"times": 2,
"count": 0,
"status": 1
},
{
"station": 1,
"name": "Q1",
"times": 6,
"count": 0,
"status": 1
},
{
"station": 1,
"name": "Q3",
"times": 1,
"count": 0,
"status": 1
},
{
"station": 1,
"name": "",
"times": 1,
"count": 0,
"status": 0
},
{
"station": 1,
"name": "",
"times": 2,
"count": 0,
"status": 0
}
]
}远程状态
上位机发送远程控制设置。
命令字: 0x5510
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| remotectl | bool | 是 | 远程控制的状态 |
请求示例
json
{
"remotectl": false
}上位机发送远程控制查询。
命令字: 0x5511
date:无
控制器回复查询。
命令字: 0x5512
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| remotectl | bool | 远程控制的状态 |
响应示例
json
{
"remotectl": false
}远程程序
上位机发送设置远程程序。
命令字: 0x5520
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| robot | int | 是 | 选择机器人,取值范围 [1,4] |
| jobFile | array | 是 | 程序列表 |
| jobFile[].name | string | 是 | 程序名称 |
| jobFile[].times | int | 是 | 运行次数 |
| interpolationMethod | int | 否 | 插补方法 |
| absolutePosResolution | double | 否 | 绝对位置分辨率 |
| stopTime | int | 否 | 暂停时间 |
| runDelayTime | int | 否 | 运行延时时间 |
| remoteDefaultSpeed | int | 否 | 远程模式速度 1-100% |
请求示例
json
{
"robot": 1,
"jobFile": [
{"name": "Q1", "times": 3},
{"name": "Q2", "times": 3},
{"name": "", "times": 1},
{"name": "Q4", "times": 2},
{"name": "", "times": 1}
],
"interpolationMethod": 4,
"absolutePosResolution": 0.06,
"stopTime": 5,
"runDelayTime": 600,
"remoteDefaultSpeed": 1
}上位机发送获取远程程序。
命令字: 0x5521
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| robot | int | 是 | 选择机器人,取值范围 [1,4] |
请求示例
json
{
"robot": 1
}控制器收到上位机查询程序名字时回复。
命令字: 0x5522
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| robot | int | 选择机器人,取值范围 [1,4] |
| jobFile | array | 程序列表 |
| jobFile[].name | string | 程序名称 |
| jobFile[].times | int | 运行次数 |
| remoteProgramNum | int | 远程程序个数 |
响应示例
json
{
"jobFile": [
{"name": "Q1", "times": 3},
{"name": "Q2", "times": 3},
{"name": "", "times": 1},
{"name": "Q4", "times": 2},
{"name": "", "times": 1},
{"name": "", "times": 0},
{"name": "", "times": 0},
{"name": "", "times": 0},
{"name": "", "times": 0},
{"name": "", "times": 0}
],
"remoteProgramNum": 10,
"robot": 1
}远程模式参数设置
上位机发送远程模式参数设置。
命令字: 0x5530
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| robot | int | 是 | 选择机器人,取值范围 [1,4] |
| waitingTime | double | 否 | IO重复触发时间 |
| reserveIsStart | int | 否 | 预约IO后自动启动运行:0-关,1-开 |
| interpolationMethod | int | 否 | 插补方法 |
| reserveTrgTime | double | 否 | 远程模式IO预约并启动时间(毫秒) |
| absolutePosResolution | int | 否 | 绝对位置分辨率 |
| stopTime | int | 否 | 暂停时间 |
| runDelayTime | int | 否 | 运行延时时间 |
| remoteDefaultSpeed | int | 否 | 远程模式速度 1-100% |
请求示例
json
{
"robot": 1,
"waitingTime": 1,
"reserveIsStart": 0,
"interpolationMethod": 4,
"reserveTrgTime": 200,
"absolutePosResolution": 0.06,
"stopTime": 5,
"runDelayTime": 600,
"remoteDefaultSpeed": 1
}上位机发送远程模式参数查询。
命令字: 0x5531
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| robot | int | 是 | 选择机器人,取值范围 [1,4] |
请求示例
json
{
"robot": 1
}控制器回复查询结果。
命令字: 0x5532
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| remoteDefaultSpeed | int | 远程模式速度 1-100% |
| remoteProgramNum | int | 远程程序个数 |
| reserveIsStart | bool | 预约IO后自动启动运行:0-关,1-开 |
| waitingTime | int | IO重复触发时间 |
响应示例
json
{
"remoteDefaultSpeed": 1.0,
"remoteProgramNum": 10,
"reserveIsStart": false,
"waitingTime": 500
}远程IO功能界面设置
上位机发送设置IO功能界面。
命令字: 0x5540
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| robot | int | 是 | 选择机器人,取值范围 [1,4] |
| remoteProgramNum | int | 是 | 远程IO数功能 |
| inPort | object | 否 | IO触发端口绑定 |
| inPort.clearoutagekeep | int | 否 | 清除断电保存数据,绑定IO端口:0-无,1-端口1 |
| inPort.faultReset | int | 否 | 清除报警,绑定IO端口 |
| inPort.pause | int | 否 | 暂停,绑定IO端口 |
| inPort.start | int | 否 | 启动,绑定IO端口 |
| inPort.stop | int | 否 | 停止,绑定IO端口 |
| inValue | object | 否 | IO参数 |
| inValue.clearoutagekeep | int | 否 | 清除断电保存数据,绑定IO端口触发所需状态:0-低电平有效,1-高电平有效 |
| inValue.faultReset | int | 否 | 清除报警,绑定IO端口触发所需状态 |
| inValue.pause | int | 否 | 暂停,绑定IO端口触发所需状态 |
| inValue.start | int | 否 | 启动,绑定IO端口触发所需状态 |
| inValue.stop | int | 否 | 停止,绑定IO端口触发所需状态 |
| program | array | 否 | 程序列表 |
| program[].port | int | 否 | 端口 |
| program[].value | int | 否 | 值 |
请求示例
json
{
"inPort": {
"clearoutagekeep": 0,
"faultReset": 0,
"pause": 0,
"start": 8,
"stop": 0
},
"inValue": {
"clearoutagekeep": 1,
"faultReset": 1,
"pause": 1,
"start": 1,
"stop": 1
},
"program": [
{"port": 0, "value": 1},
{"port": 0, "value": 1},
{"port": 0, "value": 1},
{"port": 0, "value": 1},
{"port": 0, "value": 1},
{"port": 0, "value": 1},
{"port": 0, "value": 1},
{"port": 0, "value": 1},
{"port": 0, "value": 1},
{"port": 0, "value": 1}
],
"remoteProgramNum": 10,
"robot": 1
}IO功能界面查询设置时,上位机发送下面命令。
命令字: 0x5541
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| robot | int | 是 | 选择机器人,取值范围 [1,4] |
请求示例
json
{
"robot": 1
}IO功能界面,控制器收到查询时回复。
命令字: 0x5542
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| robot | int | 选择机器人,取值范围 [1,4] |
| remoteProgramNum | int | 远程IO数功能 |
| inPort | object | IO触发端口绑定:0-无,1-端口1 |
| inPort.clearoutagekeep | int | 清除断电保存数据,绑定IO端口 |
| inPort.faultReset | int | 清除报警,绑定IO端口 |
| inPort.pause | int | 暂停,绑定IO端口 |
| inPort.start | int | 启动,绑定IO端口 |
| inPort.stop | int | 停止,绑定IO端口 |
| inValue | object | IO参数:0-低电平有效,1-高电平有效 |
| inValue.clearoutagekeep | int | 清除断电保存数据,绑定IO端口触发所需状态 |
| inValue.faultReset | int | 清除报警,绑定IO端口触发所需状态 |
| inValue.pause | int | 暂停,绑定IO端口触发所需状态 |
| inValue.start | int | 启动,绑定IO端口触发所需状态 |
| inValue.stop | int | 停止,绑定IO端口触发所需状态 |
| program | array | 程序列表 |
| program[].name | string | 程序名称 |
| program[].port | int | 端口 |
| program[].value | int | 值 |
| reserveTrgTime | int | IO重复触发屏蔽时间 |
响应示例
json
{
"inPort": {
"clearoutagekeep": 0,
"faultReset": 0,
"pause": 0,
"start": 0,
"stop": 0
},
"inValue": {
"clearoutagekeep": 1,
"faultReset": 1,
"pause": 1,
"start": 1,
"stop": 1
},
"program": [
{"name": "Q1", "port": 0, "value": 1},
{"name": "Q2", "port": 0, "value": 1},
{"name": "", "port": 0, "value": 1},
{"name": "Q4", "port": 0, "value": 1},
{"name": "", "port": 0, "value": 1},
{"name": "", "port": 0, "value": 1},
{"name": "", "port": 0, "value": 1},
{"name": "", "port": 0, "value": 1},
{"name": "", "port": 0, "value": 1},
{"name": "", "port": 0, "value": 1}
],
"remoteProgramNum": 10,
"reserveTrgTime": 500,
"robot": 1
}远程IO状态
上位机发送远程状态提示设置。
命令字: 0x5550
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| robot | int | 是 | 选择机器人,取值范围 [1,4] |
| output | array | 是 | 输出端口列表 |
| output[].program1 ~ program10 | int | 否 | 远程 IO 程序 1-10 的输出端口编号 |
| output[].program_value1 ~ program_value10 | int | 否 | 对应每个远程 IO 程序的输出端口值 |
请求示例
json
{
"robot": 1,
"output": [
{
"program1": 1,
"program2": 2,
"program3": 3,
"program4": 4,
"program5": 5,
"program6": 6,
"program7": 7,
"program8": 8,
"program9": 9,
"program10": 10,
"program_value1": 1,
"program_value2": 2,
"program_value3": 3,
"program_value4": 4,
"program_value5": 5,
"program_value6": 6,
"program_value7": 7,
"program_value8": 8,
"program_value9": 9,
"program_value10": 10
}
]
}上位机查询远程状态提示设置。
命令字: 0x5551
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| robot | int | 是 | 选择机器人,取值范围 [1,4] |
请求示例
json
{
"robot": 1
}控制器回复查询结果。
命令字: 0x5552
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| robot | int | 选择机器人,取值范围 [1,4] |
| output | array | 输出端口列表 |
| output[].program1 ~ program10 | int | 远程 IO 程序 1-10 的输出端口编号 |
| output[].program_value1 ~ program_value10 | int | 对应每个远程 IO 程序的输出端口值 |
响应示例
json
{
"robot": 1,
"output": [
{
"program1": 1,
"program2": 2,
"program3": 3,
"program4": 4,
"program5": 5,
"program6": 6,
"program7": 7,
"program8": 8,
"program9": 9,
"program10": 10,
"program_value1": 1,
"program_value2": 2,
"program_value3": 3,
"program_value4": 4,
"program_value5": 5,
"program_value6": 6,
"program_value7": 7,
"program_value8": 8,
"program_value9": 9,
"program_value10": 10
}
]
}远程模式连接状态
查询 Modbus、外部 IO 连接状态时,发送。
命令字: 0x5560
date:无
收到查询连接状态时,返回。
命令字: 0x5561
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| ModbusConnect | bool | Modbus 连接状态:false-未连接,true-已连接 |
| ExternIOConnect | bool | 外部 IO 连接状态:false-未连接,true-已连接 |
| type | int | 类型:0-NAN,1-RTU,2-TCP |
响应示例
json
{
"ModbusConnect": false,
"ExternIOConnect": true,
"type": 2
}控制器发送,是否通过 IO 修改了作业文件(外部按键触发修改作业文件时,控制器发送给上位机)。
命令字: 0x5562
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| isModify | bool | 是否通过 IO 修改了作业文件:true-是,false-否 |
响应示例
json
{
"isModify": false
}