Skip to content

码垛工艺

1 抓手

1.1 上位机设置抓手参数

说明: 抓手设置就是设置码垛过程中用到的工具手。两个吸盘分别取料(一个吸盘吸完后再切换到另一个吸盘取料),那么要设置成两个抓手;两个吸盘同时取料,则设置成一个抓手;如果两个吸盘分别放料(一个吸盘放完后切换到另一个吸盘放料),此时需要设置两个抓手;两个吸盘同时放料,则设置成一个抓手。

命令字: 0x8000

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
pallet.gripperNumint抓手数目[1,4]
pallet.gripperarray抓手工具号数组,第i个数代表抓手i的工具号-
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "gripperNum": 2,
        "gripper": [1, 3, 4, 1]
    }
}

1.2 上位机查询抓手参数

命令字: 0x8001

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
json
{
    "robot": 1,
    "craftID": 1
}

1.3 控制器返回抓手参数

命令字: 0x8002

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
pallet.gripperNumint抓手数目[1,4]
pallet.gripperarray抓手工具号数组,第i个数代表抓手i的工具号-
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "gripperNum": 2,
        "gripper": [1, 3, 4, 1]
    }
}

2 托盘

2.1 上位机设置托盘参数

命令字: 0x8010

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
pallet.userNumint用户坐标系-
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "userNum": 1
    }
}

2.2 上位机查询托盘参数

命令字: 0x8011

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
json
{
    "robot": 1,
    "craftID": 1
}

2.3 控制器返回托盘参数

命令字: 0x8012

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
pallet.userNumint用户坐标系-
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "userNum": 1
    }
}

2.4 上位机下发设置码垛托盘范围参数

命令字: 0x8013

参数名类型说明取值范围
robotint表示要操作的机器人编号[1,4]
craftIDint码垛工艺号-
pallet.tray_previewbool是否打开托盘预览true/false
pallet.tray_lengthdouble托盘长(1,50000)
pallet.tray_widthdouble托盘宽(1,50000)
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "tray_preview": true,
        "tray_length": 1,
        "tray_width": 1
    }
}

2.5 上位机查询码垛托盘范围参数

命令字: 0x8014

参数名类型说明取值范围
robotint表示要操作的机器人编号[1,4]
craftIDint码垛工艺号-
json
{
    "robot": 1,
    "craftID": 1
}

2.6 控制器回复托盘范围参数

命令字: 0x8015

参数名类型说明取值范围
robotint表示要操作的机器人编号[1,4]
craftIDint码垛工艺号-
pallet.tray_previewbool是否打开托盘预览true/false
pallet.tray_lengthdouble托盘长(1,50000)
pallet.tray_widthdouble托盘宽(1,50000)
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "tray_preview": true,
        "tray_length": 1,
        "tray_width": 1
    }
}

3 位置

3.1 上位机设置位置参数

说明: 位置设置可以设置码垛工件点、辅助点、入口点,请带抓手设置所选的工具手进行位置标记。

命令字: 0x8020

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
pallet.floorNumint标记原点所在层-
pallet.enterPosarray入口点,double类型,6个元素-
pallet.realPosarray工件点,double类型,6个元素-
pallet.shiftPosarray辅助点,double类型,6个元素-
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "floorNum": 1,
        "enterPos": [9999.0, 9999.0, 9999.0, 9999.0, 9999.0, 9999.0],
        "realPos": [9999.0, 9999.0, 9999.0, 9999.0, 9999.0, 9999.0],
        "shiftPos": [9999.0, 9999.0, 9999.0, 9999.0, 9999.0, 9999.0]
    }
}

3.2 上位机查询位置参数

命令字: 0x8021

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
json
{
    "robot": 1,
    "craftID": 1
}

3.3 控制器返回位置参数

命令字: 0x8022

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
pallet.floorNumint标记原点所在层-
pallet.enterPosarray入口点,double类型,6个元素-
pallet.realPosarray工件点,double类型,6个元素-
pallet.shiftPosarray辅助点,double类型,6个元素-
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "floorNum": 1,
        "enterPos": [9999.0, 9999.0, 9999.0, 9999.0, 9999.0, 9999.0],
        "realPos": [9999.0, 9999.0, 9999.0, 9999.0, 9999.0, 9999.0],
        "shiftPos": [9999.0, 9999.0, 9999.0, 9999.0, 9999.0, 9999.0]
    }
}

4 工件参数

4.1 上位机设置工件参数

命令字: 0x8030

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
pallet.workpieceGapXdouble托盘X方向间隙[0,9999]mm
pallet.workpieceGapYdouble托盘Y方向间隙[0,9999]mm
pallet.workpieceHeightdouble高(托盘Z方向)[1,9999]mm
pallet.workpieceLengtharray长(托盘Y方向),double类型[1,9999]mm
pallet.workpieceWidtharray宽(托盘X方向),double类型[1,9999]mm
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "workpieceGapX": 0.0,
        "workpieceGapY": 0.0,
        "workpieceHeight": 1.0,
        "workpieceLength": [1.0],
        "workpieceWidth": [1.0]
    }
}

4.2 上位机查询工件参数

命令字: 0x8031

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
json
{
    "robot": 1,
    "craftID": 1
}

4.3 控制器返回工件参数

命令字: 0x8032

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
pallet.workpieceGapXdouble托盘X方向间隙[0,9999]mm
pallet.workpieceGapYdouble托盘Y方向间隙[0,9999]mm
pallet.workpieceHeightdouble高(托盘Z方向)[1,9999]mm
pallet.workpieceLengtharray长(托盘Y方向),double类型[1,9999]mm
pallet.workpieceWidtharray宽(托盘X方向),double类型[1,9999]mm
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "workpieceGapX": 0.0,
        "workpieceGapY": 0.0,
        "workpieceHeight": 1.0,
        "workpieceLength": [1.0],
        "workpieceWidth": [1.0]
    }
}

5 接近参数

5.1 上位机设置接近参数

命令字: 0x8040

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
pallet.workpieceApproEnablebool接近使能true/false
pallet.workpieceApproModeint接近方式0:下降接近, 1:接近下降
pallet.workpieceApproLenXdouble托盘X方向长度[0,9999]mm
pallet.workpieceApproLenYdouble托盘Y方向长度[0,9999]mm
pallet.workpieceApproLenZdouble托盘Z方向长度[0,9999]mm
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "workpieceApproEnable": false,
        "workpieceApproMode": 0,
        "workpieceApproLenX": 0,
        "workpieceApproLenY": 0,
        "workpieceApproLenZ": 0
    }
}

5.2 上位机查询接近参数

命令字: 0x8041

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
json
{
    "robot": 1,
    "craftID": 1
}

5.3 控制器返回接近参数

命令字: 0x8042

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
pallet.workpieceApproEnablebool接近使能true/false
pallet.workpieceApproModeint接近方式0:下降接近, 1:接近下降
pallet.workpieceApproLenXdouble托盘X方向长度[0,9999]mm
pallet.workpieceApproLenYdouble托盘Y方向长度[0,9999]mm
pallet.workpieceApproLenZdouble托盘Z方向长度[0,9999]mm
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "workpieceApproEnable": false,
        "workpieceApproMode": 0,
        "workpieceApproLenX": 0,
        "workpieceApproLenY": 0,
        "workpieceApproLenZ": 0
    }
}

6 重叠模式参数

6.1 设置重叠模式参数

命令字: 0x8050

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
pallet.floorSumint层数[1,999]
pallet.overlapTypeint重复关系0:相同, 1:交替, 2:自定义
pallet.layHeightOffsetdouble放货点高度补偿-
pallet.fixedLayHeightbool固定放货点高度true/false
pallet.fixedSupHeightbool固定辅助点高度true/false
pallet.columnLaybool竖直方向排列true/false
pallet.floorAutoJustifiedbool层自动对齐true/false
pallet.poseAutorotationbool姿态自动旋转true/false
pallet.fixedEnterPointbool固定入口点位置true/false
pallet.graphicNumarray图形编号[0,9]
pallet.heightRevisearray高度修正-
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "floorSum": 1,
        "overlapType": 0,
        "layHeightOffset": 0.0,
        "fixedLayHeight": false,
        "fixedSupHeight": false,
        "columnLay": false,
        "floorAutoJustified": false,
        "poseAutorotation": false,
        "fixedEnterPoint": false,
        "graphicNum": [1, 2, 1, 2],
        "heightRevise": [1.1, -2.2]
    }
}

6.2 上位机查询重叠模式参数

命令字: 0x8051

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
json
{
    "robot": 1,
    "craftID": 1
}

6.3 控制器返回重叠模式参数

命令字: 0x8052

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
pallet.floorSumint层数[1,999]
pallet.overlapTypeint重复关系0:相同, 1:交替, 2:自定义
pallet.layHeightOffsetdouble放货点高度补偿-
pallet.fixedLayHeightbool固定放货点高度true/false
pallet.fixedSupHeightbool固定辅助点高度true/false
pallet.columnLaybool竖直方向排列true/false
pallet.floorAutoJustifiedbool层自动对齐true/false
pallet.poseAutorotationbool姿态自动旋转true/false
pallet.fixedEnterPointbool固定入口点位置true/false
pallet.graphicNumarray图形编号[0,9]
pallet.heightRevisearray高度修正-
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "floorSum": 1,
        "overlapType": 0,
        "layHeightOffset": 0.0,
        "fixedLayHeight": false,
        "fixedSupHeight": false,
        "columnLay": false,
        "floorAutoJustified": false,
        "poseAutorotation": false,
        "fixedEnterPoint": false,
        "graphicNum": [1, 2, 1, 2],
        "heightRevise": [1.1, -2.2]
    }
}

7 平面模式参数

7.1 设置平面模式参数

命令字: 0x8060

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
graphicint图形编号[1,9]
pallet.graphicTypeint模版选择0:行列, 1:纵横交错, 2:回字型, 3:五花垛, 4:自定义
pallet.transLenXdoubleX平移补偿[-9999,9999]mm
pallet.transLenYdoubleY平移补偿[-9999,9999]mm
pallet.ranks.numXintx方向个数[1,999]
pallet.ranks.numYinty方向个数[1,999]
pallet.ranks.rotationAngleWholeint整体旋转角度0:0, 1:90, 2:180, 3:-90
pallet.ranks.rotationAngleSingleint工件旋转角度0:0, 1:90, 2:180, 3:-90
pallet.ranks.autoCalculatebool自动计算true/false
pallet.intertwining.numXintx方向个数[1,999]
pallet.intertwining.numYinty方向个数[1,999]
pallet.intertwining.rotationAngleWholeint整体旋转角度0:0, 1:90, 2:180, 3:-90
pallet.intertwining.rotationAngleSingleint工件旋转角度0:0, 1:90, 2:180, 3:-90
pallet.gearType.rotationAngleWholeint整体旋转角度0:0, 1:90, 2:180, 3:-90
pallet.gearType.rotationAngleSingleint工件旋转角度0:0, 1:90, 2:180, 3:-90
pallet.wideType.A_rowsintA区行数[0,999]
pallet.wideType.B_rowsintB区行数[1,999]
pallet.wideType.B_columnsintB区列数[1,999]
pallet.wideType.C_rowsintC区行数[0,999]
pallet.wideType.A_C_columnsintA区和C区列数[0,999]
pallet.wideType.rotationAngleWholeint整体旋转角度0:0, 1:90, 2:180, 3:-90
pallet.wideType.rotationAngleSingleint工件旋转角度0:0, 1:90, 2:180, 3:-90
pallet.custom.sumint层工件总数-
pallet.custom.startint开始发送的工件号-
pallet.custom.countint发送给控制器的层工件数,每次发送最大为10-
pallet.custom.eachVec[].XdoubleX偏移[-9999,9999]mm
pallet.custom.eachVec[].YdoubleY偏移[-9999,9999]mm
pallet.custom.eachVec[].tdouble旋转角[-180,180]
pallet.custom.eachVec[].dirint接近方向0:上, 1:下, 2:左, 3:右, 4:左上, 5:左下, 6:右上, 7:右下
pallet.custom.eachVec[].hdouble高度修正[-9999,9999]mm
pallet.custom.eachVec[].EntrySpeeddouble接近速度0或[1,100]%
pallet.custom.eachVec[].LeaveSpeeddouble离开速度0或[1,100]%

注意: 每次最多发送十组,若工件总数大于10,则要多次发送,非第一次发送时start需要改变。例如,第一次发送10组,第二次发送时start为11。

json
{
    "robot": 1,
    "craftID": 1,
    "graphic": 1,
    "pallet": {
        "graphicType": 0,
        "transLenX": 2.2,
        "transLenY": -3.3,
        "ranks": {
            "numX": 0,
            "numY": 0,
            "rotationAngleWhole": 0,
            "rotationAngleSingle": 0,
            "autoCalculate": true
        },
        "intertwining": {
            "numX": 0,
            "numY": 0,
            "rotationAngleWhole": 0,
            "rotationAngleSingle": 0
        },
        "gearType": {
            "rotationAngleWhole": 0,
            "rotationAngleSingle": 0
        },
        "wideType": {
            "A_rows": 1,
            "B_rows": 1,
            "B_columns": 1,
            "C_rows": 1,
            "A_C_columns": 1,
            "rotationAngleWhole": 0.0,
            "rotationAngleSingle": 0.0
        },
        "custom": {
            "sum": 20,
            "start": 1,
            "count": 10,
            "eachVec": [
                {
                    "X": 0,
                    "Y": 0,
                    "t": 0,
                    "dir": 0,
                    "h": 0,
                    "EntrySpeed": 60.0,
                    "LeaveSpeed": 3.0
                }
            ]
        }
    }
}

7.2 上位机查询平面模式参数

命令字: 0x8061

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
graphicint图形编号[1,9]
json
{
    "robot": 1,
    "craftID": 1,
    "graphic": 1
}

7.3 控制器返回平面模式参数

命令字: 0x8060

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
graphicint图形编号[1,9]
pallet.graphicTypeint模版选择0:行列, 1:纵横交错, 2:回字型, 3:五花垛, 4:自定义
pallet.transLenXdoubleX平移补偿[-9999,9999]mm
pallet.transLenYdoubleY平移补偿[-9999,9999]mm
pallet.ranks.numXintx方向个数[1,999]
pallet.ranks.numYinty方向个数[1,999]
pallet.ranks.rotationAngleWholeint整体旋转角度0:0, 1:90, 2:180, 3:-90
pallet.ranks.rotationAngleSingleint工件旋转角度0:0, 1:90, 2:180, 3:-90
pallet.ranks.autoCalculatebool自动计算true/false
pallet.intertwining.numXintx方向个数[1,999]
pallet.intertwining.numYinty方向个数[1,999]
pallet.intertwining.rotationAngleWholeint整体旋转角度0:0, 1:90, 2:180, 3:-90
pallet.intertwining.rotationAngleSingleint工件旋转角度0:0, 1:90, 2:180, 3:-90
pallet.gearType.rotationAngleWholeint整体旋转角度0:0, 1:90, 2:180, 3:-90
pallet.gearType.rotationAngleSingleint工件旋转角度0:0, 1:90, 2:180, 3:-90
pallet.wideType.A_rowsintA区行数[0,999]
pallet.wideType.B_rowsintB区行数[1,999]
pallet.wideType.B_columnsintB区列数[1,999]
pallet.wideType.C_rowsintC区行数[0,999]
pallet.wideType.A_C_columnsintA区和C区列数[0,999]
pallet.wideType.rotationAngleWholeint整体旋转角度0:0, 1:90, 2:180, 3:-90
pallet.wideType.rotationAngleSingleint工件旋转角度0:0, 1:90, 2:180, 3:-90
pallet.custom.sumint层工件总数-
pallet.custom.startint开始发送的工件号-
pallet.custom.countint发送给控制器的层工件数,每次发送最大为10-
pallet.custom.eachVec[].XdoubleX偏移[-9999,9999]mm
pallet.custom.eachVec[].YdoubleY偏移[-9999,9999]mm
pallet.custom.eachVec[].tdouble旋转角[-180,180]
pallet.custom.eachVec[].dirint接近方向0:上, 1:下, 2:左, 3:右, 4:左上, 5:左下, 6:右上, 7:右下
pallet.custom.eachVec[].hdouble高度修正[-9999,9999]mm
pallet.custom.eachVec[].EntrySpeeddouble接近速度0或[1,100]%
pallet.custom.eachVec[].LeaveSpeeddouble离开速度0或[1,100]%
json
{
    "robot": 1,
    "craftID": 1,
    "graphic": 1,
    "pallet": {
        "graphicType": 0,
        "transLenX": 2.2,
        "transLenY": -3.3,
        "ranks": {
            "numX": 0,
            "numY": 0,
            "rotationAngleWhole": 0,
            "rotationAngleSingle": 0,
            "autoCalculate": true
        },
        "intertwining": {
            "numX": 0,
            "numY": 0,
            "rotationAngleWhole": 0,
            "rotationAngleSingle": 0
        },
        "gearType": {
            "rotationAngleWhole": 0,
            "rotationAngleSingle": 0
        },
        "wideType": {
            "A_rows": 1,
            "B_rows": 1,
            "B_columns": 1,
            "C_rows": 1,
            "A_C_columns": 1,
            "rotationAngleWhole": 0.0,
            "rotationAngleSingle": 0.0
        },
        "custom": {
            "sum": 20,
            "start": 1,
            "count": 10,
            "eachVec": [
                {
                    "X": 0,
                    "Y": 0,
                    "t": 0,
                    "dir": 0,
                    "h": 0,
                    "EntrySpeed": 60.0,
                    "LeaveSpeed": 3.0
                }
            ]
        }
    }
}

7.4 请求转换为平面模式自定义模板

命令字: 0x8063

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
graphicint图形编号[1,9]
json
{
    "robot": 1,
    "craftID": 1,
    "graphic": 1
}

7.5 控制器返回转换为平面模式自定义模板后对应参数

命令字: 0x8064

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
graphicint图形编号[1,9]
pallet.graphicTypeint模版选择(此处只能取3)3:自定义
pallet.transLenXdoubleX平移补偿[-9999,9999]mm
pallet.transLenYdoubleY平移补偿[-9999,9999]mm
pallet.autoTransLenXdoubleX自动平移距离-
pallet.autoTransLenYdoubleY自动平移距离-
pallet.customobject自定义参数(同上)-
json
{
    "robot": 1,
    "craftID": 1,
    "graphic": 1,
    "pallet": {
        "graphicType": 3,
        "transLenX": 2.2,
        "transLenY": -3.3,
        "autoTransLenX": 4.4,
        "autoTransLenY": 5.5,
        "custom": {
            "sum": 20,
            "start": 1,
            "count": 10,
            "eachVec": [
                {
                    "X": 0,
                    "Y": 0,
                    "t": 0,
                    "dir": 0,
                    "h": 0
                }
            ]
        }
    }
}

7.6 上位机请求平面模式预览

命令字: 0x8065

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
graphicint图形编号[1,9]
json
{
    "robot": 1,
    "craftID": 1,
    "graphic": 1
}

7.7 控制器返回平面模式预览参数

命令字: 0x8066

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
graphicint图形编号[1,9]
pallet.workpieceLengthint每个工件的长度[0,9999]mm
pallet.workpieceWidthint每个工件的宽度[0,9999]mm
pallet.sumint层工件总数-
pallet.startint开始发送的工件号-
pallet.countint发送给控制器的层工件数,每次发送最大为10-
pallet.tray.xdouble托盘x坐标-
pallet.tray.ydouble托盘y坐标-
pallet.eachVec[].XdoubleX偏移[-9999,9999]mm
pallet.eachVec[].YdoubleY偏移[-9999,9999]mm
pallet.eachVec[].tdouble旋转角[-180,180]
json
{
    "robot": 1,
    "craftID": 1,
    "graphic": 1,
    "pallet": {
        "workpieceLength": 1,
        "workpieceWidth": 1,
        "sum": 20,
        "start": 1,
        "count": 10,
        "tray": {
            "x": 0.0,
            "y": 0.0
        },
        "eachVec": [
            {
                "X": 0,
                "Y": 0,
                "t": 0
            }
        ]
    }
}

7.8 查询完整码垛平面模式自动计算结果

命令字: 0x806A

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
json
{
    "robot": 1,
    "craftID": 1
}

7.9 控制器返回完整码垛平面模式自动计算结果

命令字: 0x806B

参数名类型说明
pallet.ranks.numXintX方向个数
pallet.ranks.numYintY方向个数
json
{
    "pallet": {
        "ranks": {
            "numX": 0,
            "numY": 0
        }
    }
}

7.10 平面模式自定义模式预览(不保存参数和结果)

命令字: 0x8067

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
graphicint图形编号[1,9]
pallet.workpieceLengthint每个工件的长度[0,9999]mm
pallet.workpieceWidthint每个工件的宽度[0,9999]mm
pallet.sumint层工件总数-
pallet.startint开始发送的工件号-
pallet.countint发送给控制器的层工件数,每次发送最大为10-
pallet.tray.xdouble托盘x坐标-
pallet.tray.ydouble托盘y坐标-
pallet.eachVec[].XdoubleX偏移[-9999,9999]mm
pallet.eachVec[].YdoubleY偏移[-9999,9999]mm
pallet.eachVec[].tdouble旋转角[-180,180]
json
{
    "robot": 1,
    "craftID": 1,
    "graphic": 1,
    "pallet": {
        "workpieceLength": 1,
        "workpieceWidth": 1,
        "sum": 20,
        "start": 1,
        "count": 10,
        "tray": {
            "x": 0.0,
            "y": 0.0
        },
        "eachVec": [
            {
                "X": 0,
                "Y": 0,
                "t": 0
            }
        ]
    }
}

7.11 控制器返回平面模式自定义模式预览

命令字: 0x8068

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
graphicint图形编号[1,9]
pallet.workpieceLengthint每个工件的长度[0,9999]mm
pallet.workpieceWidthint每个工件的宽度[0,9999]mm
pallet.sumint层工件总数-
pallet.startint开始发送的工件号-
pallet.countint发送给控制器的层工件数,每次发送最大为10-
pallet.tray.xdouble托盘x坐标-
pallet.tray.ydouble托盘y坐标-
pallet.eachVec[].XdoubleX偏移[-9999,9999]mm
pallet.eachVec[].YdoubleY偏移[-9999,9999]mm
pallet.eachVec[].tdouble旋转角[-180,180]
json
{
    "robot": 1,
    "craftID": 1,
    "graphic": 1,
    "pallet": {
        "workpieceLength": 1,
        "workpieceWidth": 1,
        "sum": 20,
        "start": 1,
        "count": 10,
        "tray": {
            "x": 0.0,
            "y": 0.0
        },
        "eachVec": [
            {
                "X": 0,
                "Y": 0,
                "t": 0
            }
        ]
    }
}

8 复制层图形参数

8.1 复制层图形参数

命令字: 0x8069

参数名类型说明取值范围
robotint当前机器人[1,4]
craftID_sourceint要复制的工艺号-
craftID_targetint复制到的工艺号-
graphic_sourceint要复制的图形层-
graphic_targetint复制到的图形层-
json
{
    "robot": 1,
    "craftID_source": 1,
    "craftID_target": 2,
    "graphic_source": 1,
    "graphic_target": 2
}

9 码垛状态

9.1 设置码垛状态

命令字: 0x80A0

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
graphicint图形编号[1,9]
pallet.curLayerNumint当前层数-
pallet.curLayerPalletedWpNumint当前层已码工件数-
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "curLayerNum": 1,
        "curLayerPalletedWpNum": 5
    }
}

9.2 上位机查询码垛状态

命令字: 0x80A1

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
json
{
    "robot": 1,
    "craftID": 1
}

9.3 控制器返回码垛状态

命令字: 0x80A2

参数名类型说明
robotint当前机器人
craftIDint工艺号
graphicint图形编号
pallet.totalWpNumint总工件数
pallet.totalLayerNumint总层数
pallet.curPalletedWpSumint当前已码总工件数
pallet.curLayerNumint当前层数
pallet.curLayerPalletedWpNumint当前层已码工件数
pallet.curLayerWpSumint当前层总工件数
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "totalWpNum": 20,
        "totalLayerNum": 2,
        "curPalletedWpSum": 5,
        "curLayerNum": 1,
        "curLayerPalletedWpNum": 5,
        "curLayerWpSum": 10
    }
}

10 码垛类型

10.1 上位机切换使用码垛类型

命令字: 0x80B2

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
usePalletTypeint码垛类型0:简易, 1:完整, 2:未定义
craftNotestring标记-
json
{
    "robot": 1,
    "craftID": 1,
    "usePalletType": 0,
    "craftNote": ""
}

10.2 上位机查询当前使用码垛类型

命令字: 0x80B3

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
json
{
    "robot": 1,
    "craftID": 1
}

10.3 控制器返回当前使用码垛类型

命令字: 0x80B4

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
usePalletTypeint码垛类型0:简易, 1:完整, 2:未定义
craftNotestring标记-
json
{
    "robot": 1,
    "craftID": 1,
    "usePalletType": 0,
    "craftNote": ""
}

11 简易码垛

11.1 设置简易码垛位置

命令字: 0x80C0

参数名类型说明
robotint当前机器人
craftIDint工艺号
Oarray工件起始点,直角坐标系下的末端位姿
Xarray列末端,直角坐标系下的末端位姿
Yarray行末端,直角坐标系下的末端位姿
shiftarray辅助点,直角坐标系下的末端位姿
enterarray入口点,直角坐标系下的末端位姿
numXint行数
numYint列数
numZint层数
useAcrossCornerbool是否使用对角末端,true:是, false:否
json
{
    "robot": 1,
    "craftID": 1,
    "O": [1, 2, 3, 4, 5, 6],
    "X": [1, 2, 3, 4, 5, 6],
    "Y": [1, 2, 3, 4, 5, 6],
    "shift": [1, 2, 3, 4, 5, 6],
    "enter": [1, 2, 3, 4, 5, 6],
    "numX": 1,
    "numY": 1,
    "numZ": 1,
    "useAcrossCorner": true
}

11.2 上位机查询简易码垛位置

命令字: 0x80C1

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
json
{
    "robot": 1,
    "craftID": 1
}

11.3 控制器返回简易码垛位置

命令字: 0x80C2

参数名类型说明
robotint当前机器人
craftIDint工艺号
Oarray工件起始点(弧度制)
ODegarray工件起始点(角度制)
Xarray列末端(弧度制)
XDegarray列末端(角度制)
Yarray行末端(弧度制)
YDegarray行末端(角度制)
shiftarray辅助点(弧度制)
shiftDegarray辅助点(角度制)
enterarray入口点(弧度制)
enterDegarray入口点(角度制)
acrossCornerarray对角末端(弧度制)
acrossCornerDegarray对角末端(角度制)
numXint行数
numYint列数
numZint层数
json
{
    "robot": 1,
    "craftID": 1,
    "O": [1, 2, 3, 4, 5, 6],
    "ODeg": [1, 2, 3, 4, 5, 6],
    "X": [1, 2, 3, 4, 5, 6],
    "XDeg": [1, 2, 3, 4, 5, 6],
    "Y": [1, 2, 3, 4, 5, 6],
    "YDeg": [1, 2, 3, 4, 5, 6],
    "shift": [1, 2, 3, 4, 5, 6],
    "shiftDeg": [1, 2, 3, 4, 5, 6],
    "enter": [1, 2, 3, 4, 5, 6],
    "enterDeg": [1, 2, 3, 4, 5, 6],
    "acrossCorner": [1, 2, 3, 4, 5, 6],
    "acrossCornerDeg": [1, 2, 3, 4, 5, 6],
    "numX": 1,
    "numY": 1,
    "numZ": 1
}

11.4 设置简易码垛抓手参数

命令字: 0x80C3

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
pallet.gripperNumint抓手个数[1,4]
pallet.gripperarray抓手工具号数组-
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "gripperNum": 4,
        "gripper": [1, 3, 4, 1]
    }
}

11.5 上位机查询简易码垛抓手参数

命令字: 0x80C4

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
json
{
    "robot": 1,
    "craftID": 1
}

11.6 控制器返回简易码垛抓手参数

命令字: 0x80C5

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
pallet.gripperNumint抓手个数[1,4]
pallet.gripperarray抓手工具号数组-
json
{
    "robot": 1,
    "craftID": 1,
    "pallet": {
        "gripperNum": 4,
        "gripper": [1, 3, 4, 1]
    }
}

12 码垛复位

12.1 码垛复位

命令字: 0x80A3

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
gripperint抓手工具号[1,9]
json
{
    "robot": 1,
    "craftID": 1
}

13 复制与清空

13.1 复制码垛参数

命令字: 0x80B0

参数名类型说明取值范围
robotint当前机器人[1,4]
craftID_sourceint要复制的工艺号-
craftID_targetint复制到的工艺号-
json
{
    "robot": 1,
    "craftID_source": 1,
    "craftID_target": 2
}

13.2 清空码垛参数

命令字: 0x80B1

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
json
{
    "robot": 1,
    "craftID": 1
}

14 点位调试界面

14.1 上位机获取当前层全部工件数据

命令字: 0x8080

参数名类型说明取值范围
robotint当前机器人[1,4]
craftint工艺号-
layerint当前层-
clearint是否清空缓存,1:清空缓存, 0:不清-
json
{
    "robot": 1,
    "craft": 1,
    "layer": 1,
    "clear": 0
}

14.2 控制器回复当前层全部工件数据

命令字: 0x8081

参数名类型说明
robotint当前机器人
craftint工艺号
layerint当前层
sumLayerint总层数
length.Lint
length.Wint
overLimit.overint0:无超限, 1:入口点超限, 2:辅助点超限, 3:工件点超限
overLimit.layerint超限层
overLimit.numint超限工件号
pallet.sumint层工件总数
pallet.countint发送给控制器的层工件数
pallet.startint开始发送的工件号
pallet.tray_lengthdouble托盘长
pallet.tray_widthdouble托盘宽
pallet.tray.xdouble托盘x坐标
pallet.tray.ydouble托盘y坐标
pallet.eachVec[].XdoubleX坐标
pallet.eachVec[].YdoubleY坐标
pallet.eachVec[].ZdoubleZ坐标
pallet.eachVec[].tdouble旋转角
pallet.eachVec[].overint0:无超限, 1:入口点不可达, 2:辅助点不可达, 3:工件点不可达
json
{
    "robot": 1,
    "craft": 1,
    "layer": 1,
    "sumLayer": 10,
    "length": {
        "L": 10,
        "W": 10
    },
    "overLimit": {
        "over": 1,
        "layer": 1,
        "num": 2
    },
    "pallet": {
        "sum": 25,
        "count": 10,
        "start": 1,
        "tray_length": 5,
        "tray_width": 5,
        "tray": {
            "x": 0,
            "y": 0
        },
        "eachVec": [
            {
                "X": 0,
                "Y": 0,
                "Z": 0,
                "t": 0,
                "over": 0
            }
        ]
    }
}

14.3 码垛工艺号查询

命令字: 0x8082

参数名类型说明取值范围
robotint当前机器人[1,4]
craftint工艺号-
json
{
    "robot": 1,
    "craft": 1
}

14.4 控制器回复码垛工艺号查询结果

命令字: 0x8083

参数名类型说明
robotint当前机器人
craftint工艺号
_palletNumIsTooMorebool码垛数量是否过多
json
{
    "robot": 1,
    "craft": 1,
    "_palletNumIsTooMore": true
}

14.5 上位机获取抓手对应工具手

命令字: 0x808B

参数名类型说明取值范围
robotint当前机器人[1,4]
craftint工艺号-
gripperint抓手号-
json
{
    "robot": 1,
    "craft": 1,
    "gripper": 1
}

14.6 控制器返回

命令字: 0x808C

参数名类型说明取值范围
robotint当前机器人[1,4]
craftint工艺号-
toolint工具手号-
json
{
    "robot": 1,
    "craft": 1,
    "tool": 1
}

14.7 上位机设置整体偏移

命令字: 0x8084

参数名类型说明取值范围
robotint当前机器人[1,4]
craftint工艺号-
layerint当前层-
transLenXdoubleX偏移-
transLenYdoubleY偏移-
transLenZdoubleZ偏移-
rotationAngledouble偏移角度-
json
{
    "robot": 1,
    "craft": 1,
    "layer": 1,
    "transLenX": 0,
    "transLenY": 0,
    "transLenZ": 0,
    "rotationAngle": 0
}

14.8 应用到相同层

命令字: 0x8085

参数名类型说明取值范围
robotint当前机器人[1,4]
craftint工艺号-
layerint-
json
{
    "robot": 1,
    "craft": 1,
    "layer": 1
}

14.9 修改单个工件位置

命令字: 0x8086

参数名类型说明取值范围
robotint当前机器人[1,4]
craftint工艺号-
layerint-
numint当前工件-
modeint设置方式0:直接设置xyz, 1:使用机器人当前位置
XdoubleX偏移[-9999,9999]mm
YdoubleY偏移[-9999,9999]mm
ZdoubleZ偏移[-9999,9999]mm
angledouble旋转角[-180,180]
json
{
    "robot": 1,
    "craft": 1,
    "layer": 1,
    "num": 1,
    "mode": 0,
    "X": 0.1,
    "Y": 0.1,
    "Z": 0.1,
    "angle": 0
}

14.10 获取单个工件位置

命令字: 0x8087

参数名类型说明取值范围
robotint当前机器人[1,4]
craftint工艺号-
layerint-
numint当前工件-
json
{
    "robot": 1,
    "craft": 1,
    "layer": 1,
    "num": 1
}

14.11 控制器回复单个工件位置

命令字: 0x8088

参数名类型说明
ApproachModeint接近方式
DepartureSpeeddouble离开速度
EntryConfigurationint入口配置
EntrySpeeddouble接近速度
RealConfigurationint实际配置
ShiftConfigurationint辅助配置
XdoubleX坐标
YdoubleY坐标
ZdoubleZ坐标
craftint工艺号
layerint
numint当前工件
overint超限标志
overLimit.layerint超限层
overLimit.numint超限工件号
overLimit.overint超限类型
referenceint参考点
robotint当前机器人
tdouble旋转角
json
{
    "ApproachMode": 0,
    "DepartureSpeed": 0.0,
    "EntryConfiguration": 0,
    "EntrySpeed": 0.0,
    "RealConfiguration": 0,
    "ShiftConfiguration": 0,
    "X": 0.0,
    "Y": 0.0,
    "Z": 0.0,
    "craft": 7,
    "layer": 1,
    "num": 1,
    "over": 3,
    "overLimit": {
        "layer": 1,
        "num": 1,
        "over": 3
    },
    "reference": 1,
    "robot": 1,
    "t": 0.0
}

14.12 将点位调试内容从缓存保存到文件中

命令字: 0x8089

参数名类型说明取值范围
robotint当前机器人[1,4]
craftint工艺号-
gripperint抓手号-
json
{
    "robot": 1,
    "craft": 1,
    "gripper": 1
}

14.13 运动到工件点/辅助点/入口点

命令字: 0x808A

参数名类型说明取值范围
robotint当前机器人[1,4]
craftint工艺号-
layerint-
numint当前工件-
toolint工具手-
typeint运动到的点0:入口点, 1:辅助点, 2:工件点
json
{
    "robot": 1,
    "craft": 1,
    "layer": 1,
    "num": 1,
    "tool": 1,
    "type": 0
}

14.14 设置接近/离开方式

命令字: 0x80C7

参数名类型说明取值范围
robotint当前机器人[1,4]
craftIDint工艺号-
approMoveTypeint接近/离开方式-
json
{
    "robot": 1,
    "craftID": 1,
    "approMoveType": 1
}