From 0df64f37379ce5c04e380f1c411dc52b01ac6b51 Mon Sep 17 00:00:00 2001
From: HuBingJie <3146306518@qq.com>
Date: 星期六, 29 十一月 2025 13:24:32 +0800
Subject: [PATCH] 1

---
 代码管理/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/GetDeviceAddress.cs |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/GetDeviceAddress.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/GetDeviceAddress.cs"
index f8adeee..2d4934c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/GetDeviceAddress.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/GetDeviceAddress.cs"
@@ -389,11 +389,12 @@
         public static bool ReadAqmDecicStice(int aqmtype)
         {
             IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "HCJ2000");
+            if (device == null) return false;
             CommonConveyorLine commonConveyorLine = (CommonConveyorLine)device;
             if (aqmtype == 1)
             {
                 DeviceProDTO? deviceProDTO = commonConveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == "AQM003" && x.DeviceProParamName == "IndicatorStatus" && x.DeviceProParamType == "ReadDeviceCommand");
-                short AQMldeng = commonConveyorLine.Communicator.Read<short>(deviceProDTO.DeviceProDataBlock);
+                short AQMldeng = commonConveyorLine.Communicator.Read<short>(deviceProDTO.DeviceProAddress);
                 if (AQMldeng == 2) return false;
             }
             else
@@ -401,7 +402,7 @@
                 foreach (string aqmname in AQMListdata)
                 {
                     DeviceProDTO? deviceProDTO = commonConveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == aqmname && x.DeviceProParamName == "IndicatorStatus" && x.DeviceProParamType == "ReadDeviceCommand");
-                    short AQMldeng = commonConveyorLine.Communicator.Read<short>(deviceProDTO.DeviceProDataBlock);
+                    short AQMldeng = commonConveyorLine.Communicator.Read<short>(deviceProDTO.DeviceProAddress);
                     if (AQMldeng == 2) return false;
                 }
             }

--
Gitblit v1.9.3