I have just started testing the use of tags of data type: String Array
I am using 7.8.1
I have not found much documentation of this data type, but based on testing it seems there is a limit to 240 array items. Is this true?
Also, I was testing reading tag values from the string array tag using the Script Console and ran into a problem reading more than 10 items. Any ideas what I’m doing wrong?
There were some issues with arrays fixed for 7.8.2. I just tried creating and reading an array of 1000 strings and didn’t have a problem. If you can upgrade, I would give that a shot.
One more question about storage of string array tags to the historian table(s). It was mentioned that if a string array tag is marked for history that only the first string item is stored in the historian table? In a quick test it does appear to be true.
After upgrading to 7.8.2 I am now getting over 1400 string items in the array.
Are there any example of how to retrieve the individual string items from history?
Can I use system.tag.queryTagHistory as shown below to get a dataset of all the values in the array? Or do I need to specifically use the call separately with ‘myStringArray[0]’, ‘myString Array[2]’, and so on… which would not be good for large arrays.
Also are there any specifics for accessing the values once you have the dataset?
Sorry, realizing that my quick copy/paste code example above isn’t very good for string array and getting all items.
I am now actually testing with this code where spectrumCompressed has been tried as both a string array and an integer array because the strings actually just represent integers:
When I try various elements of the array (whether as string array type or integer array type) the first item (ie. print dataSet.getValueAt(0,0), or print dataSet.getValueAt(1,0), or print dataSet.getValueAt(2,0)…) always returns a proper timestamp. However the second item (ie. print dataSet.getValueAt(0,1), or print dataSet.getValueAt(1,1), or print dataSet.getValueAt(2,1)…) always returns “None”. I can see in the designer that these individual items are getting actual non-zero integer values (or integers as strings).
Trying to understand why I am getting the “None” values. Perhaps the actual values are not being stored?
My Historical Scan class is set to “Evaluate on Change”