C# winform S7.net 报错:Received error from PLC: Address out of range.
S7.Net.PlcException
HResult=0x80131500
Message=Received error from PLC: Address out of range.
Source=S7.Net
StackTrace:
at S7.Net.Plc.ReadBytesWithSingleRequest(DataType dataType, Int32 db, Int32 startByteAdr, Byte[] buffer, Int32 offset, Int32 count) in C:\projects\s7netplus-wq17l\S7.Net\PlcSynchronous.cs:line 316
at S7.Net.Plc.ReadBytes(DataType dataType, Int32 db, Int32 startByteAdr, Int32 count) in C:\projects\s7netplus-wq17l\S7.Net\PlcSynchronous.cs:line 47
at S7.Net.Plc.ReadClass(Object sourceClass, Int32 db, Int32 startByteAdr) in C:\projects\s7netplus-wq17l\S7.Net\PlcSynchronous.cs:line 126
at VTL1200.HYZZ.S.ReadClass(Object sourceClass, Int32 db, Int32 startByteAdr) in
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
此异常最初是在此调用堆栈中引发的:
S7.Net.Plc.ValidateResponseCode(S7.Net.Protocol.ReadWriteErrorCode) (位于 PLC.cs 中)
S7.Net.Plc.AssertReadResponse(byte[], int) (位于 PLC.cs 中)
S7.Net.Plc.ReadBytesWithSingleRequest(S7.Net.DataType, int, int, byte[], int, int) (位于 PlcSynchronous.cs 中)
内部异常 1:
Exception: Received error from PLC: Address out of range.
原文地址:https://blog.csdn.net/qq_36683522/article/details/142612063
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!