自动化立体仓库 - WCS系统
#
Junjie
2023-12-15 fd69e79dd9861681e31893d7941b39571f49dca4
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -44,13 +44,40 @@
    private short heartBeatVal = 1;
    public static final ArrayList<Integer> staNos1 = new ArrayList<Integer>() {{
        add(100);add(101);add(102);add(103);
        add(1001);add(1002);add(1003);add(1004);add(1005);
        add(1006);add(1007);add(1008);add(1009);add(1010);
        add(1011);add(1012);add(1013);add(1014);add(1015);
        add(1016);add(1017);add(1018);add(1019);add(1020);
        add(1021);add(1022);add(1023);add(1024);add(1025);
        add(2001);add(2002);add(2003);add(2004);add(2005);
        add(2006);add(2007);add(2008);add(2009);add(2010);
        add(2011);add(2012);add(2013);
        add(2101);add(2102);add(2103);add(2104);add(2105);
        add(2106);add(2107);add(2108);add(2109);add(2110);
        add(2111);add(2112);add(2113);add(2114);
        add(2301);add(2302);add(2303);add(2304);add(2305);
        add(2306);
        add(2401);add(2402);add(2403);
        add(3001);add(3002);add(3003);add(3004);add(3005);
        add(3006);add(3007);add(3008);add(3009);add(3010);
        add(3011);add(3012);
        add(4001);add(4002);add(4003);add(4004);add(4005);
        add(4006);add(4007);
        add(4010);add(4011);add(4012);add(4013);add(4014);
        add(4015);add(4016);
    }};
    /**
     * 条码数量
     */
    private int barcodeSize = 1;
    private int barcodeSize = 4;
    /**
     * 入出库模式
@@ -133,7 +160,7 @@
    private void read() throws InterruptedException {
        ArrayList<Integer> staNos = getStaNo();
        int staNoSize = staNos.size();
        OperateResultExOne<byte[]> result = siemensS7Net.Read("DB101.0", (short) (staNoSize*8));
        OperateResultExOne<byte[]> result = siemensS7Net.Read("DB101.0", (short) (getStaNo().size() * 8));
        if (result.IsSuccess) {
            for (int i = 0; i < staNoSize; i++) {
                Integer siteId = staNos.get(i); // 站点编号
@@ -149,7 +176,7 @@
        }
        Thread.sleep(200);
        OperateResultExOne<byte[]> result1 = null;
        result1 = siemensS7Net.Read("DB101.0", (short) (staNoSize * 8));
        result1 = siemensS7Net.Read("DB101.0", (short) (getStaNo().size() * 8));
        if (result1.IsSuccess) {
            for (int i = 0; i < staNoSize; i++) {
                Integer siteId = staNos.get(i); // 站点编号
@@ -163,6 +190,7 @@
                staProtocol.setFullPlt(status[5]);  // 满托盘
                staProtocol.setHigh(status[6]);     // 高库位
                staProtocol.setLow(status[7]);      // 低库位
                staProtocol.setEmptyPalletRequire(status[8]);      // 空托盘需求信号
                if (!staProtocol.isPakMk() && !staProtocol.isLoading()) {
                    staProtocol.setPakMk(true);