From 2c7661d0bca739a9b403cdd420d2b91eb77470e6 Mon Sep 17 00:00:00 2001 From: admin <15939171744@163.com> Date: 星期一, 29 四月 2024 19:48:32 +0800 Subject: [PATCH] - --- jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java b/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java index a261df7..2824bdc 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java +++ b/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java @@ -35,10 +35,10 @@ public SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //鏂拌嚜鍔ㄥ伐绔� - public List<String> automaticList = Arrays.asList("OP280", "OP320A","OP320B", "OP340A","OP340B", "OP350A","OP350B", "OP360","OP365","OP370", "OP390", "OP470"); + public List<String> automaticList = Arrays.asList("OP280", "OP300A","OP300B", "OP320A","OP320B", "OP340A","OP340B", "OP350A","OP350B", "OP360","OP365","OP370", "OP390", "OP470"); //閲囬泦妯$粍宸ヤ綅 ModuleCode - public List<String> moduleCodeList = Arrays.asList("OP320A","OP320B","OP340A","OP340B","OP365", "OP350A", "OP350B", "OP330"); + public List<String> moduleCodeList = Arrays.asList("OP300A","OP300B","OP320A","OP320B","OP340A","OP340B","OP365", "OP350A", "OP350B", "OP330"); //鍖哄垎妯$粍鍨嬪彿宸ヤ綅 public List<String> distinguishingModules = Arrays.asList("OP300","OP310", "OP340", "OP350", "OP330"); @@ -116,22 +116,22 @@ //plc缁欐垜浠竴涓ā缁勭爜锛屾嬁妯$粍鐮佹牎楠屽嚭鍨嬪彿 if(distinguishingModules.stream().anyMatch(s -> s.equals(device))) { //璇绘ā缁勭爜 - String moduleCode = miloService.readFromOpcUa(thoroughfare + "." + device + ".ModuleCode").getValue().toString(); - String productTye = thoroughfare + "." + device + ".ProductType"; - if (null != moduleCode && moduleCode.length() == 24) { - miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(productTye).value(Integer.valueOf(moduleCode.substring(7, 8))).build()); - //杩涚珯淇濆瓨鏁版嵁 -// inSaveDate(thoroughfare,device) - //璁板綍鏁版嵁瀹屾垚 - String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone"; - - miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(11).build()); - - - //璇锋眰宸ュ崟 - } else { - miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(12).build()); - } +// String moduleCode = miloService.readFromOpcUa(thoroughfare + "." + device + ".ModuleCode").getValue().toString(); +// String productTye = thoroughfare + "." + device + ".ProductType"; +// if (null != moduleCode && moduleCode.length() == 24) { +// miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(productTye).value(Integer.valueOf(moduleCode.substring(7, 8))).build()); +// //杩涚珯淇濆瓨鏁版嵁 +//// inSaveDate(thoroughfare,device) +// //璁板綍鏁版嵁瀹屾垚 +// String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone"; +// +// miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(11).build()); +// +// +// //璇锋眰宸ュ崟 +// } else { +// miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(12).build()); +// } }else { //pack 濡傛灉鍖哄垎鍨嬪彿鐨勮瘽灏辫澶勭悊 //璁板綍鏁版嵁瀹屾垚 -- Gitblit v1.9.3