自动化立体仓库 - WCS系统
1
zhangc
2025-03-24 69956cd46e68d240701b6269cc0d01862e450c82
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -53,6 +53,8 @@
        add(401);add(402);
    }};
    private Integer count=0;
    /**
     * 条码数量
     */
@@ -123,26 +125,30 @@
     * 初始化站点状态
     */
    private void initSite() {
        count ++;
        ArrayList<Integer> staNos = getStaNo();
        // 站点编号
        for (Integer siteId : staNos) {
            StaProtocol staProtocol = station.get(siteId);
            if (null == staProtocol) {
                staProtocol = new StaProtocol();
                staProtocol.setSiteId(siteId);
                station.put(siteId, staProtocol);
            }
            staProtocol.setWorkNo((short) 0);    // ID
            staProtocol.setAutoing(false);      // 自动
            staProtocol.setLoading(false);      // 有物
            staProtocol.setInEnable(false);     // 可入
            staProtocol.setOutEnable(false);    // 可出
            staProtocol.setEmptyMk(false);      // 空板信号
            staProtocol.setStaNo((short) 0);     // 目标站
        if(count > 10) {
            // 站点编号
            for (Integer siteId : staNos) {
                StaProtocol staProtocol = station.get(siteId);
                if (null == staProtocol) {
                    staProtocol = new StaProtocol();
                    staProtocol.setSiteId(siteId);
                    station.put(siteId, staProtocol);
                }
                staProtocol.setWorkNo((short) 0);    // ID
                staProtocol.setAutoing(false);      // 自动
                staProtocol.setLoading(false);      // 有物
                staProtocol.setInEnable(false);     // 可入
                staProtocol.setOutEnable(false);    // 可出
                staProtocol.setEmptyMk(false);      // 空板信号
                staProtocol.setStaNo((short) 0);     // 目标站
            if (!staProtocol.isPakMk() && !staProtocol.isLoading()) {
                staProtocol.setPakMk(true);
                if (!staProtocol.isPakMk() && !staProtocol.isLoading()) {
                    staProtocol.setPakMk(true);
                }
            }
            count = 0;
        }
    }
@@ -224,6 +230,7 @@
                    if (!staProtocol.isPakMk() && !staProtocol.isLoading()) {
                        staProtocol.setPakMk(true);
                    }
                    count = 0;
                }
            }
        } else if(slave.getId()==2) {
@@ -246,6 +253,7 @@
                        staProtocol.setPakMk(true);
                    }
                }
                count = 0;
            }
        }