From 6a3125ff225c65ed5b13121db333f2c677affbaa Mon Sep 17 00:00:00 2001 From: ludj Date: Fri, 6 Jan 2023 23:14:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E8=BF=9B=E6=97=A5=E5=BF=97=E8=BE=93?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java b/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java index 576f32b..b9f0209 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java @@ -112,6 +112,7 @@ public class DeviceOpcProtocolRunable implements Runnable { label97: while (DeviceOpcSynchronizeAutoRun.isRun) { + log.info("label97_123"); long begin = System.currentTimeMillis(); Map itemStatus = group.read(true, (Item[]) itemsMap.values().toArray(new Item[0])); long end = System.currentTimeMillis(); @@ -168,9 +169,10 @@ public class DeviceOpcProtocolRunable implements Runnable { } else { this.all_null = 0; } + log.info("label97"); continue label97; } - + log.info("label97A----"); item = (Item) var18.next(); ItemState itemState = (ItemState) itemStatus.get(item); value = OpcUtl.getValue(item, itemState); @@ -183,6 +185,7 @@ public class DeviceOpcProtocolRunable implements Runnable { if (!ObjectUtil.equal(itemState.getQuality(), QualityTypeValue.OPC_QUALITY_GOOD) && his != null) { log.warn("opc 值不健康 item: {}, 状态: {}", item.getId(), itemState.getQuality()); } + log.info("label97bbb----value{},his{},equals{}",value,his,ObjectUtil.equal(value, his)); } while (ObjectUtil.equal(value, his));//如果两次的值相等,不走下面的代码 log.info("如果两次的值相等,不走下面的代码"); @@ -204,6 +207,7 @@ public class DeviceOpcProtocolRunable implements Runnable { log.info("信号{}变更从{}->{};信号快照:{}", new Object[]{item.getId(), his, value, sb}); } + log.info("设置值"); //设置值 accessor_value.setValue(item.getId(), value); }