hutongqing
2024-11-20 70233af5426b0d1c343ebe87183303a34a9aaa58
WIDESEAWCS_Server/WIDESEAWCS_Communicator/Siemens/SiemensS7Communicator.cs
@@ -161,7 +161,7 @@
                    for (int i = 0; i < 5; i++)
                    {
                        T readValue = Read<T>(address);
                        stringBuilder.AppendLine(string.Format(CommunicationInfoMessage.WriteAfterRead, readValue, value));
                        stringBuilder.AppendLine(string.Format(CommunicationInfoMessage.WriteAfterRead, address, value));
                        obj = readValue;
                        if (readValue.Equals(value))
                        {
@@ -186,7 +186,6 @@
            {
                LogNet.WriteInfo(Name, stringBuilder.ToString());
            }
        }
        /// <summary>
@@ -426,7 +425,7 @@
            catch (Exception ex)
            {
                //写入异常时抛出自定义通讯异常类
                throw new CommunicationException($"写入数据异常,地址:【{address}】,错误信息: {ex.Message}", CommunicationErrorType.ReadFailed, innerException: ex);
                throw new CommunicationException($"写入数据异常,地址:【{address}】,错误信息: {ex.Message}", CommunicationErrorType.WriteFailed, innerException: ex);
            }
        }