自动化立体仓库 - WCS系统
#
whycq
2023-02-27 bccfbafc78e9b06bd3c2ac48822ad7065f80b213
src/main/java/com/zy/core/ServerBootstrap.java
@@ -28,7 +28,10 @@
    @Autowired
    private MainProcess mainProcess;
    /**
     * PostConstruct会在加载servlet的时候运行一次
     * @throws InterruptedException
     */
    @PostConstruct
    @Async
    public void init() throws InterruptedException {
@@ -74,7 +77,7 @@
        // 初始化堆垛机线程
        log.info("初始化堆垛机线程...................................................");
        for (CrnSlave crn : slaveProperties.getCrn()) {
            CrnThread crnThread = new MelsecCrnThread(crn);
            CrnThread crnThread = new SiemensCrnThread(crn);
            new Thread((Runnable) crnThread).start();
            SlaveConnection.put(SlaveType.Crn, crn.getId(), crnThread);
        }
@@ -89,7 +92,10 @@
        log.info("初始化条码扫描仪线程...................................................");
        for (Slave barcode : slaveProperties.getBarcode()) {
            BarcodeThread barcodeThread = new BarcodeThread(barcode);
            new Thread(barcodeThread).start();
            if(barcode.getId() > 6)
            {//1到6号扫码器数据从PLC中获取,无需start
                new Thread(barcodeThread).start();
            }
            SlaveConnection.put(SlaveType.Barcode, barcode.getId(), barcodeThread);
        }
        // 初始化LED线程