From b175a9fb3fcd6d7ed1196a8c4c303f1bc6372d91 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期二, 09 四月 2024 14:27:09 +0800
Subject: [PATCH] 调整测量图形显示
---
springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
index d9a6f9e..07f299f 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
@@ -10,7 +10,6 @@
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import com.example.springboot.mapper.AlarmMapper;
@@ -28,7 +27,7 @@
FileInputStream fileInputStream;
try {
// 浠庢枃浠朵腑璇诲彇瀛楄妭鏁版嵁瀛樺叆 fileInputStream
- fileInputStream = new FileInputStream("D:/Albania_Mes/Alarm.json");
+ fileInputStream = new FileInputStream("D:/Code/Albania_Mes/Alarm.json");
// 璇诲彇 fileInputStream 涓瓧鑺傚苟灏嗗叾瑙g爜涓哄瓧绗�
InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8");
// 鎻愰珮璇诲彇鏁堢巼锛屽湪 BufferedReader 鍐呭寘瑁� InputStreamReader
@@ -87,9 +86,9 @@
Integer Plccount = this.count;
// 鏍规嵁鍦板潃璇诲彇PCL鏁版嵁
- List<Boolean> plclist = S7control.getinstance().ReadBits("DB104.0.0", Plccount);
+ List<Boolean> plclist = S7control.getinstance().ReadBits("DB15.0.0", Plccount);
// List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, Plccount);
- // System.out.println(plclist);
+ System.out.println(plclist);
// Boolean[] values = { false, false, true, false, true, false, true, false,
// true, false, true, false, true, false,
// true, false, true, false, true, false, true, false, true, false, true, false,
@@ -129,6 +128,10 @@
alarmMapper = WebSocketServer.applicationContext.getBean(AlarmMapper.class);
for (short i = 0; i < array1.length; i++) {
// 鏌ヨ瀵瑰簲鎶ヨ淇℃伅缁撴潫鏃堕棿涓簄ull鐨勬潯鏁�
+ if(i==48){
+ short result = alarmMapper.selectnullti(array1[i]);
+ System.out.println(result+"-"+array1[i]);
+ }
short result = alarmMapper.selectnullti(array1[i]);
// 璇诲彇鍒癙LC鐨勫�间负1骞朵笖瀵瑰簲鎶ヨ淇℃伅缁撴潫鏃堕棿涓簄ull鐨勬潯鏁扮殑鏉℃暟涓�0
//System.out.println(result);
--
Gitblit v1.8.0