From 03920f72fe2051349ba5c8872d243388765d3408 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期五, 05 一月 2024 15:03:52 +0800
Subject: [PATCH] 添加出片队列铝框暂停出片功能
---
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
index 4299699..1c4a59b 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
@@ -28,6 +28,7 @@
// \\ TODO Auto-generated catch block
e.printStackTrace();
}
+ if (S7control.getinstance().CheckConnected() == true) {
spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
jdbcConnections = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
@@ -57,8 +58,9 @@
// 鍒ゆ柇褰撳墠鏄惁鏈夋湭鎵ц鐨勪换鍔�
int outnum = spianMapper.SelectOutSliceshu();
+ int cageoutsum=spianMapper.Selectcageout(3);
// 褰撴病鏈変换鍔℃墽琛屽苟涓斿嚭鐗囪溅绌洪棽鏃�
- if (outnum == 0 && outstate == true && Plchome.isAllowQueue == true) {
+ if (outnum == 0 && outstate == true && Plchome.isAllowQueue == true&&cageoutsum==0) {
// 鍒ゆ柇閾濇鍑虹墖闃熷垪琛ㄦ槸鍚︽湁寰呭嚭鐗囩殑鐜荤拑
String outglassid = spianMapper.SelectOutSlice();
if (outglassid != null) {
@@ -101,8 +103,8 @@
spianService.overtask(B02glassid.toString());// 瀹屾垚浠诲姟
S7control.getinstance().WriteWord("DB106.62", (short) 0);// 鎭㈠B02灏忚溅搴旂瓟鏀逛负0
System.out.println("姹囨姤鏃禕02|" + B02glassid);
- boolean yingda = spianService.listbool("DB106.62");// b01姹囨姤
- System.out.println("姹囨姤鏃禕01|绗�"+aaa+"娆�"+ B02glassid+"搴旂瓟"+yingda);
+ boolean yingda = spianService.listbool("DB106.62");// b02姹囨姤
+ System.out.println("姹囨姤鏃禕02|绗�"+aaa+"娆�"+ B02glassid+"搴旂瓟"+yingda);
}
// 鑾峰彇DO1鏁版嵁
@@ -157,5 +159,6 @@
}
}
+}
}
--
Gitblit v1.8.0