Skip to content

远程程序

预约执行状态

远程模式界面,上位机查询预约执行状态时,发送。

命令字: 0x5500

请求参数

参数名类型必填描述
robotint选择机器人,取值范围 [1,4]

请求示例

json
{
    "robot": 1
}

控制器回复预约执行状态查询结果。

命令字: 0x5501

响应参数

参数名类型描述
robotint选择机器人,取值范围 [1,4]
currentobject当前任务状态
current.stationint工位编号
current.namestring程序名称
current.runtimeint运行时间
current.timesint运行次数
current.countint已运行次数
current.statusint状态:0-无预约,1-预约中,2-运行中,3-已预约,4-程序暂停
queuearray预约队列
queue[].stationint工位编号
queue[].namestring程序名称
queue[].timesint运行次数
queue[].countint已运行次数
queue[].statusint状态

响应示例

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

请求参数

参数名类型必填描述
remotectlbool远程控制的状态

请求示例

json
{
    "remotectl": false
}

上位机发送远程控制查询。

命令字: 0x5511

date:无

控制器回复查询。

命令字: 0x5512

响应参数

参数名类型描述
remotectlbool远程控制的状态

响应示例

json
{
    "remotectl": false
}

远程程序

上位机发送设置远程程序。

命令字: 0x5520

请求参数

参数名类型必填描述
robotint选择机器人,取值范围 [1,4]
jobFilearray程序列表
jobFile[].namestring程序名称
jobFile[].timesint运行次数
interpolationMethodint插补方法
absolutePosResolutiondouble绝对位置分辨率
stopTimeint暂停时间
runDelayTimeint运行延时时间
remoteDefaultSpeedint远程模式速度 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

请求参数

参数名类型必填描述
robotint选择机器人,取值范围 [1,4]

请求示例

json
{
    "robot": 1
}

控制器收到上位机查询程序名字时回复。

命令字: 0x5522

响应参数

参数名类型描述
robotint选择机器人,取值范围 [1,4]
jobFilearray程序列表
jobFile[].namestring程序名称
jobFile[].timesint运行次数
remoteProgramNumint远程程序个数

响应示例

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

请求参数

参数名类型必填描述
robotint选择机器人,取值范围 [1,4]
waitingTimedoubleIO重复触发时间
reserveIsStartint预约IO后自动启动运行:0-关,1-开
interpolationMethodint插补方法
reserveTrgTimedouble远程模式IO预约并启动时间(毫秒)
absolutePosResolutionint绝对位置分辨率
stopTimeint暂停时间
runDelayTimeint运行延时时间
remoteDefaultSpeedint远程模式速度 1-100%

请求示例

json
{
    "robot": 1,
    "waitingTime": 1,
    "reserveIsStart": 0,
    "interpolationMethod": 4,
    "reserveTrgTime": 200,
    "absolutePosResolution": 0.06,
    "stopTime": 5,
    "runDelayTime": 600,
    "remoteDefaultSpeed": 1
}

上位机发送远程模式参数查询。

命令字: 0x5531

请求参数

参数名类型必填描述
robotint选择机器人,取值范围 [1,4]

请求示例

json
{
    "robot": 1
}

控制器回复查询结果。

命令字: 0x5532

响应参数

参数名类型描述
remoteDefaultSpeedint远程模式速度 1-100%
remoteProgramNumint远程程序个数
reserveIsStartbool预约IO后自动启动运行:0-关,1-开
waitingTimeintIO重复触发时间

响应示例

json
{
    "remoteDefaultSpeed": 1.0,
    "remoteProgramNum": 10,
    "reserveIsStart": false,
    "waitingTime": 500
}

远程IO功能界面设置

上位机发送设置IO功能界面。

命令字: 0x5540

请求参数

参数名类型必填描述
robotint选择机器人,取值范围 [1,4]
remoteProgramNumint远程IO数功能
inPortobjectIO触发端口绑定
inPort.clearoutagekeepint清除断电保存数据,绑定IO端口:0-无,1-端口1
inPort.faultResetint清除报警,绑定IO端口
inPort.pauseint暂停,绑定IO端口
inPort.startint启动,绑定IO端口
inPort.stopint停止,绑定IO端口
inValueobjectIO参数
inValue.clearoutagekeepint清除断电保存数据,绑定IO端口触发所需状态:0-低电平有效,1-高电平有效
inValue.faultResetint清除报警,绑定IO端口触发所需状态
inValue.pauseint暂停,绑定IO端口触发所需状态
inValue.startint启动,绑定IO端口触发所需状态
inValue.stopint停止,绑定IO端口触发所需状态
programarray程序列表
program[].portint端口
program[].valueint

请求示例

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

请求参数

参数名类型必填描述
robotint选择机器人,取值范围 [1,4]

请求示例

json
{
    "robot": 1
}

IO功能界面,控制器收到查询时回复。

命令字: 0x5542

响应参数

参数名类型描述
robotint选择机器人,取值范围 [1,4]
remoteProgramNumint远程IO数功能
inPortobjectIO触发端口绑定:0-无,1-端口1
inPort.clearoutagekeepint清除断电保存数据,绑定IO端口
inPort.faultResetint清除报警,绑定IO端口
inPort.pauseint暂停,绑定IO端口
inPort.startint启动,绑定IO端口
inPort.stopint停止,绑定IO端口
inValueobjectIO参数:0-低电平有效,1-高电平有效
inValue.clearoutagekeepint清除断电保存数据,绑定IO端口触发所需状态
inValue.faultResetint清除报警,绑定IO端口触发所需状态
inValue.pauseint暂停,绑定IO端口触发所需状态
inValue.startint启动,绑定IO端口触发所需状态
inValue.stopint停止,绑定IO端口触发所需状态
programarray程序列表
program[].namestring程序名称
program[].portint端口
program[].valueint
reserveTrgTimeintIO重复触发屏蔽时间

响应示例

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

请求参数

参数名类型必填描述
robotint选择机器人,取值范围 [1,4]
outputarray输出端口列表
output[].program1 ~ program10int远程 IO 程序 1-10 的输出端口编号
output[].program_value1 ~ program_value10int对应每个远程 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

请求参数

参数名类型必填描述
robotint选择机器人,取值范围 [1,4]

请求示例

json
{
    "robot": 1
}

控制器回复查询结果。

命令字: 0x5552

响应参数

参数名类型描述
robotint选择机器人,取值范围 [1,4]
outputarray输出端口列表
output[].program1 ~ program10int远程 IO 程序 1-10 的输出端口编号
output[].program_value1 ~ program_value10int对应每个远程 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

响应参数

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

响应示例

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

控制器发送,是否通过 IO 修改了作业文件(外部按键触发修改作业文件时,控制器发送给上位机)。

命令字: 0x5562

响应参数

参数名类型描述
isModifybool是否通过 IO 修改了作业文件:true-是,false-否

响应示例

json
{
    "isModify": false
}