From e7110f57152cc0428dfa18ea34a924b06b2d89b3 Mon Sep 17 00:00:00 2001 From: 严智鑫 <test> Date: 星期二, 09 四月 2024 14:12:53 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/Albania_Mes --- springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcParameterInfo.java | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcParameterInfo.java b/springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcParameterInfo.java index e1d7e6e..51d6ddf 100644 --- a/springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcParameterInfo.java +++ b/springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcParameterInfo.java @@ -1,4 +1,7 @@ package com.example.springboot.entity.device; + +import com.example.springboot.component.S7control; + public class PlcParameterInfo { public PlcParameterInfo(String startAddress) { this.startAddress = startAddress; @@ -91,6 +94,7 @@ public void setRatio(int ratio) { this.ratio = ratio; } + /** * 鑾峰彇鍦板潃 @@ -111,8 +115,8 @@ } if (addressLength == 14 ) { int wordindex = index; - int newIndex = wordindex + 13; - return stringdatas[0] + "." + wordindex +"-" + newIndex; + //int newIndex = wordindex + 13; + return stringdatas[0] + "." + wordindex ; } return null; } @@ -121,4 +125,10 @@ return addressIndex; } + public String getValueString() { + return S7control.getinstance().readStrings(getAddress()); + } + public String getAddress() { + return getAddress(this.addressIndex); + } } \ No newline at end of file -- Gitblit v1.8.0