自动化立体仓库 - WCS系统
#
Junjie
6 天以前 3009c8b166815ef1ca58d43643e6d1f9f3a57747
src/main/java/com/zy/core/thread/impl/LfdZyForkLiftSlaveThread.java
@@ -168,7 +168,7 @@
                OutputQueue.FORKLIFT.offer(MessageFormat.format("【{0}】{1}读取货叉提升机状态信息失败", DateUtils.convert(new Date()), slave.getId()));
            }
            OperateResultExOne<byte[]> result2 = this.masterThread.read(this.slave.getId(), "staStatus");
            OperateResultExOne<byte[]> result2 = this.masterThread.read(this.slave.getId(), "staStatusTray");
            if (result2.IsSuccess) {
                for (int i = 0; i < this.slave.getSta().size(); i++) {
                    ForkLiftSlave.Sta sta = this.slave.getSta().get(i);
@@ -176,10 +176,23 @@
                        continue;
                    }
                    short val = siemensS7Net.getByteTransform().TransInt16(result2.Content, i * 2);
                    ForkLiftStaProtocol forkLiftStaProtocol = forkLiftStaProtocols.get(i);
                    boolean[] status1 = siemensS7Net.getByteTransform().TransBool(result2.Content, i * 2, 2);
                    forkLiftStaProtocol.setHasTray(status1[0]);
                    forkLiftStaProtocol.setHasCar(status1[1]);
                    forkLiftStaProtocol.setHasTray(val == 1);
                }
            }
            OperateResultExOne<byte[]> result3 = this.masterThread.read(this.slave.getId(), "staStatusCar");
            if (result3.IsSuccess) {
                for (int i = 0; i < this.slave.getSta().size(); i++) {
                    ForkLiftSlave.Sta sta = this.slave.getSta().get(i);
                    if (forkLiftStaProtocols.isEmpty()) {
                        continue;
                    }
                    short val = siemensS7Net.getByteTransform().TransInt16(result3.Content, i * 2);
                    ForkLiftStaProtocol forkLiftStaProtocol = forkLiftStaProtocols.get(i);
                    forkLiftStaProtocol.setHasCar(val == 1);
                }
            }