From d267f84c1a5b0ebe50e02837e1053a384ef7113f Mon Sep 17 00:00:00 2001 From: CaesarBao <445720029@qq.com> Date: Tue, 31 Dec 2024 18:45:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=BA=90=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Impl/ABSignalReadBusiness.cs | 4 ++-- MaterialTraceability.Business/PlcBusiness.cs | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/MaterialTraceability.Business/Impl/ABSignalReadBusiness.cs b/MaterialTraceability.Business/Impl/ABSignalReadBusiness.cs index 3a97e7d..feed191 100644 --- a/MaterialTraceability.Business/Impl/ABSignalReadBusiness.cs +++ b/MaterialTraceability.Business/Impl/ABSignalReadBusiness.cs @@ -429,7 +429,7 @@ namespace MaterialTraceability.Business.Impl } downRecord.eaValue = (int)float.Parse(upMaterialEaValue); LogRefreshEvent?.Invoke(LogType.RfidLog, "收卷位物料EA:" + upMaterialEaValue); - if (!SpiltAccount(position, shaftInfo, downRecord.eaValue, shaftInfo.bindSfc, new ProUpRecord(), downRecord).Result) + if (!SpiltAccount(position, shaftInfo, upMaterialEaValue, shaftInfo.bindSfc, new ProUpRecord(), downRecord).Result) { LogHelper.Info(logStr + "完工MES账目数量异常"); @@ -599,7 +599,7 @@ namespace MaterialTraceability.Business.Impl /// /// /// - private async Task SpiltAccount(int position, ProShaftInfo shaftInfos, int eaValue, string upMaterialSfc, ProUpRecord upRecord, ProDownRecord downRecord) + private async Task SpiltAccount(int position, ProShaftInfo shaftInfos, string eaValue, string upMaterialSfc, ProUpRecord upRecord, ProDownRecord downRecord) { LogHelper.Info("自动完工MES账目数量"); LogRefreshEvent?.Invoke(LogType.MesLog, "自动完工MES账目数量:" + eaValue); diff --git a/MaterialTraceability.Business/PlcBusiness.cs b/MaterialTraceability.Business/PlcBusiness.cs index 0c9ce68..2b00fe0 100644 --- a/MaterialTraceability.Business/PlcBusiness.cs +++ b/MaterialTraceability.Business/PlcBusiness.cs @@ -215,13 +215,10 @@ namespace MaterialTraceability.Business //收卷结束信号-1A气胀轴 if (plcInstance.readInt32ByAddress(appConfig.AbAddress.收卷结束) == 1) { - lock (string.Empty) + if (isReadFlag(ref AB_lastReadTime_SJEndSinal)) { - if (isReadFlag(ref AB_lastReadTime_SJEndSinal)) - { - plcInstance.writeInt32ByAddress(appConfig.AbAddress.收卷结束, 0); - SignalRefreshEvent?.Invoke(4, 1); - } + plcInstance.writeInt32ByAddress(appConfig.AbAddress.收卷结束, 0); + SignalRefreshEvent?.Invoke(4, 1); } }