From bd456a3fca8cb8e8c1a15fa21ca02117512f3c5c Mon Sep 17 00:00:00 2001 From: ZengTao <2773468879@qq.com> Date: 星期一, 01 四月 2024 09:57:04 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/Albania_Mes --- springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java | 20 ++++++++------------ 1 files changed, 8 insertions(+), 12 deletions(-) diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java index 5cc729d..3651989 100644 --- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java +++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java @@ -26,7 +26,6 @@ Thread.sleep(100); } catch (InterruptedException e) { - // \\ TODO Auto-generated catch block e.printStackTrace(); } @@ -39,13 +38,13 @@ PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; if(plcmes.getPlcParameter("PLCToMES").getValue()!=null){ - // spianService.Mestast("1234567890123",40,0,2,"MESID1"); - // S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLC").getAddress(), (short)2);//鍑虹墖浠诲姟鍚姩 + // spianService.Mestast("NG0001-1",0,3,1,"MESID1",1); + // S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLC").getAddress(), (short)1);//鍑虹墖浠诲姟鍚姩 + String ExportTOMES1=plcmes.getPlcParameter("ExportTOMES1").getValue();//鍑虹墖璇锋眰涓�绾� String ExportToMES2=plcmes.getPlcParameter("ExportToMES2").getValue();//鍑虹墖璇锋眰浜岀嚎 String PLCToMES=plcmes.getPlcParameter("PLCToMES").getValue();//杩愰�佽溅璇锋眰 - //String B01State=plcmes.getPlcParameter("B01State").getValue();//杩愰�佽溅璇锋眰 String IDStatus1=plcmes.getPlcParameter("IDStatus1").getValue();//1鍙蜂换鍔″畬鎴� String MESToPLCStatus1=plcmes.getPlcParameter("MESToPLCStatus1").getValue();//1鍙风‘璁ゅ瓧 @@ -82,8 +81,8 @@ String Glassid=plcmes.getPlcParameter("MESID"+i).getValueString();//MES鐜荤拑ID GlassInfo id=albaniaMapper.SelectTaskId(Glassid); - if(Tastover.equals("1")){ - if(id!=null){ + + if(id!=null&&Tastover.equals("1")){ //璋冪敤瀹屾垚浠诲姟 Glassid storageCageService.FinishTask(id.getId()); } @@ -92,10 +91,10 @@ } + } - - } - } + + //姹囨姤鍙栨秷鏃� if(IDStatus1.equals("0")==true &&MESToPLCStatus1.equals("1")){ @@ -103,10 +102,7 @@ for(int i=1;i<7;i++){ String Tastover=plcmes.getPlcParameter("IDStatus"+i).getValue();//渚濇鑾峰彇浠诲姟姹囨姤 if(Tastover.equals("0")){ - //S7control.getinstance().WriteWord(plcmes.getPlcParameter("IDStatus"+i).getAddress(), (short) 0);//娓呴櫎纭瀛� S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLCStatus"+i).getAddress(), (short) 0);//娓呴櫎纭瀛� - // System.out.println(plcmes.getPlcParameter("MESToPLCStatus1").getValue()); - // System.out.println(S7control.getinstance().ReadWord("DB14.158", 1)); } } } -- Gitblit v1.8.0