From b4ff04d7dd22f0e48bf386cd422e885aef08fed7 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 22 五月 2025 15:03:10 +0800
Subject: [PATCH] OPC通讯修改为S7通讯
---
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/s7/entity/S7DataWL.java | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/s7/entity/S7DataWLOne.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/s7/entity/S7DataWL.java
similarity index 66%
rename from hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/s7/entity/S7DataWLOne.java
rename to hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/s7/entity/S7DataWL.java
index bf21d1f..2cd1e27 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/s7/entity/S7DataWLOne.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/s7/entity/S7DataWL.java
@@ -2,6 +2,7 @@
import com.github.xingshuangs.iot.protocol.common.enums.EDataType;
import com.github.xingshuangs.iot.protocol.s7.serializer.S7Variable;
+import lombok.Builder;
import lombok.Data;
/**
@@ -10,14 +11,15 @@
* @Description:
*/
@Data
-public class S7DataWLOne {
+@Builder
+public class S7DataWL {
- @S7Variable(address = "DB19.0", type = EDataType.INT16)
+ @S7Variable(address = "DB49.0", type = EDataType.INT16)
private Short taskRunning;
@S7Variable(address = "DB49.46", type = EDataType.INT16)
- private Short slot;
+ private Short currentCell;
@S7Variable(address = "DB49.48", type = EDataType.INT16)
private Short startCell;
@@ -26,7 +28,7 @@
private Short endCell;
@S7Variable(address = "DB49.52", type = EDataType.INT16)
- private Short plcTaskState;
+ private Short TaskState;
@S7Variable(address = "DB49.116", type = EDataType.INT16)
private Short inPlace;
@@ -35,18 +37,18 @@
private Short slotState;
@S7Variable(address = "DB49.118", type = EDataType.FLOAT32)
- private Short speed;
+ private Float speed;
- @S7Variable(address = "DB49.2", type = EDataType.STRING)
+ @S7Variable(address = "DB49.2", type = EDataType.STRING, count = 22)
private String glassIdIn;
- @S7Variable(address = "DB49.24", type = EDataType.STRING)
+ @S7Variable(address = "DB49.24", type = EDataType.STRING, count = 22)
private String glassIdOut;
- @S7Variable(address = "DB49.94", type = EDataType.STRING)
+ @S7Variable(address = "DB49.94", type = EDataType.STRING, count = 22)
private String glassId;
- @S7Variable(address = "DB49.112", type = EDataType.BOOL)
+ @S7Variable(address = "DB49.112.0", type = EDataType.BOOL)
private Boolean deviceState;
}
--
Gitblit v1.8.0