5
« on: February 27, 2019, 11:06:42 AM »
Experiencing intermittent failures with different error returns using the WriteUDT method. Fails between 30 - 50% of the time on WriteUDT method using the same parameter data. ReadUDT runs flawlessly using the same data type. Any help would be greatly appreciated.
public class UDT_Camera_Positions
{
public float[] Positions;
public int Number_Of_Stops;
public float[] Zone_Min_Value;
public float[] Zone_Max_Value;
public string[] Zone_Names;
ClxDriver
Version: 1.2.3.0
Runtime Version: 4.0.30319
Application Testing
ex.Message
Message "Source array was not long enough. Check srcIndex and length, and the array's lower bounds." string
ex.Stacktrace
StackTrace " at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)\r\n
at System.Collections.Generic.List`1.ToArray()\r\n at j.f()\r\n at ClxDriver.CIP.MessageRouterRequest.GetBytes()\r\n
at ClxDriver.CIP.CommonIndustrialProtocol.a(MessageRouterRequest A_0)\r\n
at ClxDriver.CIP.CommonIndustrialProtocol.ConnectedSend(MessageRouterRequest MRR, Int32 sequenceNumber, Int64 ownerObjectID)\r\n
at ClxDriver.CIP.CommonIndustrialProtocol.ConnectedSend(Int32 serviceCode, IEPath path, Byte[] data, Int32 sequenceNumber, Int64 ownerObjectID)\r\n
at ClxDriver.CIP.CIPforCLX.a(CLXAddress A_0, UInt16 A_1, Byte[] A_2, Int32 A_3, Int64 A_4)\r\n
at ClxDriver.EthernetIPforCLX.BeginWriteRaw(String startAddress, Int32 numberOfElements, Byte[] dataToWrite)\r\n
at ClxDriver.EthernetIPforCLX.WriteRaw(String startAddress, Int32 numberOfElements, Byte[] dataToWrite)\r\n
at ClxDriver.EthernetIPforCLX.WriteUDT(String udtName, Object structureDataToWrite)\r\n
at PLC_Clx.Comms.WriteUDT[T](String Tagname, T UDT_Object) in C:\\Users\\apexa\\...
ex.Message
Message "Index was outside the bounds of the array." string
ex.StackTrace
StackTrace " at System.Array.Clear(Array array, Int32 index, Int32 length)\r\n at System.Collections.Generic.List`1.Clear()\r\n at j.c()\r\n at j.f()\r\n
at ClxDriver.CIP.MessageRouterRequest.GetBytes()\r\n at ClxDriver.CIP.CommonIndustrialProtocol.a(MessageRouterRequest A_0)\r\n
at ClxDriver.CIP.CommonIndustrialProtocol.ConnectedSend(MessageRouterRequest MRR, Int32 sequenceNumber, Int64 ownerObjectID)\r\n
at ClxDriver.CIP.CommonIndustrialProtocol.ConnectedSend(Int32 serviceCode, IEPath path, Byte[] data, Int32 sequenceNumber, Int64 ownerObjectID)\r\n
at ClxDriver.CIP.CIPforCLX.a(CLXAddress A_0, UInt16 A_1, Byte[] A_2, Int32 A_3, Int64 A_4)\r\n
at ClxDriver.EthernetIPforCLX.BeginWriteRaw(String startAddress, Int32 numberOfElements, Byte[] dataToWrite)\r\n
at ClxDriver.EthernetIPforCLX.WriteRaw(String startAddress, Int32 numberOfElements, Byte[] dataToWrite)\r\n
at ClxDriver.EthernetIPforCLX.WriteUDT(String udtName, Object structureDataToWrite)\r\n
at PLC_Clx.Comms.WriteUDT[T](String Tagname, T UDT_Object) in C:\\Users\\apexa\\...
ex.Message
Message "Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index" string
ex.StackTrace
StackTrace " at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)\r\n
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)\r\n at j.c()\r\n at j.f()\r\n at ClxDriver.CIP.MessageRouterRequest.GetBytes()\r\n
at ClxDriver.CIP.CommonIndustrialProtocol.a(MessageRouterRequest A_0)\r\n at ClxDriver.CIP.CommonIndustrialProtocol.ConnectedSend(MessageRouterRequest MRR, Int32 sequenceNumber, Int64 ownerObjectID)\r\n
at ClxDriver.CIP.CommonIndustrialProtocol.ConnectedSend(Int32 serviceCode, IEPath path, Byte[] data, Int32 sequenceNumber, Int64 ownerObjectID)\r\n
at ClxDriver.CIP.CIPforCLX.a(CLXAddress A_0, UInt16 A_1, Byte[] A_2, Int32 A_3, Int64 A_4)\r\n at ClxDriver.EthernetIPforCLX.BeginWriteRaw(String startAddress, Int32 numberOfElements, Byte[] dataToWrite)\r\n
at ClxDriver.EthernetIPforCLX.WriteRaw(String startAddress, Int32 numberOfElements, Byte[] dataToWrite)\r\n at ClxDriver.EthernetIPforCLX.WriteUDT(String udtName, Object structureDataToWrite)\r\n
at PLC_Clx.Comms.WriteUDT[T](String Tagname, T UDT_Object) in C:\\Users\\apexa\\...
Unit Testing
Message: System.InvalidCastException : Unable to cast object of type 'System.Object' to type 'PLC_Clx.Tests.UDT_Camera_Positions'.
Message: ClxDriver.Common.PLCDriverException : Path Segment Error (Invalid Tag Name)