1
zhang
1 天以前 3271f9b1293bef8304734534a965e2230b309116
zy-asc-conveyor/src/main/java/com/zy/acs/conveyor/core/thread/SiemensDevpThread.java
@@ -169,6 +169,11 @@
        staProtocol.setSegApply(status2[2]);
        staProtocol.setApplyErr(status2[3]);
        for (int i = 0; i < 8; i++){
            if (status0[i+8]==status2[i]){
                log.info("状态码不一致 [id:{}] [i:{}] [status0:{}] [status2:{}]", slave.getId(), i, status0[i], status2[i]);
            }
        }
    }
    /**
@@ -338,6 +343,7 @@
                SafeSignalField.SAFE_SIGNAL_FROM_CONVEYOR.buildAddress(),
                (short) (staNoSize * SafeSignalField.SAFE_SIGNAL_FROM_CONVEYOR.getByteLength()));
        if (!result.IsSuccess) {
            log.warn("读取PLC安全交互信息异常 [id:{}]", slave.getId());
            return;
@@ -372,12 +378,15 @@
            staProtocolTake.setInComplete(status2[3]);
            staProtocolTake.setOutComplete(status2[4]);
            //
            if (status[3]){
                redis.push(RedisConveyorConstant.CONVEYOR_SAFE_FLAG, new SafeSignal(i,(short)0,true));
            if (status[3]) {
                staProtocolPut.setSafeSignal( new SafeSignal(i, (short) 0, true));
                redis.push(RedisConveyorConstant.CONVEYOR_SAFE_FLAG,staProtocolPut);
                News.info("安全交互信号复位 [id:{}] [staNo:{}]", slave.getId(), staProtocolPut.getSiteId());
            }
            if (status2[4]){
                redis.push(RedisConveyorConstant.CONVEYOR_SAFE_FLAG,  new SafeSignal(i, (short) 0,false));
            if (status2[4]) {
                staProtocolTake.setSafeSignal(new SafeSignal(i, (short) 0, false));
                redis.push(RedisConveyorConstant.CONVEYOR_SAFE_FLAG, staProtocolTake);
                News.info("安全交互信号复位 [id:{}] [staNo:{}]", slave.getId(), staProtocolPut.getSiteId());
            }
        }