From 3406bbd34469982efeefe164c207dcb5c4a0dac2 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期四, 30 四月 2026 22:03:54 +0800
Subject: [PATCH] fix: 修复多个功能模块中的问题和优化逻辑

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Communicator/Siemens/SiemensS7Communicator.cs |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Communicator/Siemens/SiemensS7Communicator.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Communicator/Siemens/SiemensS7Communicator.cs
index c2dfc11..1d72f38 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Communicator/Siemens/SiemensS7Communicator.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Communicator/Siemens/SiemensS7Communicator.cs
@@ -358,6 +358,9 @@
                             return Encoding.Default.GetString((byte[])GetContent(plc.Read(address, length), address)).ToArray();
                         return (char)GetContent(plc.ReadByte(address), address);
 
+                    case TypeCode.SByte:
+                        return Encoding.Default.GetString((byte[])GetContent(plc.Read(address, 20), address)).ToArray();
+
                     default:
                         throw new CommunicationException(string.Format(CommunicationExceptionMessage.DataTypeErrorException, typeCode.ToString(), address), CommunicationErrorType.TypeError);
                 }

--
Gitblit v1.9.3