From ff006f77f6267fc0d2c4ee810d897a85165f5b8f Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期四, 30 四月 2026 22:08:29 +0800
Subject: [PATCH] Merge branch 'xiaoyang' into dev
---
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