From c779d641fd138cebdb08a3174708f1ec7ddc8a64 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期三, 05 一月 2022 14:47:53 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/thread/CrnThread.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/CrnThread.java b/src/main/java/com/zy/core/thread/CrnThread.java
index 18e9df7..cbe3d17 100644
--- a/src/main/java/com/zy/core/thread/CrnThread.java
+++ b/src/main/java/com/zy/core/thread/CrnThread.java
@@ -184,7 +184,7 @@
             return;
         }
         command.setCrnNo(slave.getId());
-        short[] array = new short[9];
+        short[] array = new short[10];
         array[0] = command.getStatus();
         array[1] = command.getSourceRow(); // 鎺�
         array[2] = command.getSourceBay(); // 鍒�
@@ -194,6 +194,7 @@
         array[6] = command.getDestinationPosBay(); // 鍒�
         array[7] = command.getDestinationPosLev(); // 灞�
         array[8] = command.getDestinationSta();  // 鐩爣浣嶇疆绔欏彿
+        OperateResult result = melsecMcNet.Write("100", array);
 
         try {
             // 鏃ュ織璁板綍
@@ -218,7 +219,6 @@
             bean.insert(basCrnOpt);
         } catch (Exception ignore) {}
 
-        OperateResult result = melsecMcNet.Write("100", array);
         if (result.IsSuccess) {
             log.info("鍫嗗灈鏈哄懡浠や笅鍙慬id:{}] >>>>> {}", slave.getId(), JSON.toJSON(command));
             OutputQueue.CRN.offer(MessageFormat.format("銆恵0}銆慬id:{1}] >>>>> 鍛戒护涓嬪彂锛� {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(command)));

--
Gitblit v1.9.1