Okay, I'm making some headway, but have run into another issue, this time with string arrays. I put the following code in a background worker thread:
' barcode
range_str = ss.Barcode.Take(40).ToArray
frmMain_EIPCLX.Write("SystemStatus_Barcode[1]", 40, range_str)
System.Threading.Thread.Sleep(5000)
range_str = ss.Barcode.Skip(40).Take(40).ToArray
frmMain_EIPCLX.Write("SystemStatus_Barcode[41]", 40, range_str)
System.Threading.Thread.Sleep(5000)
range_str = ss.Barcode.Skip(80).Take(25).ToArray
frmMain_EIPCLX.Write("SystemStatus_Barcode[81]", 25, range_str)
System.Threading.Thread.Sleep(5000)
The above works without any problems on several DINT arrays (Int32 in VB), but I'm getting index out of bounds errors on the string arrays. I have verified that all the arrays are dimensioned the same (105 elements in VB and 106 in the PLC--PLC index 0 is not used).
Here is the stack trace of the exception:
at MfgControl.AdvancedHMI.Drivers.CIP.ForwardOpen(Int32 sendSequence)
at MfgControl.AdvancedHMI.Drivers.CIP.WriteTagValue(CLXAddress tag, String[] value, Int32 numberOfElements, Int32 sequenceNumber, Int64 OwnerObjectID)
at AdvancedHMIDrivers.EthernetIPforCLXCom.Write(String startAddress, Int32 numberOfElements, String[] dataToWrite) in C:\Amtec\jobs\_C00645 - TOTO Robotic Storage and Retrieval System\Controls\Programs\AdvancedHMI\AdvancedHMIBetaV397c\AdvancedHMIDrivers\AllenBradley\EthernetIPforCLXCom.vb:line 548
at TOTO_DataServer.frmMain.GetSystemStatus_DoWork(Object sender, DoWorkEventArgs e) in C:\Amtec\jobs\_C00645 - TOTO Robotic Storage and Retrieval System\Controls\Programs\VB.NET\TOTO_DataServer\TOTO_DataServer\frmMain.vb:line 906