1
z8018
2025-03-12 17e4c7e3e7b3ef60d9da6de3b2a39a14a53c38a0
WIDESEAWCS_Server/WIDESEAWCS_Communicator/Inovance/InovanceTcpCommunicator.cs
@@ -53,6 +53,11 @@
        /// 获取当前通讯器是否已连接到PLC。  
        /// </summary>
        public override bool IsConnected => _connected;
        /// <summary>
        /// 是否在写入数据后读取数据确认。
        /// </summary>
        public override bool IsReadAfterWrite { get; set; } = true;
        #endregion
        #region Constructor Function
@@ -126,6 +131,8 @@
                }
                else
                {
                    if (IsReadAfterWrite)
                    {
                    object? obj = null;
                    for (int i = 0; i < 5; i++)
                    {
@@ -145,6 +152,11 @@
                    stringBuilder.AppendLine(string.Format(CommunicationExceptionMessage.WriteAndReadCheckFaild, address, value, obj));
                    throw new CommunicationException(stringBuilder.ToString(), CommunicationErrorType.WriteFailed);
                }
                    else
                    {
                        return true;
                    }
                }
            }
            catch (Exception ex)
            {