Hi all,
I've encounter a situation where using the DurationOn
aggregation with system.tag.queryTagCalculation
cannot be used for tags where the tag has been true for longer than ~30 days.
I believe the issue is caused by the fact that calculation is made in milliseconds and not seconds since the return value is in milliseconds.
Caused by: com.inductiveautomation.ignition.client.gateway_interface.ResponseParser$1: Error reading data element [row=0, column="DurationOn", type=Long]
java.lang.NumberFormatException: For input string: "5.17888461E8"
at com.inductiveautomation.ignition.client.gateway_interface.ResponseParser.endElement(ResponseParser.java:290)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:498)
... 28 more
I'm also getting this data from the a Canary Historian so I'm not sure If Ignition database Handles the calculation differently or not ?