From 5d663325953692c634046194bedd39b89ace41f0 Mon Sep 17 00:00:00 2001 From: 肖洋 <cathay_xy@163.com> Date: 星期五, 10 一月 2025 18:55:01 +0800 Subject: [PATCH] 更新多个文件,优化逻辑和异常处理 --- Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs index 5470af5..31378ac 100644 --- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs +++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs @@ -604,8 +604,12 @@ // 灏嗕慨鏀瑰悗鐨勬暟缁剎閲嶆柊鎷兼帴鎴愬瓧绗︿覆锛屼綔涓烘柊鐨凞eviceProAddress string DeviceProAddress = string.Join(".", x); - // 浣跨敤conveyorLine鐨凜ommunicator瀵硅薄鐨刉rite鏂规硶锛屽皢value鍐欏叆鏂扮殑DeviceProAddress鍦板潃 - conveyorLine.Communicator.Write(DeviceProAddress, value); + var writeBool = conveyorLine.Communicator.Read<bool>(DeviceProAddress); + if (writeBool != value) + { + // 浣跨敤conveyorLine鐨凜ommunicator瀵硅薄鐨刉rite鏂规硶锛屽皢value鍐欏叆鏂扮殑DeviceProAddress鍦板潃 + conveyorLine.Communicator.Write(DeviceProAddress, value); + } } #region 妫�娴嬬┖鐩樺疄鐩樹换鍔� -- Gitblit v1.9.3