I'm having issues trying to read individual strings from the array.
MLM_LIST(11) -> String array in PLC
BasicLabel1.PLCaddressText = MLM_LIST
Ethernet driver is communicating properly as the rest of the HMI is functioning. Also Reading a non arrayed string works well.
When HMI is Ran I get two errors in the immediate window.
1. First Chance Exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll ( this is present even if the plcaddresstext is empty, so I believe it's from an error somewhere else )
2. First Chance Exception of type 'ArgumentOutofRangeException' occurred in mscorlib.dll
If I change the PLCaddressText to MLM_LIST.Data or MLM_List.Data The text of the label changes to a numeric value(I assume this an ascii code, but I have not verified this). TheArumentOutofRangeException is still present.
Update: If only use one BasicLabel an address of MLM_List does work; however, the Range Exception error is present and if you add more labels to access different members of the array the text value never changes from the default text.
I enabled break into debugger on exception thrown for ArumentOutofRangeException. Here is a clip board copy of the exception detail
Message=Length cannot be less than zero.
Parameter name: length
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at System.String.Substring(Int32 startIndex, Int32 length)
at AdvancedHMIDrivers.EthernetIPforCLXComm.PollUpdate(Timer sender, ElapsedEventArgs e) in C:\Users\xxxxx\Documents\Visual Studio 2010\Projects\AdvancedHMI\AdvancedHMIDrivers\EthernetIPforCLXComm.vb:line 518
There is a fix to this that will be part of the next release.
Awesome.. Thanks! I worked around it by just making MLM_List_1, MLM_List_2, etc….