#
luxiaotao1123
2020-08-27 da25915f918882d027fd4e62bb0223597ced74c4
#
3个文件已修改
1个文件已添加
220 ■■■■ 已修改文件
src/main/java/com/zy/core/model/protocol/CrnError1.java 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/model/protocol/CrnProtocol.java 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/model/protocol/CrnTemp1.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/CrnThread.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/model/protocol/CrnError1.java
@@ -8,53 +8,50 @@
@Data
public class CrnError1 {
    // 遥控器急停
    public boolean remoteStop;
    // 行走超速
    public boolean walkOverspeedErr;
    // 主控盘急停
    public boolean mainStop;
    // 行走速度超范围
    public boolean walkOverspeedRangeErr;
    // 操作盘急停
    public boolean controlStop;
    // 行走速度有偏差
    public boolean walkSpeedOffsetErr;
    // X行走变频器故障
    public boolean xCoverErr;
    // 行走位置有偏差
    public boolean walkLocationOffsetErr;
    // Y升降变频器故障
    public boolean yCoverErr;
    // 行走测距器异常
    public boolean walkDiastimeterErr;
    // Z货叉变频器故障
    public boolean zCoverErr;
    // 行走目标位置出界
    public boolean walkOutsideErr;
    // 激光故障
    public boolean laserErr;
    // 行走限位开关触发
    public boolean walkLimitSwitchErr;
    // 条码阅读器故障
    public boolean barcodeErr;
    // 行走制动序列异常
    public boolean walkBrakeErr;
    // X前极限
    public boolean xFrontLimitErr;
    // 行走测距器故障
    public boolean walkDiastimeterFau;
    // X后极限
    public boolean xBackLimitErr;
    // 升降超速
    public boolean liftOverSpeedErr;
    // Y上极限
    public boolean yUpLimitErr;
    // 升降速度超范围
    public boolean liftOverspeedRangeErr;
    // Y下极限
    public boolean yDownLimitErr;
    // 升降速度有偏差
    public boolean liftSpeedOffsetErr;
    // Z左极限
    public boolean zLeftLimitErr;
    // 升降位置有偏差
    public boolean liftLocationOffsetErr;
    // Z右极限
    public boolean zRightLimitErr;
    // 升降测距器异常
    public boolean liftDiastimeterErr;
    // 左超宽1
    public boolean leftOverWidthErr1;
    // 左超宽2
    public boolean leftOverWidthErr2;
    // 升降目标位置出界
    public boolean liftOutsideErr;
}
src/main/java/com/zy/core/model/protocol/CrnProtocol.java
@@ -108,7 +108,9 @@
     */
    private Short alarm1;
    private Short temp1;
    private boolean[] temp1;
    private CrnTemp1 crnTemp1;
    private Short temp2;
@@ -236,83 +238,39 @@
    public void setError1(boolean[] error1){
        this.error1 = error1;
        this.crnError1 = new CrnError1();
        this.crnError1.remoteStop = error1[0];
        this.crnError1.mainStop = error1[1];
        this.crnError1.controlStop = error1[2];
        this.crnError1.xCoverErr = error1[3];
        this.crnError1.yCoverErr = error1[4];
        this.crnError1.zCoverErr = error1[5];
        this.crnError1.laserErr = error1[6];
        this.crnError1.barcodeErr = error1[7];
        this.crnError1.xFrontLimitErr = error1[8];
        this.crnError1.xBackLimitErr = error1[9];
        this.crnError1.yUpLimitErr = error1[10];
        this.crnError1.yDownLimitErr = error1[11];
        this.crnError1.zLeftLimitErr = error1[12];
        this.crnError1.zRightLimitErr = error1[13];
        this.crnError1.leftOverWidthErr1 = error1[14];
        this.crnError1.leftOverWidthErr2 = error1[15];
        this.crnError1.walkOverspeedErr = error1[1];
        this.crnError1.walkOverspeedRangeErr = error1[2];
        this.crnError1.walkSpeedOffsetErr = error1[3];
        this.crnError1.walkLocationOffsetErr = error1[4];
        this.crnError1.walkDiastimeterErr = error1[5];
        this.crnError1.walkOutsideErr = error1[6];
        this.crnError1.walkLimitSwitchErr = error1[7];
        this.crnError1.walkBrakeErr = error1[8];
        this.crnError1.walkDiastimeterFau = error1[9];
        this.crnError1.liftOverSpeedErr = error1[10];
        this.crnError1.liftOverspeedRangeErr = error1[11];
        this.crnError1.liftSpeedOffsetErr = error1[12];
        this.crnError1.liftLocationOffsetErr = error1[13];
        this.crnError1.liftDiastimeterErr = error1[14];
        this.crnError1.liftOutsideErr = error1[15];
    }
    public void setError2(boolean[] error2){
        this.error2 = error2;
        this.crnError2 = new CrnError2();
        this.crnError2.leftOverLenErr1 = error2[0];
        this.crnError2.leftOverLenErr2 = error2[1];
        this.crnError2.leftOverHighErr = error2[2];
        this.crnError2.rightOverWidthErr1 = error2[3];
        this.crnError2.rightOverWidthErr2 = error2[4];
        this.crnError2.rightOverLenErr1 = error2[5];
        this.crnError2.rightOverLenErr2 = error2[6];
        this.crnError2.rightOverHighErr = error2[7];
        this.crnError2.leftLooseRopeErr = error2[8];
        this.crnError2.rightLooseRopeErr = error2[9];
        this.crnError2.frontDoorErr = error2[10];
        this.crnError2.backDoorErr = error2[11];
        this.crnError2.startupErr = error2[12];
        this.crnError2.xFrontLocaUpErr = error2[13];
        this.crnError2.xFrontLocaDownErr = error2[14];
        this.crnError2.xBackLocaUpErr = error2[15];
    }
    public void setError3(boolean[] error3) {
        this.error3 = error3;
        this.crnError3 = new CrnError3();
        this.crnError3.xBackLocaDownErr = error3[0];
        this.crnError3.yUpLocaUpErr = error3[1];
        this.crnError3.yUpLocaDownErr = error3[2];
        this.crnError3.yDownLocaUpErr = error3[3];
        this.crnError3.yDownLocaDownErr = error3[4];
        this.crnError3.zLeftLocaUpErr = error3[5];
        this.crnError3.zLeftLocaDownErr = error3[6];
        this.crnError3.zRightLocaUpErr = error3[7];
        this.crnError3.zRightLocaDownErr = error3[8];
        this.crnError3.leftTakeNoneErr = error3[9];
        this.crnError3.rightTakeNoneErr = error3[10];
        this.crnError3.leftTakeThenLoadErr = error3[11];
        this.crnError3.rightTakeThenLoadErr = error3[12];
        this.crnError3.leftPutAndLoadErr = error3[13];
        this.crnError3.rightPutAndLoadErr = error3[14];
        this.crnError3.leftPutThenNoneErr = error3[15];
    }
    public void setError4(boolean[] error4) {
        this.error4 = error4;
        this.crnError4 = new CrnError4();
        this.crnError4.rightPutThenNoneErr = error4[0];
        this.crnError4.xLooseBrakeTimeout = error4[1];
        this.crnError4.yLooseBrakeTimeout = error4[2];
        this.crnError4.zLooseBrakeTimeout = error4[3];
    }
    public void setError5(boolean[] error5) {
        this.error5 = error5;
        this.crnError5 = new CrnError5();
    }
    public void setError6(boolean[] error6) {
        this.error6 = error6;
        this.crnError6 = new CrnError6();
    public void setTemp1(boolean[] temp1) {
        this.temp1 = temp1;
        this.crnTemp1 = new CrnTemp1();
        this.crnTemp1.liftLimitSwitchErr = temp1[0];
        this.crnTemp1.liftBrakeErr = temp1[1];
        this.crnTemp1.liftDiastimeterFau = temp1[2];
        this.crnTemp1.stop = temp1[3];
        this.crnTemp1.warn = temp1[4];
        this.crnTemp1.overHighErr = temp1[5];
        this.crnTemp1.leftOverWidthErr = temp1[6];
        this.crnTemp1.rightOverWidthErr = temp1[7];
        this.crnTemp1.leftOverLenErr = temp1[8];
        this.crnTemp1.rightOverLenErr = temp1[9];
        this.crnTemp1.pakinThenLoadedErr = temp1[10];
        this.crnTemp1.pakOutThenNoneErr = temp1[11];
    }
    /**
src/main/java/com/zy/core/model/protocol/CrnTemp1.java
New file
@@ -0,0 +1,47 @@
package com.zy.core.model.protocol;
import lombok.Data;
/**
 * Created by vincent on 2020/8/17
 */
@Data
public class CrnTemp1 {
    // 升降限位开关触发
    public boolean liftLimitSwitchErr;
    // 行走制动序列异常
    public boolean liftBrakeErr;
    // 行走测距器故障
    public boolean liftDiastimeterFau;
    // 急停
    public boolean stop;
    // 相序报警
    public boolean warn;
    // 超高
    public boolean overHighErr;
    // 左超宽
    public boolean leftOverWidthErr;
    // 右超宽
    public boolean rightOverWidthErr;
    // 左超长
    public boolean leftOverLenErr;
    // 右超长
    public boolean rightOverLenErr;
    // 有物入
    public boolean pakinThenLoadedErr;
    // 无物出
    public boolean pakOutThenNoneErr;
}
src/main/java/com/zy/core/thread/CrnThread.java
@@ -130,7 +130,7 @@
                crnProtocol.setLoaded(melsecMcNet.getByteTransform().TransInt16(result.Content, 20));
                crnProtocol.setAlarm(melsecMcNet.getByteTransform().TransInt16(result.Content, 22));
                crnProtocol.setError1(melsecMcNet.getByteTransform().TransBool(result.Content, 24, 2));
                crnProtocol.setTemp1(melsecMcNet.getByteTransform().TransInt16(result.Content, 26));
                crnProtocol.setTemp1(melsecMcNet.getByteTransform().TransBool(result.Content, 26, 2));
                crnProtocol.setTemp2(melsecMcNet.getByteTransform().TransInt16(result.Content, 28));
                crnProtocol.setTemp3(melsecMcNet.getByteTransform().TransInt16(result.Content, 30));
                crnProtocol.setTemp4(melsecMcNet.getByteTransform().TransInt16(result.Content, 32));