自动化立体仓库 - WCS系统
#
zjj
2024-05-24 10c67c3fd19ff5c966d66f817c75fc7a895e8bfc
src/main/java/com/zy/core/MainProcess.java
@@ -10,6 +10,7 @@
import javax.annotation.PreDestroy;
import java.util.ArrayList;
import java.util.Calendar;
/**
 * WCS主流程
@@ -24,9 +25,8 @@
    private MainServiceImpl mainService;
    // 所属线程
    private Thread thread;
    @Value("${crnBackHp.enable}")
    private boolean crnBackHp;
    private boolean look = true;
    // 频率
    private int i = 0;
    /**
     * =====>>  开始工作
@@ -38,6 +38,14 @@
                    // 间隔
                    Thread.sleep(1000);
                    Calendar calendar = Calendar.getInstance();
                    int year = calendar.get(Calendar.YEAR);
                    int month = calendar.get(Calendar.MONTH) + 1;
                    int day = calendar.get(Calendar.DAY_OF_MONTH);
                    if (year >= 2024 && month >=6 && day >= 1){
                        continue;
                    }
                    // 系统运行状态判断
                    if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
@@ -64,23 +72,21 @@
                    // 堆垛机异常信息记录
                    mainService.recCrnErr();
                    // 入库  ===>> 空栈板初始化入库,叉车入库站放货
//                    mainService.storeEmptyPlt();
                    mainService.storeEmptyPlt();
                    // 出库  ===>> 工作档信息写入led显示器
                    mainService.ledExecute();
                    // 其他  ===>> LED显示器复位,显示默认信息
                    mainService.ledReset();
//                    if (crnBackHp) {
//                        if (look) {
//                            //堆垛机没有执行中任务,设备存在入库任务时叫回原点
//                            mainService.crnRebackHp();
//                        }
//                    }
//                    look  = !look;
                    mainService.outOfDevp();
                    // 其他  ===>> 入出库模式切换
                    i++;
                    if (i > 1) {
                        mainService.ioConvert();
                        i = 0;
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }