激光切割工艺
本章介绍 RTL-24.03 协议中激光切割工艺(0x84xx)的通讯命令,包括激光 IO 端口、激光设备参数、模拟量匹配、切割参数、状态查询与手动操作。
所有命令均需携带
robot(机器人号)与工艺号(切割参数表号、编号等),未在表中列出的字段表示该命令不读写该字段。
激光 IO 端口
上位机设置激光 IO 端口
命令字: 0x8400
| 参数名 | 类型 | 说明 |
|---|---|---|
| IO.DO_backMiddle | int | 回中数字输出端口 |
| IO.DO_liftUp | int | 上抬数字输出端口 |
| IO.DO_follow | int | 跟随数字输出端口 |
| IO.DO_lightGate | int | 光闸数字输出端口 |
| IO.DO_aspiration | int | 吹气数字输出端口 |
| IO.DO_capacitance_ | int | 电容标定数字输出端口 |
| IO.DI_liftUpArrival | int | 停靠到位数字输入端口 |
| IO.DI_backMiddleArrival | int | 回中到位数字输入端口 |
| IO.DI_followArrival | int | 跟随到位数字输入端口 |
| IO.DI_perforateArrival | int | 穿孔到位数字输入端口 |
| IO.DI_capacitance_ | int | 电容标定数字输入端口 |
| IO.AO_pressure | int | 气压模拟量输出端口 |
| IO.AO_laserPower | int | 激光功率模拟量输出端口 |
| IO.pwm_port_ | int | 激光功率 PWM 端口:0 无,1 为 1-1,2 为 1-2 |
| shield_enable | bool | 屏蔽使能 |
| shield_time | int | 屏蔽时间 |
| input_port | int | 检查输入端口号 |
| input_value | int | 检查输入值 |
json
{
"IO": {
"DO_backMiddle": 1,
"DO_liftUp": 1,
"DO_follow": 1,
"DO_lightGate": 1,
"DO_aspiration": 1,
"DO_capacitance_": 1,
"DI_liftUpArrival": 1,
"DI_backMiddleArrival": 1,
"DI_followArrival": 1,
"DI_perforateArrival": 1,
"DI_capacitance_": 1,
"AO_pressure": 1,
"AO_laserPower": 1,
"pwm_port_": 1
}
}上位机查询激光 IO 端口
命令字: 0x8401
- 无需发送数据
控制器回复
命令字: 0x8402
返回字段同 0x8400,另增加 enable(bool,故障使能)与 pwm_size(PWM 大小)。
json
{
"IO": {
"DO_backMiddle": 1,
"DO_liftUp": 1,
"DO_follow": 1,
"DO_lightGate": 1,
"DO_aspiration": 1,
"DO_capacitance_": 1,
"DI_liftUpArrival": 1,
"DI_backMiddleArrival": 1,
"DI_followArrival": 1,
"DI_perforateArrival": 1,
"DI_capacitance_": 1,
"AO_pressure": 1,
"AO_laserPower": 1,
"pwm_port_": 1
}
}激光设备参数
上位机设置激光设备
命令字: 0x8403
| 参数名 | 类型 | 说明 |
|---|---|---|
| equipment.arrivalOutLightMode | int | 出光模式:0 到位出光,1 直接出光 |
| equipment.preAspiratedTime | double | 提前送气时间 |
| equipment.waitLiftUpTime | double | 等待上抬时间 |
| equipment.waitFollowTime | double | 等待跟随时间 |
| equipment.RetreatDistance | double | 回退距离 |
| equipment.delAspiratedMode | int | 关气模式:0 提前关气,1 延后关气 |
| equipment.delAspiratedTime | double | 提前 / 延后关气时间 |
| perforate.time | double | 穿孔时间 |
| perforate.pressure | double | 穿孔压力 |
| perforate.power | int | 穿孔功率 |
| perforate.freq | int | 穿孔频率 |
| perforate.dutyRatio | int | 穿孔占空比 |
json
{
"equipment": {
"arrivalOutLightMode": 1,
"preAspiratedTime": 1.0,
"waitLiftUpTime": 1.0,
"waitFollowTime": 1.0,
"RetreatDistance": 1.0,
"delAspiratedMode": 1,
"delAspiratedTime": 1.0
},
"perforate": {
"time": 1.0,
"pressure": 1.0,
"power": 1,
"freq": 1,
"dutyRatio": 1
}
}上位机查询激光设备
命令字: 0x8404
- 无需发送数据
控制器回复
命令字: 0x8405
返回字段同 0x8403。
激光模拟量匹配
上位机设置激光模拟量匹配
命令字: 0x8406
| 参数名 | 类型 | 说明 |
|---|---|---|
| analogMatch.laserPower.x1 | double | 激光功率匹配点 1 输入值 |
| analogMatch.laserPower.x2 | double | 激光功率匹配点 2 输入值 |
| analogMatch.laserPower.y1 | double | 激光功率匹配点 1 输出值 |
| analogMatch.laserPower.y2 | double | 激光功率匹配点 2 输出值 |
| analogMatch.pressure.x1 | double | 气压匹配点 1 输入值 |
| analogMatch.pressure.x2 | double | 气压匹配点 2 输入值 |
| analogMatch.pressure.y1 | double | 气压匹配点 1 输出值 |
| analogMatch.pressure.y2 | double | 气压匹配点 2 输出值 |
json
{
"analogMatch": {
"laserPower": {
"x1": 1.0,
"x2": 1.0,
"y1": 1.0,
"y2": 1.0
},
"pressure": {
"x1": 1.0,
"x2": 1.0,
"y1": 1.0,
"y2": 1.0
}
}
}上位机查询激光模拟量匹配
命令字: 0x8407
- 无需发送数据
控制器回复
命令字: 0x8408
返回字段同 0x8406,另增加 IO.laserPower(int,激光功率模拟量端口)与 IO.pressure(int,气压模拟量端口)。
激光实际电流电压
上位机设置激光实际电流电压
命令字: 0x8409
| 参数名 | 类型 | 取值范围 | 说明 |
|---|---|---|---|
| type | int | 1 / 2 | 类型:1 电流,2 电压 |
| value | double | [0,10] | 设定值 |
json
{
"type": 1,
"value": 1.0
}控制器回复
命令字: 0x840A
| 参数名 | 类型 | 说明 |
|---|---|---|
| result | int | 执行结果 |
json
{
"result": 1
}激光切割参数
上位机设置激光切割参数
命令字: 0x840B
| 参数名 | 类型 | 取值范围 | 说明 |
|---|---|---|---|
| num | int | [1,9] | 切割参数表号 |
| cut.pressure | double | - | 气压 |
| cut.power | double | - | 功率 |
| cut.freq | double | - | 频率 |
| cut.dutyRatio | double | - | 占空比 |
json
{
"num": 1,
"cut": {
"pressure": 1.0,
"power": 1.0,
"freq": 1.0,
"dutyRatio": 1.0
}
}上位机查询激光切割参数
命令字: 0x840C
| 参数名 | 类型 | 说明 |
|---|---|---|
| num | int | 切割参数表号 |
json
{
"num": 1
}控制器回复
命令字: 0x840D
| 参数名 | 类型 | 说明 |
|---|---|---|
| num | int | 切割参数表号 |
| cut.pressure | double | 气压 |
| cut.power | int | 功率 |
| cut.freq | int | 频率 |
| cut.dutyRatio | int | 占空比 |
json
{
"num": 1,
"cut": {
"pressure": 1.0,
"power": 1,
"freq": 1,
"dutyRatio": 1
}
}激光切割参数手动数据
命令字: 0x840E
上位机 → 控制器,手动下发点射参数与 IO 配置。
| 参数名 | 类型 | 说明 |
|---|---|---|
| shotPower | int | 点射功率 |
| shotTime | double | 点射时间 |
| shot_freq | int | 点射频率 |
| shot_duty_ratio | int | 点射占空比 |
| shot_air_pressure | double | 点射气压 |
| shot_gas_test_time | double | 气体检查时间 |
| pressure_detection | double | 切割气压检测值 |
| IO.* | object | 激光 IO 端口配置,字段同 0x8400 |
json
{
"shotPower": 1,
"shotTime": 1.0,
"shot_freq": 1,
"shot_duty_ratio": 1,
"shot_air_pressure": 1.0,
"shot_gas_test_time": 1.0,
"pressure_detection": 1.0,
"IO": {
"DO_backMiddle": 1,
"DO_liftUp": 1,
"DO_follow": 1,
"DO_lightGate": 1,
"DO_aspiration": 1,
"DO_capacitance_": 1,
"DI_liftUpArrival": 1,
"DI_backMiddleArrival": 1,
"DI_followArrival": 1,
"DI_perforateArrival": 1,
"DI_capacitance_": 1,
"AO_pressure": 1,
"AO_laserPower": 1,
"pwm_port_": 1
}
}激光状态
上位机查询激光状态
命令字: 0x8410
- 无需发送数据
控制器回复
命令字: 0x8411
| 参数名 | 类型 | 说明 |
|---|---|---|
| lightGateEnable | bool | 光闸使能 |
| liftUpArrival | bool | 停靠到位 |
| backMiddleArrival | bool | 回中到位 |
| followArrival | bool | 跟随到位 |
| perforateArrival | bool | 穿孔到位 |
| capacitance_result_ | int | 电容标定结果 |
| laserFault | bool | 激光器故障 |
| regulatorFault | bool | 调高器故障 |
| watercoolerFault | bool | 水冷机故障 |
| pressureFault | bool | 气压故障 |
| currentPressure | double | 当前气压 |
| currentPower | int | 当前功率 |
| currentFreq | int | 当前频率 |
| currentDutyRatio | int | 当前占空比 |
json
{
"lightGateEnable": true,
"liftUpArrival": true,
"backMiddleArrival": true,
"followArrival": true,
"perforateArrival": true,
"capacitance_result_": 1,
"laserFault": true,
"regulatorFault": true,
"watercoolerFault": true,
"pressureFault": true,
"currentPressure": 1.0,
"currentPower": 1,
"currentFreq": 1,
"currentDutyRatio": 1
}激光点射参数
上位机设置激光点射参数
命令字: 0x8412
| 参数名 | 类型 | 说明 |
|---|---|---|
| shotPower | int | 点射功率 |
| shotTime | double | 点射时间 |
| shot_freq | int | 点射频率 |
| shot_duty_ratio | int | 点射占空比 |
| shot_air_pressure | double | 点射气压 |
| shot_gas_test_time | double | 气体检查时间 |
| pressure_detection | double | 切割气压检测值 |
json
{
"shotPower": 1,
"shotTime": 1.0,
"shot_freq": 1,
"shot_duty_ratio": 1,
"shot_air_pressure": 1.0,
"shot_gas_test_time": 1.0,
"pressure_detection": 1.0
}激光手动操作
上位机设置激光手动操作
命令字: 0x8413
| 参数名 | 类型 | 取值范围 | 说明 |
|---|---|---|---|
| type | int | [1,7] | 操作类型(光闸、吹气、上抬、回中、跟随、点射、气体检查) |
| value | int | 0 / 1 | 0 关闭,1 打开 |
json
{
"type": 1,
"value": 1
}上位机查询激光手动操作
命令字: 0x8414
- 无需发送数据
控制器回复
命令字: 0x8415
| 参数名 | 类型 | 说明 |
|---|---|---|
| lightGate | bool | 光闸状态 |
| aspiration | bool | 吹气状态 |
| liftUp | bool | 上抬状态 |
| backMiddle | bool | 回中状态 |
| follow | bool | 跟随状态 |
| shotPower | int | 点射功率 |
| shotTime | double | 点射时间 |
| shot_freq | int | 点射频率 |
| shot_duty_ratio | int | 点射占空比 |
| shot_air_pressure | double | 点射气压 |
| shot_gas_test_time | double | 气体检查时间 |
| pressure_detection | double | 切割气压检测值 |
| max_matched_air_pressure | double | 最大匹配气压 |
json
{
"shotPower": 1,
"shotTime": 1.0,
"shot_freq": 1,
"shot_duty_ratio": 1,
"shot_air_pressure": 1.0,
"shot_gas_test_time": 1.0,
"pressure_detection": 1.0,
"max_matched_air_pressure": 1.0
}激光脉冲输出
上位机设置激光脉冲输出
命令字: 0x8416
| 参数名 | 类型 | 说明 |
|---|---|---|
| num | uint | 编号 |
| type | int | 类型 |
| enable | bool | 使能 |
json
{
"num": 1,
"type": 1,
"enable": true
}上位机查询激光脉冲输出
命令字: 0x8417
- 无需发送数据
控制器回复
命令字: 0x8418
| 参数名 | 类型 | 说明 |
|---|---|---|
| freqEnable | bool | 频率使能 |
| dutyRatioEnable | bool | 占空比使能 |
json
{
"freqEnable": true,
"dutyRatioEnable": true
}激光速度功率
上位机设置激光速度功率
命令字: 0x8419
| 参数名 | 类型 | 说明 |
|---|---|---|
| speedPower[].cuttingSpeed | double | 切割速度 |
| speedPower[].laserFreq | int | 对应激光频率 |
| speedPower[].dutyRatio | int | 对应占空比 |
json
{
"speedPower": [
{
"cuttingSpeed": 1.0,
"laserFreq": 1,
"dutyRatio": 1
}
]
}上位机查询激光速度功率
命令字: 0x841A
- 无需发送数据
控制器回复
命令字: 0x841B
| 参数名 | 类型 | 说明 |
|---|---|---|
| speedPower[].cuttingSpeed | double | 切割速度 |
| speedPower[].laserFreq | int | 对应激光频率 |
| speedPower[].dutyRatio | int | 对应占空比 |
json
{
"speedPower": [
{
"cuttingSpeed": 1.0,
"laserFreq": 1,
"dutyRatio": 1
}
]
}