| | |
| | | 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); |
| | | |
| | | // 系统运行状态判断 |
| | |
| | | // 入库 ===>> 执行对工作档的完成操作 |
| | | mainService.storeFinished(6); |
| | | |
| | | // 堆垛机回原点 |
| | | mainService.originGo(); |
| | | |
| | | // 空桶到达罐装线入口 告诉罐装线入库桶信息 |
| | | mainService.inGzxBefore(); |
| | | |
| | |
| | | // 堆垛机异常信息记录 |
| | | 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(); |
| | | } |