自动化立体仓库 - WCS系统
#
tzsk
2024-03-04 9550fcfc2ac0c9c0e5c4aa0600361c4b4f908689
#
3个文件已修改
99 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/MainProcess.java 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/ServerBootstrap.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -4101,32 +4101,36 @@
    //扫描设备PakMk标记是否超时
    public synchronized void scanDevicePakMk() {
        //扫描小车
        for (ShuttleSlave slave : slaveProperties.getShuttle()) {
            NyShuttleThread shuttleThread = (NyShuttleThread) SlaveConnection.get(SlaveType.Shuttle, slave.getId());
            NyShuttleProtocol shuttleProtocol = shuttleThread.getShuttleProtocol();
            if (shuttleProtocol == null) {
                continue;
        try {
            //扫描小车
            for (ShuttleSlave slave : slaveProperties.getShuttle()) {
                NyShuttleThread shuttleThread = (NyShuttleThread) SlaveConnection.get(SlaveType.Shuttle, slave.getId());
                NyShuttleProtocol shuttleProtocol = shuttleThread.getShuttleProtocol();
                if (shuttleProtocol == null) {
                    continue;
                }
                if ((System.currentTimeMillis() - shuttleProtocol.getSendTime() > (1000 * 60 * 5)) && shuttleProtocol.getPakMk()) {
                    //设备超过5分钟还没复位标记
                    shuttleProtocol.setPakMk(false);//复位标记
                }
            }
            if ((System.currentTimeMillis() - shuttleProtocol.getSendTime() > (1000*60*5)) && shuttleProtocol.getPakMk()) {
                //设备超过5分钟还没复位标记
                shuttleProtocol.setPakMk(false);//复位标记
            }
        }
            //扫描提升机
            for (LiftSlave slave : slaveProperties.getLift()) {
                LiftThread liftThread = (LiftThread) SlaveConnection.get(SlaveType.Lift, slave.getId());
                LiftProtocol liftProtocol = liftThread.getLiftProtocol();
                if (liftProtocol == null) {
                    continue;
                }
        //扫描提升机
        for (LiftSlave slave : slaveProperties.getLift()) {
            LiftThread liftThread = (LiftThread) SlaveConnection.get(SlaveType.Lift, slave.getId());
            LiftProtocol liftProtocol = liftThread.getLiftProtocol();
            if (liftProtocol == null) {
                continue;
                if ((System.currentTimeMillis() - liftProtocol.getSendTime() > (1000 * 60 * 5)) && liftProtocol.getPakMk()) {
                    //设备超过5分钟还没复位标记
                    liftProtocol.setPakMk(false);//复位标记
                }
            }
            if ((System.currentTimeMillis() - liftProtocol.getSendTime() > (1000*60*5)) && liftProtocol.getPakMk()) {
                //设备超过5分钟还没复位标记
                liftProtocol.setPakMk(false);//复位标记
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
src/main/java/com/zy/core/MainProcess.java
@@ -74,16 +74,16 @@
                    mainService.recErr();
                    // 入库  ===>> 空栈板初始化入库,叉车入库站放货
                    mainService.storeEmptyPlt();
                    // AGV补货 => 生成入库通知档
                    mainService.robotGenerateAgvTask();
                    // AGV补货(机械臂拣料)
                    mainService.agvRestockByRobot();
                    // AGV补货(通知AGV取货)
                    mainService.agvRestockInto();
                    // AGV补货(悬挂线通知AGV取货)
                    mainService.agvRestockIntoByHangingWire();
                    // AGV信息更新
                    mainService.agvCurrentContainerCodeInfoWire();
//                    // AGV补货 => 生成入库通知档
//                    mainService.robotGenerateAgvTask();
//                    // AGV补货(机械臂拣料)
//                    mainService.agvRestockByRobot();
//                    // AGV补货(通知AGV取货)
//                    mainService.agvRestockInto();
//                    // AGV补货(悬挂线通知AGV取货)
//                    mainService.agvRestockIntoByHangingWire();
//                    // AGV信息更新
//                    mainService.agvCurrentContainerCodeInfoWire();
                    // 300站拣料
                    mainService.pick300();
                    // 出库  ===>> 工作档信息写入led显示器
@@ -107,6 +107,36 @@
        thread.start();
    }
    public void agvStart(){
        thread = new Thread(() -> {
            while (!Thread.currentThread().isInterrupted()) {
                try {
                    // 间隔
                    Thread.sleep(300);
                    // AGV补货 => 生成入库通知档
                    mainService.robotGenerateAgvTask();
                    // AGV补货(机械臂拣料)
                    mainService.agvRestockByRobot();
                    // AGV补货(通知AGV取货)
                    mainService.agvRestockInto();
                    // AGV补货(悬挂线通知AGV取货)
                    mainService.agvRestockIntoByHangingWire();
                    // AGV信息更新
                    mainService.agvCurrentContainerCodeInfoWire();
                    // 间隔
                    Thread.sleep(200);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
        thread.start();
    }
    @PreDestroy
    public void shutDown(){
        if (thread != null) thread.interrupt();
src/main/java/com/zy/core/ServerBootstrap.java
@@ -41,6 +41,7 @@
        initThread();
        // 开始主流程进程
        mainProcess.start();
        mainProcess.agvStart();
        News.info("核心控制层已启动...............................................");
    }