| | |
| | | package com.zy.core; |
| | | |
| | | import com.zy.service.impl.MainServiceImpl; |
| | | import com.zy.core.properties.SystemProperties; |
| | | import com.zy.service.impl.MainServiceImpl; |
| | | import com.zy.utils.News; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PreDestroy; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * WCS主流程 |
| | |
| | | // 初始化罐装线出库口是否可出 |
| | | while (!Thread.currentThread().isInterrupted()) { |
| | | try { |
| | | long startTime = System.currentTimeMillis(); |
| | | Thread.sleep(1000); |
| | | |
| | | // 系统运行状态判断 |
| | |
| | | |
| | | // 1090异常口重新入库分配库位 |
| | | mainService.abnormalMouthWarehousing(); |
| | | Thread.sleep(1000); |
| | | |
| | | // 入库 ===>> 入库站到堆垛机站,根据条码扫描生成入库工作档 |
| | | mainService.generateStoreWrkFile(1); // 组托 |
| | | |
| | | Thread.sleep(1000); |
| | | |
| | | // 生成 空子/母托盘出库任务 |
| | | mainService.generateEmptyPalletStoreWrk(); |
| | | |
| | | // 入库 ===>> 母托盘叠满入库 |
| | | mainService.autoEmptyIn(); |
| | | Thread.sleep(1000); |
| | | |
| | | // 子托盘底下母托盘回叠盘机 |
| | | // mainService.motherTrayReflow(); |
| | | mainService.motherTrayReflow(); |
| | | |
| | | // 出库 ===>> 堆垛机出库站到出库站 |
| | | mainService.crnStnToOutStn(4); |
| | |
| | | |
| | | // 空桶罐装完成到达罐装线出口 完成直供罐装线任务和空桶出库任务,创建成品桶入库任务 |
| | | mainService.canningLineTaskFinish(); |
| | | Thread.sleep(1000); |
| | | |
| | | // 读要桶信号,自动出空桶 |
| | | mainService.autoOutEmptyBucket(); |
| | | |
| | | // 堆垛机异常信息记录 |
| | | mainService.recCrnErr(7); |
| | | |
| | | // 输送线异常信息记录 |
| | | mainService.recDevpErr(); |
| | | |
| | | // 出库 ===>> 工作档信息写入led显示器 |
| | | mainService.ledExecute(9); |
| | |
| | | |
| | | mainService.outOfDevp(11); |
| | | |
| | | // 堆垛机回原点 |
| | | mainService.originGo(); |
| | | |
| | | //手动站位转移 |
| | | mainService.manualStationTransfer(); |
| | | long endTime = System.currentTimeMillis(); |
| | | if (endTime-startTime > 4000) { |
| | | News.info("--------------------WCS循环{}->{},耗时:{}------------------------",new Date(startTime),new Date(endTime),endTime-startTime); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |