#include "error.h" #include "comm/protocol.h" #include #define CASE_OP(cd, str) \ {\ case cd:\ errinfo = str;\ break;\ } #define ERR_NONE 0x0000 // 没有错误 #define ERR_NO_POWER 0x0001 // 没有上电 #define ERR_NO_AIR 0x0002 // 气压不足 #define ERR_NOT_SAFE 0x0003 // 安全区域介入 #define ERR_EXPIRATION 0x0004 // 使用时限已到 #define ERR_DRIVER 0x0005 // 驱动器报警 #define ERR_FILL_DATA 0x0006 // 填充数据错误 #define ERR_NOT_ALLOWED 0x0007 // 不允许工作状态 #define ERR_CTRL_ERR 0x0008 // 控制错误 #define ERR_FPGA_ERR 0x0009 // FPGA软件版本错误 #define ERR_BUTTON_NOUP 0x000A // 等待按钮抬起超时 #define ERR_FPGA_RESET 0x000B // FPGA复位错误 #define ERR_NO_READY 0x000C // 外设未就绪 #define ERR_NO_SEND_ERR 0x000D // 传输数据错误 #define ERR_EDTION_ERR 0x000E // 程序版本错误 #define ERR_WORK_DONE 0x000F // 完成产量 #define ERR_LMT_POSITIVE 0x0010 // 正向限位 #define ERR_LMT_NEGATIVE 0x0011 // 反向限位 #define ERR_RUN_ALM 0x0012 // 运动报警 #define ERR_RUN_LIMIT 0x0013 // 运动限位 #define ERR_RUN_EMS 0x0014 // 运动急停 #define ERR_MV_PARA 0x0015 // 运动参数错误 #define ERR_MC_PARA 0x0016 // 机器参数错误 #define ERR_IN_PARA 0x0017 // 输入参数错误 #define ERR_FPGA_HARD_ERR 0x0018 // FPGA硬件版本错误 #define ERR_NOT_WORKSTA 0x001A // 不能工作状态 #define ERR_NOT_MOVESTA 0x001B // 禁止移框状态 #define ERR_NOFAM_ZERO 0x001C // 归零前需要卸下模板 #define ERR_NO_ADDAIR 0x001D // 没有加气 #define ERR_MTZ_RIGHT 0x001F // 归零成功 #define ERR_MTZ_ERROR 0x0020 // 归零错误 #define ERR_COOR_SYSTM 0x0021 // 坐标系统错误 #define ERR_OUT_RANGE 0x0022 // 目标位置越界 #define ERR_X_LIT_POSI 0x0023 // X正向限位 #define ERR_X_LIT_NEGA 0x0024 // X反向限位 #define ERR_Y_LIT_POSI 0x0025 // Y正向限位 #define ERR_Y_LIT_NEGA 0x0026 // Y反向限位 #define ERR_FEED_MANUAL 0x0027 // 进料处于手动状态 #define ERR_MC_MANUAL 0x0028 // 机器处于手动状态 #define ERR_KEY_SW_OFF 0x0029 // 机器钥匙开关关闭 #define ERR_ALM_WATERTANK 0x002A // 水箱报警 #define ERR_ALM_COVEROPEN 0x002B // 开盖报警 #define ERR_LIGHTCURTAINS1 0x002C // 光幕1介入 #define ERR_LIGHTCURTAINS2 0x002D // 光幕2介入 #define ERR_AIR_POWER 0x002E // 气压不足 #define ERR_PRESS_SENSOR 0x002F // 压料传感器错误 #define ERR_CLIP_SENSOR 0x0030 // 夹布传感器错误 #define ERR_NO_MATERIEL 0x0031 // 缺料报警 #define ERR_CUTFRAME 0x0032 // 边框切割错误 #define ERR_MC_AUTO 0x0033 // 机器处于自动状态 #define ERR_DOOR_TIMEOUT 0x0034 // 开关门超时 #define ERR_NOT_AT_OFFSET 0x0035 // 不在偏移点 #define ERR_NO_PHOTO_FILE 0x0036 // 没有拍照文件 #define ERR_FEED_AUTO 0x0037 // 进料处于自动状态 #define ERR_GANTRY_NOT_POS 0x0038 // 龙门不到位 #define ERR_GUARDRAIL_OPEN 0x0039 // 安全门未关闭 #define ERR_LIGHTCURTAINS3 0x003A // 光幕3介入 #define ERR_LIGHTCURTAINS4 0x003B // 光幕4介入 #define ERR_PRINT_ERROR 0x003C // 喷墨异常 #define ERR_PRINT_NOT_AT_BAK 0x003D // 喷墨不在停止位置 #define ERR_LOAD_EMPTY 0x003E // 上料储料空料 #define ERR_RECV_FULL 0x003F // 收料储料满料 #define ERR_NO_DATA 0x0040 // 无数据 #define ERR_DATA_ERROR 0x0041 // 数据错误 #define ERR_GRAPH_OUT_RANGE 0x0042 // 图形超出范围 #define ERR_CUTTER2_ERROR 0x0043 // 切割机2故障 #define ERR_PHOTO_ERROR 0x0044 // 拍照识别错误 #define ERR_CUT_RANGE_OVERFLOW 0x0045 // 切割范围重叠 #define ERR_CUTTER1_ERROR 0x0046 // 切割机1故障 #define ERR_CUTTER1_CLEERR 0x0047 // 切割机1故障 失效 #define ERR_CUTTER2_CLEERR 0x0048 // 切割机2故障 失效 #define ERR_CUTTER_WASTE 0x0049 // 切割机废料 #define ERR_INPUT_EDGE 0x004A // 进料偏移 #define ERR_INPUT_TIMEOUT 0x004B // 进料超时 #define ERR_EDGE_TBREAK 0x004E // 边缝机头断线 #define ERR_CHANGE_MAR 0x004F // 更换料盘 #define ERR_MS_NOT_ZERO 0x0050 // 主轴不在零位 #define ERR_HK_NOT_ZERO 0x0051 // 旋梭不在零位 #define ERR_MS_NOT_SYNC 0x0052 // 针梭不同步 #define ERR_RO_NOT_SYNC 0x0053 // 旋转不同步 #define ERR_CUTTER_NOT_POS 0x0054 // 剪刀不在回位(注:该报错码是缝纫剪刀) #define ERR_HEAD_NOT_HIGH 0x0055 // 机头不在高位 #define ERR_HEAD_NOT_LOW 0x0056 // 机头不在低位 #define ERR_LIGHTCURTAINS 0x0057 // 光幕介入 #define ERR_UPER_TBREAK 0x0058 // 面线断线 #define ERR_BOBBIN_TBREAK 0x0059 // 底线断线 #define ERR_NEEDLE_NOT_HIGH 0x005A // 机针不在高位 #define ERR_SEND_N1CMD_TIMOUT 0x005B // 发送主轴命令超时 #define ERR_SEND_N1CMD_FAIL 0x005C // 发送主轴命令失败 #define ERR_TRANS_TIMEOUT 0x005D // 执行命令超时 #define ERR_NOT_AT_POS 0x005E // 模版不到位 #define ERR_LIFT_TIMEOUT 0x005F // 机头升降超时 #define ERR_HEAD_NOT_SAFE 0x0060 // 机头不在安全区域 #define ERR_HD1_ND_NOT_ZERO 0x0061 // 机头1针不在零位 #define ERR_HD2_ND_NOT_ZERO 0x0062 // 机头2针不在零位 #define ERR_HD3_ND_NOT_ZERO 0x0063 // 机头3针不在零位 #define ERR_HD4_ND_NOT_ZERO 0x0064 // 机头4针不在零位 #define ERR_HD5_ND_NOT_ZERO 0x0065 // 机头5针不在零位 #define ERR_HD6_ND_NOT_ZERO 0x0066 // 机头6针不在零位 #define ERR_HD7_ND_NOT_ZERO 0x0067 // 机头7针不在零位 #define ERR_HD8_ND_NOT_ZERO 0x0068 // 机头8针不在零位 #define ERR_HD9_ND_NOT_ZERO 0x0069 // 机头9针不在零位 #define ERR_HD1_CUTTER_NOT_POS 0x0071 // 机头1剪刀不在回位 #define ERR_HD2_CUTTER_NOT_POS 0x0072 // 机头2剪刀不在回位 #define ERR_HD3_CUTTER_NOT_POS 0x0073 // 机头3剪刀不在回位 #define ERR_HD4_CUTTER_NOT_POS 0x0074 // 机头4剪刀不在回位 #define ERR_HD5_CUTTER_NOT_POS 0x0075 // 机头5剪刀不在回位 #define ERR_HD6_CUTTER_NOT_POS 0x0076 // 机头6剪刀不在回位 #define ERR_HD7_CUTTER_NOT_POS 0x0077 // 机头7剪刀不在回位 #define ERR_HD8_CUTTER_NOT_POS 0x0078 // 机头8剪刀不在回位 #define ERR_HD9_CUTTER_NOT_POS 0x0079 // 机头9剪刀不在回位 #define ERR_PUNCH_NOT_ZERO 0x0080 // 冲孔主轴不在零位 #define ERR_R_LIT_POSI 0x0081 // 旋转正向限位 #define ERR_R_LIT_NEGA 0x0082 // 旋转反向限位 #define ERR_PUNCH2_NOT_ZERO 0x0083 // 冲孔2主轴不在零位 #define ERR_CUTTER_NOT_ZERO 0x0084 // 裁刀主轴不在零位 #define ERR_XY_NOT_WP 0x0085 // XY不在工作位置 #define ERR_HEAD_NOT_POS 0x0086 // 机头不到位 #define ERR_X2_LIT_POSI 0x0087 // X2正向限位 #define ERR_X2_LIT_NEGA 0x0088 // X2反向限位 #define ERR_Y2_LIT_POSI 0x0089 // Y2正向限位 #define ERR_Y2_LIT_NEGA 0x008A // Y2反向限位 #define ERR_PRESS_NOT_POS 0x008B // 压料龙门不到位 #define ERR_PRESS_LIFT_TIMOUT 0x008C // 压料升降超时 #define ERR_PRESS_LIFT_NOT_POS 0x008D // 压料升降不到位 #define ERR_TO_ZERO_TIMOUT 0x008E // 等待运动结束超时 #define ERR_MOVE_POS_ERR 0x008F // 移动位置错误 #define ERR_CLUTH_TIMOUT 0x0090 // 等待离合超时 #define ERR_CLUTH1_NOT_POS 0x0091 // 机头1离合不到位 #define ERR_CLUTH2_NOT_POS 0x0092 // 机头2离合不到位 #define ERR_FEED_ROLLER 0x0200 // 进料压辊 异常 #define ERR_DIS_ROLLER 0x0201 // 出料压辊 异常 #define ERR_DIS_MATERIAL 0x0202 // 出料压料 异常 #define ERR_TENS_DEVICE 0x0203 // 张紧装置 异常 #define ERR_CLOTH_DEVICE 0x0204 // 夹布装置 异常 #define ERR_EDGE_MOTOR 0x0205 // 边切电机 阻塞 #define ERR_CROSS_MOTOR 0x0206 // 横切电机 异常 #define ERR_FCLAMP_LIFT 0x0207 // 前夹升降气缸 异常 #define ERR_FCLAMP_OPCL 0x0208 // 前夹开合气缸 异常 #define ERR_PULL_CLAMP 0x0209 // 机械手上夹气缸 异常 #define ERR_PULL_CLIP 0x020A // 机械手下夹气缸 异常 #define ERR_YZR_NOT_SYNC 0x020B // 右框电机不同步 #define ERR_CHIP_ERROR 0x020C // 夹线装置位置 异常 #define ERR_FIXTURE1_ERROR 0x020D // 工装1传感器错误 #define ERR_FIXTURE2_ERROR 0x020E // 工装2传感器错误 #define ERR_CLASH_ERROR 0x020F // 工装防撞未就绪 #define ERR_NW_NOT_POS 0x0210 // 近端压轮升降不到位 #define ERR_FW_NOT_POS 0x0211 // 远端压轮升降不到位 #define ERR_SENDGIVE_NOT_POS 0x0212 // 送边条气缸不到位 #define ERR_FPHD_NOT_POS 0x0213 // 机头伸缩不到位 #define ERR_INPRESS_ERR 0x0214 // 里压料气缸 异常 #define ERR_OUTPRESS_ERR 0x0215 // 外压料气缸 异常 #define ERR_TENS_AND_CLOTH 0x0216 // 当前夹布和张紧位置不允许移动机头 #define ERR_RETURN_LIFT 0x0217 // 退料升降装置 异常 #define ERR_CLOTH_EMPTY 0x0218 // 送边条装置缺料 #define ERR_CHB_SWAY 0x0219 // 换梭摆动装置 异常 #define ERR_CHB_PUSH 0x021A // 换梭推动装置 异常 #define ERR_CHB_ROTATE 0x021B // 换梭旋转装置 异常 #define ERR_CHB_SHUT 0x021C // 梭壳检测 异常 #define ERR_XP_LIT_POSI 0x021D // XP正向限位 #define ERR_XP_LIT_NEGA 0x021E // XP反向限位 #define ERR_YP_LIT_POSI 0x021F // YP正向限位 #define ERR_YP_LIT_NEGA 0x0220 // YP反向限位 #define ERR_1UP_SEND_C 0x0221 // 送压布条1上气缸 异常 #define ERR_1UP_PUSH_S 0x0222 // 压布条1上气缸 异常 #define ERR_1UP_SEND_P 0x0223 // 送内压布1上气缸 异常 #define ERR_1UP_PUSH_C 0x0224 // 压布1上气缸 异常 #define ERR_1UP_IN_PUSH_C 0x0225 // 内压布1上气缸 异常 #define ERR_1DW_SEND_C 0x0226 // 送压布条1下气缸 异常 #define ERR_1DW_PUSH_S 0x0227 // 压布条1下气缸 异常 #define ERR_1DW_SEND_P 0x0228 // 送内压布1下气缸 异常 #define ERR_1DW_PUSH_C 0x0229 // 压布1下气缸 异常 #define ERR_1DW_IN_PUSH_C 0x022A // 内压布1下气缸 异常 #define ERR_TENS1_ERR 0x022B // 张力传感器1通讯 异常 #define ERR_TENS2_ERR 0x022C // 张力传感器2通讯 异常 #define ERR_FEED_LIMT 0x022D // 上料架对边限位 #define ERR_IN_WAIT_AREA 0x022E // 进入等待区域 #define ERR_HOT_LINE 0x022F // 烫线气缸未到位 #define ERR_CHB_SPIN 0x0230 // 换梭旋转装置 异常 #define ERR_CHB_DPUSH 0x0231 // 换梭扣线伸缩装置 异常 #define ERR_PUNCH3_NOT_ZERO 0x0232 // 冲孔3主轴不在零位 #define ERR_PUNCH4_NOT_ZERO 0x0233 // 冲孔4主轴不在零位 #define ERR_CUT_PRESS 0x0250 // 覆膜切料压杠装置 异常 #define ERR_LAMIN_FILM1 0x0251 // 覆膜夹膜装置1 异常 #define ERR_LAMIN_FILM2 0x0252 // 覆膜夹膜装置2 异常 #define ERR_FEED_EMP 0x0253 // 覆膜送料空位 异常 QString getErrStr(u32 code) { QString errinfo; errinfo.clear(); QString errorCode; errorCode.clear(); switch (code) { //通用的错误代码 CASE_OP(ERR_NONE, QObject::tr("no error")); // 没有错误 CASE_OP(ERR_NO_POWER, QObject::tr("no power")); // 没有上电 CASE_OP(ERR_NO_AIR, QObject::tr("insufficient air pressure"));// 气压不足 CASE_OP(ERR_NOT_SAFE, QObject::tr("safe area error")); // 安全区域介入 CASE_OP(ERR_EXPIRATION, QObject::tr("Expiration of use")); // 使用时限已到 CASE_OP(ERR_DRIVER, QObject::tr("Driver alarm")); // 驱动器报警 CASE_OP(ERR_FILL_DATA, QObject::tr("Fill data error")); // 填充数据错误 CASE_OP(ERR_NOT_ALLOWED, QObject::tr("Not allowed to work")); // 不允许工作状态 CASE_OP(ERR_CTRL_ERR, QObject::tr("Control error")); // 控制错误 CASE_OP(ERR_FPGA_ERR, QObject::tr("FPGA software version error"));// FPGA软件版本错误 CASE_OP(ERR_BUTTON_NOUP, QObject::tr("Button release timeout")); // 等待按钮抬起超时 CASE_OP(ERR_FPGA_RESET, QObject::tr("FPGA reset error")); // FPGA复位错误 CASE_OP(ERR_NO_READY, QObject::tr("Peripheral not ready")); // 外设未就绪 CASE_OP(ERR_NO_SEND_ERR, QObject::tr("Data transmission error")); // 传输数据错误 CASE_OP(ERR_EDTION_ERR, QObject::tr("Program version error")); // 程序版本错误 CASE_OP(ERR_WORK_DONE, QObject::tr("Work completed")); // 完成产量 CASE_OP(ERR_LMT_POSITIVE, QObject::tr("positive limit")); // 正向限位 CASE_OP(ERR_LMT_NEGATIVE, QObject::tr("negative limit")); // 反向限位 CASE_OP(ERR_RUN_ALM, QObject::tr("motion alarm")); // 运动报警 CASE_OP(ERR_RUN_LIMIT, QObject::tr("motion limit")); // 运动限位 CASE_OP(ERR_RUN_EMS, QObject::tr("motion emergency stop")); // 运动急停 CASE_OP(ERR_MV_PARA, QObject::tr("motion parameter error")); // 运动参数错误 CASE_OP(ERR_MC_PARA, QObject::tr("machine parameter error")); // 机器参数错误 CASE_OP(ERR_IN_PARA, QObject::tr("input parameter error")); // 输入参数错误 CASE_OP(ERR_FPGA_HARD_ERR, QObject::tr("FPGA hardware version error"));// FPGA硬件版本错误 CASE_OP(ERR_NOT_WORKSTA, QObject::tr("not allowed to work")); // 不能工作状态 CASE_OP(ERR_NOT_MOVESTA, QObject::tr("move frame prohibited")); // 禁止移框状态 CASE_OP(ERR_NOFAM_ZERO, QObject::tr("need to remove template before zeroing")); // 归零前需要卸下模板 CASE_OP(ERR_NO_ADDAIR, QObject::tr("No gas added")); // 没有加气 CASE_OP(ERR_MTZ_RIGHT, QObject::tr("zeroing successful")); // 归零成功 CASE_OP(ERR_MTZ_ERROR, QObject::tr("zeroing error")); // 归零错误 CASE_OP(ERR_COOR_SYSTM, QObject::tr("coordinate system error")); // 坐标系统错误 CASE_OP(ERR_OUT_RANGE, QObject::tr("target position out of range")); // 目标位置越界 CASE_OP(ERR_X_LIT_POSI, QObject::tr("X positive limit")); // X正向限位 CASE_OP(ERR_X_LIT_NEGA, QObject::tr("X negative limit")); // X反向限位 CASE_OP(ERR_Y_LIT_POSI, QObject::tr("Y positive limit")); // Y正向限位 CASE_OP(ERR_Y_LIT_NEGA, QObject::tr("Y negative limit")); // Y反向限位 CASE_OP(ERR_FEED_MANUAL, QObject::tr("feed in manual mode")); // 进料处于手动状态 CASE_OP(ERR_MC_MANUAL, QObject::tr("machine in manual mode")); // 机器处于手动状态 CASE_OP(ERR_KEY_SW_OFF, QObject::tr("key switch off")); // 机器钥匙开关关闭 CASE_OP(ERR_ALM_WATERTANK, QObject::tr("water tank alarm")); // 水箱报警 CASE_OP(ERR_ALM_COVEROPEN, QObject::tr("cover open alarm")); // 开盖报警 CASE_OP(ERR_LIGHTCURTAINS1, QObject::tr("light curtain 1 triggered")); // 光幕1介入 CASE_OP(ERR_LIGHTCURTAINS2, QObject::tr("light curtain 2 triggered")); // 光幕2介入 CASE_OP(ERR_AIR_POWER, QObject::tr("air pressure insufficient")); // 气压不足 CASE_OP(ERR_PRESS_SENSOR, QObject::tr("pressure sensor error")); // 压料传感器错误 CASE_OP(ERR_CLIP_SENSOR, QObject::tr("clip sensor error")); // 夹布传感器错误 CASE_OP(ERR_NO_MATERIEL, QObject::tr("material shortage alarm")); // 缺料报警 CASE_OP(ERR_CUTFRAME, QObject::tr("cut frame error")); // 边框切割错误 CASE_OP(ERR_MC_AUTO, QObject::tr("machine in auto mode")); // 机器处于自动状态 CASE_OP(ERR_DOOR_TIMEOUT, QObject::tr("door timeout")); // 开关门超时 CASE_OP(ERR_NOT_AT_OFFSET, QObject::tr("not at offset point")); // 不在偏移点 CASE_OP(ERR_NO_PHOTO_FILE, QObject::tr("no photo file")); // 没有拍照文件 CASE_OP(ERR_FEED_AUTO, QObject::tr("feed in auto mode")); // 进料处于自动状态 CASE_OP(ERR_GANTRY_NOT_POS, QObject::tr("gantry not in position")); // 龙门不到位 CASE_OP(ERR_GUARDRAIL_OPEN, QObject::tr("safety door not closed")); // 安全门未关闭 CASE_OP(ERR_LIGHTCURTAINS3, QObject::tr("light curtain 3 triggered")); // 光幕3介入 CASE_OP(ERR_LIGHTCURTAINS4, QObject::tr("light curtain 4 triggered")); // 光幕4介入 CASE_OP(ERR_PRINT_ERROR, QObject::tr("inkjet error")); // 喷墨异常 CASE_OP(ERR_PRINT_NOT_AT_BAK, QObject::tr("inkjet not at stop position")); // 喷墨不在停止位置 CASE_OP(ERR_LOAD_EMPTY, QObject::tr("loading storage empty")); // 上料储料空料 CASE_OP(ERR_RECV_FULL, QObject::tr("receiving storage full")); // 收料储料满料 CASE_OP(ERR_NO_DATA, QObject::tr("no data")); // 无数据 CASE_OP(ERR_DATA_ERROR, QObject::tr("data error")); // 数据错误 CASE_OP(ERR_PEN_TIMEOUT, QObject::tr("Brush lifting timeout")); // 画笔升降超时 CASE_OP(ERR_PENHAT_TIMEOUT, QObject::tr("Pen cap timeout")); // 画笔笔帽超时 CASE_OP(ERR_GRAPH_OUT_RANGE, QObject::tr("graphic out of range")); // 图形超出范围 CASE_OP(ERR_CUTTER2_ERROR, QObject::tr("cutter 2 error")); // 切割机2故障 CASE_OP(ERR_PHOTO_ERROR, QObject::tr("photo recognition error")); // 拍照识别错误 CASE_OP(ERR_CUT_RANGE_OVERFLOW, QObject::tr("cut range overlap")); // 切割范围重叠 CASE_OP(ERR_CUTTER1_ERROR, QObject::tr("cutter 1 error")); // 切割机1故障 CASE_OP(ERR_CUTTER1_CLEERR, QObject::tr("cutter 1 error invalid")); // 切割机1故障 失效 CASE_OP(ERR_CUTTER2_CLEERR, QObject::tr("cutter 2 error invalid")); // 切割机2故障 失效 CASE_OP(ERR_CUTTER_WASTE, QObject::tr("cutter waste")); // 切割机废料 CASE_OP(ERR_INPUT_EDGE, QObject::tr("feeding offset")); // 进料偏移 CASE_OP(ERR_INPUT_TIMEOUT, QObject::tr("feeding timeout")); // 进料超时 CASE_OP(ERR_EDGE_TBREAK, QObject::tr("edge machine head wire break")); // 边缝机头断线 CASE_OP(ERR_CHANGE_MAR, QObject::tr("material tray change")); // 更换料盘 CASE_OP(ERR_MS_NOT_ZERO, QObject::tr("spindle not at zero")); // 主轴不在零位 CASE_OP(ERR_HK_NOT_ZERO, QObject::tr("shuttle not at zero")); // 旋梭不在零位 CASE_OP(ERR_MS_NOT_SYNC, QObject::tr("needle and shuttle not synced")); // 针梭不同步 CASE_OP(ERR_RO_NOT_SYNC, QObject::tr("rotation not synced")); // 旋转不同步 CASE_OP(ERR_CUTTER_NOT_POS, QObject::tr("scissor not in position")); // 剪刀不在回位(缝纫剪刀) CASE_OP(ERR_HEAD_NOT_HIGH, QObject::tr("head not at high position")); // 机头不在高位 CASE_OP(ERR_HEAD_NOT_LOW, QObject::tr("head not at low position")); // 机头不在低位 CASE_OP(ERR_LIGHTCURTAINS, QObject::tr("light curtain triggered")); // 光幕介入 CASE_OP(ERR_UPER_TBREAK, QObject::tr("upper thread break")); // 面线断线 CASE_OP(ERR_BOBBIN_TBREAK, QObject::tr("bobbin thread break")); // 底线断线 CASE_OP(ERR_NEEDLE_NOT_HIGH, QObject::tr("needle not at high position")); // 机针不在高位 CASE_OP(ERR_SEND_N1CMD_TIMOUT, QObject::tr("send spindle command timeout")); // 发送主轴命令超时 CASE_OP(ERR_SEND_N1CMD_FAIL, QObject::tr("send spindle command failed")); // 发送主轴命令失败 CASE_OP(ERR_TRANS_TIMEOUT, QObject::tr("execute command timeout")); // 执行命令超时 CASE_OP(ERR_NOT_AT_POS, QObject::tr("template not in position")); // 模版不到位 CASE_OP(ERR_LIFT_TIMEOUT, QObject::tr("head lift timeout")); // 机头升降超时 CASE_OP(ERR_PUNCH_NOT_ZERO, QObject::tr("punch spindle not at zero")); // 冲孔主轴不在零位 CASE_OP(ERR_R_LIT_POSI, QObject::tr("rotation positive limit")); // 旋转正向限位 CASE_OP(ERR_R_LIT_NEGA, QObject::tr("rotation negative limit")); // 旋转反向限位 CASE_OP(ERR_PUNCH2_NOT_ZERO, QObject::tr("punch 2 spindle not at zero")); // 冲孔2主轴不在零位 CASE_OP(ERR_CUTTER_NOT_ZERO, QObject::tr("cutter spindle not at zero")); // 裁刀主轴不在零位 CASE_OP(ERR_XY_NOT_WP, QObject::tr("XY not at work position")); // XY不在工作位置 CASE_OP(ERR_HEAD_NOT_POS, QObject::tr("head not in position")); // 机头不到位 CASE_OP(ERR_X2_LIT_POSI, QObject::tr("X2 positive limit")); // X2正向限位 CASE_OP(ERR_X2_LIT_NEGA, QObject::tr("X2 negative limit")); // X2反向限位 CASE_OP(ERR_Y2_LIT_POSI, QObject::tr("Y2 positive limit")); // Y2正向限位 CASE_OP(ERR_Y2_LIT_NEGA, QObject::tr("Y2 negative limit")); // Y2反向限位 CASE_OP(ERR_PRESS_NOT_POS, QObject::tr("press gantry not in position")); // 压料龙门不到位 CASE_OP(ERR_PRESS_LIFT_TIMOUT, QObject::tr("press lift timeout")); // 压料升降超时 CASE_OP(ERR_PRESS_LIFT_NOT_POS, QObject::tr("press lift not in position")); // 压料升降不到位 CASE_OP(ERR_TO_ZERO_TIMOUT, QObject::tr("wait motion end timeout")); // 等待运动结束超时 CASE_OP(ERR_MOVE_POS_ERR, QObject::tr("move position error")); // 移动位置错误 CASE_OP(ERR_CLUTH_TIMOUT, QObject::tr("clutch wait timeout")); // 等待离合超时 CASE_OP(ERR_CLUTH1_NOT_POS, QObject::tr("head 1 clutch not in position")); // 机头1离合不到位 CASE_OP(ERR_CLUTH2_NOT_POS, QObject::tr("head 2 clutch not in position")); // 机头2离合不到位 CASE_OP(ERR_FOOT_POS, QObject::tr("presser foot position error")); // 压脚位置错误 CASE_OP(ERR_FOOT_OUT_RANGE, QObject::tr("presser motor position out of range"));// 压脚电机位置越界 CASE_OP(ERR_LIFT_OUT_RANGE, QObject::tr("head lift position out of range")); // 机头升降位置越界 CASE_OP(ERR_ROT_OUT_RANGE, QObject::tr("rotation position out of range")); // 旋转位置越界 CASE_OP(ERR_ROT_ECD_ERROR, QObject::tr("rotation encoder error")); // 旋转编码器错误 CASE_OP(ERR_LIFT_ULIMIT, QObject::tr("head lift upper limit")); // 机头升降上限位 CASE_OP(ERR_LIFT_DLIMIT, QObject::tr("head lift lower limit")); // 机头升降下限位 CASE_OP(ERR_LIFT_SYNC_ERR, QObject::tr("head lift sync error")); // 机头升降同步错误 CASE_OP(ERR_NOTIN_SAFE_AREA, QObject::tr("head not in safe area")); // 机头不在安全区域 CASE_OP(ERR_BUS_ERR, QObject::tr("bus error")); // 总线错误 CASE_OP(ERR_WIRE_ALARM, QObject::tr("wire tying alarm")); // 扎线报警 CASE_OP(ERR_ROT_COOR_SYSTM, QObject::tr("rotation motor coordinate system error")); // 旋转电机坐标系统错误 CASE_OP(ERR_LIFT_COOR_SYSTM, QObject::tr("lift motor coordinate system error")); // 升降电机坐标系统错误 CASE_OP(ERR_MS_COOR_SYSTM, QObject::tr("spindle coordinate system error")); // 主轴坐标系统错误 CASE_OP(ERR_WORK_HEAD, QObject::tr("working head error")); // 工作机头错误 CASE_OP(ERR_CHANGE_SHUT, QObject::tr("shuttle change error")); // 换梭异常 CASE_OP(ERR_CHANGE_BOBBIN, QObject::tr("change bobbin")); // 更换梭芯 CASE_OP(ERR_CHANGE_BOBBIN_A, QObject::tr("change bobbin A")); // 更换梭芯A CASE_OP(ERR_CHANGE_BOBBIN_B, QObject::tr("change bobbin B")); // 更换梭芯B CASE_OP(ERR_CHANGE_BOBBIN_STA, QObject::tr("machine in bobbin change state")); // 机器处于更换梭芯状态 CASE_OP(ERR_FEED_ROLLER, QObject::tr("feed roller error")); // 进料压辊 异常 CASE_OP(ERR_DIS_ROLLER, QObject::tr("discharge roller error")); // 出料压辊 异常 CASE_OP(ERR_DIS_MATERIAL, QObject::tr("discharge material error")); // 出料压料 异常 CASE_OP(ERR_TENS_DEVICE, QObject::tr("tension device error")); // 张紧装置 异常 CASE_OP(ERR_CLOTH_DEVICE, QObject::tr("cloth clamping device error")); // 夹布装置 异常 CASE_OP(ERR_EDGE_MOTOR, QObject::tr("edge motor blockage")); // 边切电机 阻塞 CASE_OP(ERR_CROSS_MOTOR, QObject::tr("cross cut motor error")); // 横切电机 异常 CASE_OP(ERR_FCLAMP_LIFT, QObject::tr("front clamp lift cylinder error")); // 前夹升降气缸 异常 CASE_OP(ERR_FCLAMP_OPCL, QObject::tr("front clamp open/close cylinder error")); // 前夹开合气缸 异常 CASE_OP(ERR_PULL_CLAMP, QObject::tr("robot arm upper clamp cylinder error"));// 机械手上夹气缸 异常 CASE_OP(ERR_PULL_CLIP, QObject::tr("robot arm lower clamp cylinder error")); // 机械手下夹气缸 异常 CASE_OP(ERR_YZR_NOT_SYNC, QObject::tr("right frame motor out of sync")); // 右框电机不同步 CASE_OP(ERR_CHIP_ERROR, QObject::tr("wire clamping device position error")); // 夹线装置位置 异常 CASE_OP(ERR_FIXTURE1_ERROR, QObject::tr("fixture 1 sensor error")); // 工装1传感器错误 CASE_OP(ERR_FIXTURE2_ERROR, QObject::tr("fixture 2 sensor error")); // 工装2传感器错误 CASE_OP(ERR_CLASH_ERROR, QObject::tr("fixture anti-collision not ready")); // 工装防撞未就绪 CASE_OP(ERR_NW_NOT_POS, QObject::tr("near-end pressure roller lift not in position")); // 近端压轮升降不到位 CASE_OP(ERR_FW_NOT_POS, QObject::tr("far-end pressure roller lift not in position")); // 远端压轮升降不到位 CASE_OP(ERR_SENDGIVE_NOT_POS, QObject::tr("edge feeding cylinder not in position")); // 送边条气缸不到位 CASE_OP(ERR_FPHD_NOT_POS, QObject::tr("head telescoping not in position")); // 机头伸缩不到位 CASE_OP(ERR_INPRESS_ERR, QObject::tr("inner pressure cylinder error")); // 里压料气缸 异常 CASE_OP(ERR_OUTPRESS_ERR, QObject::tr("outer pressure cylinder error")); // 外压料气缸 异常 CASE_OP(ERR_TENS_AND_CLOTH, QObject::tr("current cloth clamp and tension position disallow head movement")); // 当前夹布和张紧位置不允许移动机头 CASE_OP(ERR_RETURN_LIFT, QObject::tr("return lift device error")); // 退料升降装置 异常 CASE_OP(ERR_CLOTH_EMPTY, QObject::tr("edge feeding device out of material")); // 送边条装置缺料 CASE_OP(ERR_CHB_SWAY, QObject::tr("shuttle change swinging device error")); // 换梭摆动装置 异常 CASE_OP(ERR_CHB_PUSH, QObject::tr("shuttle change pushing device error")); // 换梭推动装置 异常 CASE_OP(ERR_CHB_ROTATE, QObject::tr("shuttle change rotating device error")); // 换梭旋转装置 异常 CASE_OP(ERR_CHB_SHUT, QObject::tr("shuttle shell detection error")); // 梭壳检测 异常 CASE_OP(ERR_XP_LIT_POSI, QObject::tr("XP positive limit")); // XP正向限位 CASE_OP(ERR_XP_LIT_NEGA, QObject::tr("XP negative limit")); // XP反向限位 CASE_OP(ERR_YP_LIT_POSI, QObject::tr("YP positive limit")); // YP正向限位 CASE_OP(ERR_YP_LIT_NEGA, QObject::tr("YP negative limit")); // YP反向限位 CASE_OP(ERR_1UP_SEND_C, QObject::tr("upper 1 cloth feeding cylinder error")); // 送压布条1上气缸 异常 CASE_OP(ERR_1UP_PUSH_S, QObject::tr("upper 1 cloth pressing cylinder error")); // 压布条1上气缸 异常 CASE_OP(ERR_1UP_SEND_P, QObject::tr("upper 1 inner cloth feeding cylinder error")); // 送内压布1上气缸 异常 CASE_OP(ERR_1UP_PUSH_C, QObject::tr("upper 1 cloth pressing cylinder error")); // 压布1上气缸 异常 CASE_OP(ERR_1UP_IN_PUSH_C, QObject::tr("upper 1 inner cloth pressing cylinder error")); // 内压布1上气缸 异常 CASE_OP(ERR_1DW_SEND_C, QObject::tr("lower 1 cloth feeding cylinder error")); // 送压布条1下气缸 异常 CASE_OP(ERR_1DW_PUSH_S, QObject::tr("lower 1 cloth pressing cylinder error")); // 压布条1下气缸 异常 CASE_OP(ERR_1DW_SEND_P, QObject::tr("lower 1 inner cloth feeding cylinder error")); // 送内压布1下气缸 异常 CASE_OP(ERR_1DW_PUSH_C, QObject::tr("lower 1 cloth pressing cylinder error")); // 压布1下气缸 异常 CASE_OP(ERR_1DW_IN_PUSH_C, QObject::tr("lower 1 inner cloth pressing cylinder error")); // 内压布1下气缸 异常 CASE_OP(ERR_TENS1_ERR, QObject::tr("tension sensor 1 communication error")); // 张力传感器1通讯 异常 CASE_OP(ERR_TENS2_ERR, QObject::tr("tension sensor 2 communication error")); // 张力传感器2通讯 异常 CASE_OP(ERR_FEED_LIMT, QObject::tr("feeding rack edge limit")); // 上料架对边限位 CASE_OP(ERR_IN_WAIT_AREA, QObject::tr("entered waiting area")); // 进入等待区域 CASE_OP(ERR_HOT_LINE, QObject::tr("hot line cylinder not in position")); // 烫线气缸未到位 CASE_OP(ERR_CHB_SPIN, QObject::tr("shuttle change rotating device error")); // 换梭旋转装置 异常 CASE_OP(ERR_CHB_DPUSH, QObject::tr("shuttle change thread pushing telescopic device error")); // 换梭扣线伸缩装置 异常 CASE_OP(ERR_PUNCH3_NOT_ZERO, QObject::tr("punch 3 spindle not at zero position")); // 冲孔3主轴不在零位 CASE_OP(ERR_PUNCH4_NOT_ZERO, QObject::tr("punch 4 spindle not at zero position")); // 冲孔4主轴不在零位 CASE_OP(ERR_CUT_PRESS, QObject::tr("lamination cutting press bar device error")); // 覆膜切料压杠装置 异常 CASE_OP(ERR_LAMIN_FILM1, QObject::tr("lamination clamping device 1 error")); // 覆膜夹膜装置1 异常 CASE_OP(ERR_LAMIN_FILM2, QObject::tr("lamination clamping device 2 error")); // 覆膜夹膜装置2 异常 CASE_OP(ERR_FEED_EMP, QObject::tr("lamination feeding empty slot error")); // 覆膜送料空位 异常 CASE_OP(ERRQUI_UPER_TBREAK1, QObject::tr("Head 1 has a broken surface wire")); // 机头1面线断线 CASE_OP(ERRQUI_UPER_TBREAK2, QObject::tr("Head 2 has a broken surface wire")); // 机头2面线断线 CASE_OP(ERRQUI_LIFT_TIMEOUT, QObject::tr("Head lifting timeout")); // 机头升降超时 CASE_OP(ERRQUI_CHANGE_BOBBIN, QObject::tr("Replacing the shuttle core")); // 更换梭芯 CASE_OP(ERRQUI_CHANGE_ERR, QObject::tr("Shuttle Change Device Alarm")); // 换梭装置报警 CASE_OP(ERRQUI_CHANGE_SHUTDISK, QObject::tr("Replace Shuttle Disk")); // 更换梭盘 CASE_OP(ERR_UPER_TBREAK_UP, QObject::tr("The upper cable is broken")); // 上排线断线 CASE_OP(ERR_UPER_TBREAK_DW, QObject::tr("Offline broken wire")); // 下排线断线 CASE_OP(ERR_PRODUCTION_LINE, QObject::tr("Production line alarm")); // 产线报警 CASE_OP(ERRQUI_FEED_ROLLER, QObject::tr("Feed pressure roller error")); // 进料压辊异常 CASE_OP(ERRQUI_DIS_ROLLER, QObject::tr("Discharge pressure roller error")); // 出料压辊异常 CASE_OP(ERRQUI_DIS_MATERIAL, QObject::tr("Discharging and pressing materials error")); // 出料压料异常 CASE_OP(ERRQUI_TENS_DEVICE, QObject::tr("Tensioning device error")); // 张紧装置异常 CASE_OP(ERRQUI_CLOTH_DEVICE, QObject::tr("Cloth clamping device error")); // 夹布装置异常 CASE_OP(ERRQUI_EDGE_MOTOR, QObject::tr("Edge cutting motor blockage")); // 边切电机阻塞 CASE_OP(ERRQUI_CROSS_MOTOR, QObject::tr("Transverse motor error")); // 横切电机异常 CASE_OP(ERR_BEDSEET_ERR1, QObject::tr("Abnormal cutting ultrasonic lifting cylinder")); // 裁切超声波升降气缸异常 CASE_OP(ERR_BEDSEET_ERR2, QObject::tr("Abnormal lifting cylinder of cutting blade")); // 裁切切刀升降气缸异常 CASE_OP(ERR_BEDSEET_ERR3, QObject::tr("Abnormal cutting and ejection cylinder")); // 裁切顶出气缸异常 CASE_OP(ERR_BEDSEET_ERR4, QObject::tr("Abnormal clamping cylinder before cutting")); // 裁切前夹料气缸异常 CASE_OP(ERR_BEDSEET_ERR5, QObject::tr("Abnormal feeding cylinder after cutting")); // 裁切后上夹料气缸异常 CASE_OP(ERR_BEDSEET_ERR6, QObject::tr("Abnormal lower clamping cylinder after cutting")); // 裁切后下夹料气缸异常 CASE_OP(ERR_BEDSEET_ERR7, QObject::tr("Abnormal cutting gripper")); // 裁切夹爪异常 CASE_OP(ERR_BEDSEET_ERR8, QObject::tr("Abnormal position of the material pulling motor")); // 拉料电机位置异常 CASE_OP(ERR_BEDSEET_ERR9, QObject::tr("Abnormal position of cross cutting motor")); // 横切电机位置异常 CASE_OP(ERR_BEDSEET_ERRA, QObject::tr("Stop material storage")); // 储料停止 CASE_OP(ERR_BEDSEET_ERRB, QObject::tr("Right seam broken line")); // 右边缝断线 CASE_OP(ERR_BEDSEET_ERRC, QObject::tr("Left seam broken line")); // 左边缝断线 CASE_OP(ERR_BEDSEET_ERRD, QObject::tr("Replace the shuttle core")); // 更换梭芯 CASE_OP(ERR_BEDSEET_ERRE, QObject::tr("Not meeting the material pulling conditions")); // 未满足拉料条件 CASE_OP(ERR_BEDSEET_ERRF, QObject::tr("Material delivery timeout")); // 物料输送超时 CASE_OP(ERR_BEDSEET_ERR10, QObject::tr("Materials not taken away")); // 物料未取走 CASE_OP(ERR_BEDSEET_ERR11, QObject::tr("Feeding limit")); // 送料限位 CASE_OP(ERR_BEDSEET_ERR12, QObject::tr("The machine head is short of material")); // 机头缺料 CASE_OP(ERRQUI_INSTALLMENT_OK, QObject::tr("Password set successfully")); // 密码设置成功 CASE_OP(ERRQUI_INSTALLMENT_FAIL, QObject::tr("Password setting failed")); // 密码设置失败 CASE_OP(ERRQUI_MOTO_N_ALM, QObject::tr("Needle motor alarm")); // 针电机报警 CASE_OP(ERRQUI_MOTO_H_ALM, QObject::tr("Shuttle motor alarm")); // 梭电机报警 CASE_OP(ERRQUI_MOTO_X_ALM, QObject::tr("X motor alarm")); // X电机报警 CASE_OP(ERRQUI_MOTO_Y_ALM, QObject::tr("Y motor alarm")); // Y电机报警 CASE_OP(ERRQUI_MOTO_U_ALM, QObject::tr("U motor alarm")); // U电机报警 CASE_OP(ERRQUI_MOTO_N_FZ, QObject::tr("Needle motor zeroing failure")); // 针电机归零失败 CASE_OP(ERRQUI_MOTO_H_FZ, QObject::tr("Shuttle motor zeroing failure")); // 梭电机归零失败 CASE_OP(ERRQUI_MOTO_X_FZ, QObject::tr("Zero reset failure of X motor")); // X电机归零失败 CASE_OP(ERRQUI_MOTO_Y_FZ, QObject::tr("Y motor zeroing failed")); // Y电机归零失败 CASE_OP(ERRQUI_CS_TIMEOUT, QObject::tr("Communication timeout from the board")); // 从板通讯超时 CASE_OP(ERRQUI_MOTO_X_ZERO, QObject::tr("X motor is not at zero position")); // X电机不在零位 //通用的状态信息 CASE_OP(STA_NORMAL_STOP, QObject::tr("Normal stop")); // 正常停止 CASE_OP(STA_MTZ_SUCCESS, QObject::tr("Find zero success")); // 归零成功 CASE_OP(STA_WORK_PAUSE, QObject::tr("work pause")); // 工作暂停 CASE_OP(STA_WORK_OVER, QObject::tr("End of work")); // 工作结束 CASE_OP(STA_WORK_FINISH, QObject::tr("Work done")); // 工作完成 CASE_OP(STA_WORK_DONE, QObject::tr("Complete production")); // 完成产量 CASE_OP(STA_EXEC_SUCCESS, QObject::tr("Execute success")); // 执行成功 CASE_OP(STA_EXEC_FAILED, QObject::tr("Execute false")); // 执行失败 CASE_OP(STA_WAIT_FILE, QObject::tr("wait file")); // 等待文件 CASE_OP(STA_CHANGE_BOBBIN, QObject::tr("change the bobbin")); // 更换梭芯 CASE_OP(STA_PROCESS_FINISH, QObject::tr("Execute finish")); // 执行完成 CASE_OP(STA_PROCESS_RUNNING, QObject::tr("Execute runnibng")); // 执行过程中 default: //errorCode.sprintf("CODE 0x%x", code); //errinfo.append(QObject::tr("Undefined error,") + errorCode); break; } return errinfo; }