ZengTao
2024-07-03 b7533c1472fd129bdf19a99c5f8255b647a59b0e
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java
@@ -26,6 +26,7 @@
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
@@ -72,10 +73,10 @@
    private Integer maxHeight;
    //    @Scheduled(fixedDelay = 1000)
    @Scheduled(fixedDelay = 1000)
    public void plcHomeEdgTask() {
        PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject;
        String requestWord = plcParameterObject.getPlcParameter("RequestWord").getValue();
        String requestWord = plcParameterObject.getPlcParameter("requestWord").getValue();
        String glassIdeValue = plcParameterObject.getPlcParameter("requestID").getValue();
        //A08  A09表示线路相同  可做等价  无数据转int异常
        String out06Glassstate = plcParameterObject.getPlcParameter("glassStatus06").getValue();
@@ -166,7 +167,7 @@
                log.info("无空架子,获取已绑定架子的流程卡信息,查看玻璃信息是否可被对调");
                List<DownGlassInfoDTO> downGlassInfoDTOList = downGlassInfoService.queryWorkStationIsIn(Boolean.FALSE);
                log.info("获取架子上已绑定流程卡落架的数量及未落架的玻璃数据:{}", downGlassInfoDTOList);
                if (CollectionUtils.isNotEmpty(downGlassInfoDTOList)) {
                if (CollectionUtils.isEmpty(downGlassInfoDTOList)) {
                    log.info("已绑定流程卡均无未落架玻璃,请及时处理架子上的玻璃,清除流程卡,执行进片任务");
                } else {
                    //替换玻璃信息
@@ -505,9 +506,9 @@
    private Boolean sendMessageToPlc(int width, int height, int thickness, int startCell, int endCell, int taskType) {
        S7control s7control = S7object.getinstance().plccontrol;
        PlcParameterObject plcMesObject = S7object.getinstance().PlcMesObject;
        s7control.writeWord(plcMesObject.getPlcParameter("Glass_width").getAddress(), (short) width * 10);
        s7control.writeWord(plcMesObject.getPlcParameter("Glass_height").getAddress(), (short) height * 10);
        s7control.writeWord(plcMesObject.getPlcParameter("Glass_thickness").getAddress(), (short) thickness * 10);
        s7control.writeWord(plcMesObject.getPlcParameter("Glass_width").getAddress(), (short) width);
        s7control.writeWord(plcMesObject.getPlcParameter("Glass_height").getAddress(), (short) height);
        s7control.writeWord(plcMesObject.getPlcParameter("Glass_thickness").getAddress(), (short) thickness);
        s7control.writeWord(plcMesObject.getPlcParameter("Start_cell").getAddress(), (short) startCell);
        s7control.writeWord(plcMesObject.getPlcParameter("End_cell").getAddress(), (short) endCell);
        s7control.writeWord(plcMesObject.getPlcParameter("task_type").getAddress(), (short) taskType);