From 26f4eb6f6f06dc2da1f8aaad792902627257d66b Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期四, 07 三月 2024 14:44:42 +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 | 52 ++++++++++++----------------------------------------
1 files changed, 12 insertions(+), 40 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 5c979bf..6821383 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
@@ -9,6 +9,7 @@
import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.entity.device.PlcParameterObject;
import com.example.springboot.mapper.AlarmMapper;
+import com.example.springboot.mapper.AlbaniaMapper;
import com.example.springboot.mapper.SpianMapper;
public class PlcHoldNew extends Thread {
@@ -17,7 +18,7 @@
@Autowired
private JdbcConnections jdbcConnections;
- private SpianMapper spianMapper;
+ private AlbaniaMapper albaniaMapper;
private SpianService spianService;
int aaa;
@@ -35,56 +36,27 @@
// if (S7control.getinstance().CheckConnected() == false) {
spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
- spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
- jdbcConnections = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
+ albaniaMapper = WebSocketServer.applicationContext.getBean(AlbaniaMapper.class);
//璇诲彇DB105鍖烘枃浠�
PlcParameterObject plcmes=PLCAutoMes.PlcMesObject;
//璇�106
PlcParameterObject plcread=PLCAutoMes.PlcReadObject;
//璇�103
- PlcParameterObject plcstate=PLCAutoMes.plcStateObject;
- String OutRequest=plcread.getPlcParameter("OutRequest").getValue();//鍑虹墖璇锋眰
- String OutActivate=plcmes.getPlcParameter("OutActivate").getValue();//鍑虹墖鍚姩
-
-
- S7control.getinstance().WriteWord( plcmes.getPlcParameter("1231").getAddress(plcmes.getPlcParameter("1231").getAddressIndex()), (short) 0);
+ String OutRequest=plcread.getPlcParameter("OutRequest").getValue();//鍑虹墖璇锋眰涓�绾�
+ String OutActivate=plcmes.getPlcParameter("OutActivate").getValue();//鍑虹墖璇锋眰浜岀嚎
+ String AddRequest=plcmes.getPlcParameter("AddRequest").getValue();//杩涚墖璇锋眰
+ String CarRequest=plcmes.getPlcParameter("CatReque").getValue();//杩愰�佽溅璇锋眰
+
// 鍑虹墖浠诲姟
- if (OutActivate.equals("1") == false&&OutRequest.equals("1")==true) {
- S7control.getinstance().WriteWord("DB105.18", (short) 0);// 鍑虹墖浠诲姟鍚姩鏀逛负0
- }
- String FeedRequest=plcread.getPlcParameter("FeedRequest").getValue();// 杩涚墖璇锋眰瀛�
- String AddActivate=plcmes.getPlcParameter("AddActivate").getValue();// 杩涚墖鍚姩
- if (FeedRequest.equals("1") == false&&AddActivate.equals("1")==true) {
- S7control.getinstance().WriteWord("DB105.16", (short) 0);//杩涚墖浠诲姟鍚姩鏀逛负0
- }
-
- if (OutActivate.equals("1") == true) {
- // 鍒ゆ柇褰撳墠鏄惁鏈夋湭鎵ц鐨勪换鍔�
- int outnum = spianMapper.SelectOutSliceshu();//鏄惁鏈夋鍦ㄥ嚭鐗囩殑浠诲姟
- int cageoutsum = spianMapper.Selectcageout(3);//绗煎瓙鍐呮槸鍚﹁繕鏈夊湪鍑虹墖鐨勭幓鐠�
- // 褰撴病鏈変换鍔℃墽琛屽苟涓斿嚭鐗囪溅绌洪棽鏃�
- if (outnum == 0 && Plchome.isAllowQueue == true && cageoutsum == 0) {
- // 鍒ゆ柇閾濇鍑虹墖闃熷垪琛ㄦ槸鍚︽湁寰呭嚭鐗囩殑鐜荤拑
- String outglassid = spianMapper.SelectOutSlice();
- // 褰撴湁寰呭嚭鐗囩殑鐜荤拑鏃�
- if (outglassid != null) {
- // 鑾峰彇璇ョ幓鐠冩槸鍚﹁绂佺敤
- int glassdisabled = spianMapper.SelectCageGlassState(outglassid);
- // 鏈鐢ㄤ笅鍙戜换鍔�
- if (glassdisabled == 0) {
- spianService.selectout2(outglassid);
- Plchome.isQueueWarning = false;
- } else { // 绂佺敤鏇存敼鐘舵�佸脊鍑烘彁绀�
- Plchome.isQueueWarning = true;
- }
+ if (OutActivate.equals("1") == false&&CarRequest.equals("0")==true) {
+ S7control.getinstance().WriteWord("DB105.18", (short)1);// 灏嗗ぇ杞︾殑鐘舵�佹敼涓鸿繍杈撲腑
- }
- }
-
}
+
+
///////////// 杩涚墖浠诲姟
--
Gitblit v1.8.0