I am performing regressions on various process data to better predict their outputs, thereby making it easier to detect issues with the processes.
I store the regression’s coefficient results in a dictionary because it makes pairing the coefficients and variables very simple and easy to read.
# Coefficients
{
"arc_length": 2.9178477439730455,
"temperature": -0.009490811332843855,
"intercept": 40.26487761444835,
"velocity": -0.13768024624063155,
"i_area": 0.03349375445769801
}
Between the calculation of the coefficients and their use in analysis, I currently store them in a tag of type “Document” because the dictionary can be stored and retrieved easily as a whole, at least with scripting it can.
While playing around with the math, I wanted to see the changes occur in real time, so I dropped a couple Label components on a Vision page and bound their Text properties to a couple of the Document tags. Although it worked in the sense that it displayed the json text for the dictionary, which was the aim of adding the labels, it will not allow me to SAVE the window. I get the following error:
SerializationException: Error during serialization for property 'interactionController' on object '[FPMIWindow]GraphTesting_Sawblade (multiball)'
caused by SerializationException: Error during serialization for property 'propertyAdapters' on object '[DefaultInteractionController]com.inductiveautomation.factorypmi.application.binding.DefaultInteractionController@7bb4fe5b'
caused by SerializationException: Error during serialization for property 'expression' on object '[ExpressionPropertyAdapter] ---> lblResult 1'
caused by SerializationException: Error during serialization for property 'children' on object '[FunctionExpression]com.inductiveautomation.ignition.common.expressions.FunctionExpression@27e8c75d'
caused by SerializationException: Error during serialization for property 'tagListenerDelegate' on object '[BoundTagExpression]com.inductiveautomation.ignition.common.expressions.BoundTagExpression@1f5a190a'
caused by SerializationException: Error during serialization for property 'tagQualifiedValue' on object '[TagListener]com.inductiveautomation.ignition.common.expressions.TagListener@6c9e1aa2'
caused by SerializationException: Unable to create clean copy of class com.inductiveautomation.ignition.common.document.ExtendedDocument
How does one avoid this serialization issue when reading the value of a Document tag?
I’ve tried casting toStr(), and was originally using the following expression to get line breaks:
"<HTML>"+replace({doc_tag},",","<BR>")