Problem with Save Button on Easy Chart

I have come across a problem with my easy chart so far as when i select to view data for the last week and then export it to an excel sheet it is working fine but when i choose to view data for the last month i can view it on the easy chart but when i choose to export it the only bit of information i am getting in excel is this Text - ‘’

I have also an expression bound to the Tag History Resolution which is -

if(dateDiff({Root Container.ctg_Chart.startDate},{Root Container.ctg_Chart.endDate},“minute”)>10080,
dateDiff({Root Container.ctg_Chart.startDate},{Root Container.ctg_Chart.endDate},“minute”)/0.2,
if(dateDiff({Root Container.ctg_Chart.startDate},{Root Container.ctg_Chart.endDate},“minute”)>1440,
dateDiff({Root Container.ctg_Chart.startDate},{Root Container.ctg_Chart.endDate},“minute”)/0.2,
dateDiff({Root Container.ctg_Chart.startDate},{Root Container.ctg_Chart.endDate},“minute”)/0.2))

Is this what could be causing the problem.

I’m not sure if that expression is causing the problem, but it probably can’t be helping. The expression, as posted, is a lot of work for nothing as all the conditions do the same thing. But, I suspect that’s because the numbers are probably different that they were when it first written.

Using the first case as an example, a range of 10080 minutes (1 week) would result in a resolution of over 50000 points. Considering that the default for the chart is 300, that’s a big step up. If the chart is displaying the data, that’s a good sign… but maybe the CSV export isn’t handling so many points well?

Have you looked at the Java console for the client? Try going to Help>Diagnostics. There might be something there, maybe an out of memory. The text that you are getting is the UTF-8 marker rendered to ascii, so the file is being opened, and then nothing else is getting written.

You might try removing that expression and just setting the resolution to something a bit more modest, like 1000, and see if that helps.

Regards,

Thanks for that colby,

You were correct, the error i was getting was as below so i just recalculated the expression and it is working great now and am getting far fewer points.

’ Exception in thread “AWT-EventQueue-0” java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
at java.lang.AbstractStringBuilder.append(Unknown Source)
at java.lang.StringBuffer.append(Unknown Source)
at java.io.StringWriter.write(Unknown Source)
at java.io.PrintWriter.write(Unknown Source)
at java.io.PrintWriter.write(Unknown Source)
at com.inductiveautomation.ignition.common.script.builtin.DatasetUtilities.dataSetToExcel(DatasetUtilities.java:551)
at com.inductiveautomation.factorypmi.application.script.builtin.ClientDatasetUtilities$3.writeToFile(ClientDatasetUtilities.java:81)
at com.inductiveautomation.ignition.client.script.ClientFileUtilities$CharFileWritingTask.writeToFile(ClientFileUtilities.java:91)
at com.inductiveautomation.factorypmi.application.script.builtin.FPMIFileUtilities.saveToFile(FPMIFileUtilities.java:113)
at com.inductiveautomation.factorypmi.application.script.builtin.ClientDatasetUtilities.exportExcel(ClientDatasetUtilities.java:77)
at com.inductiveautomation.factorypmi.application.components.PMIEasyChart$EasyChart.exportExcel(PMIEasyChart.java:2109)
at com.inductiveautomation.factorypmi.application.components.PMIEasyChart.exportExcel(PMIEasyChart.java:508)
at com.inductiveautomation.factorypmi.application.components.PMIEasyChart.exportExcel(PMIEasyChart.java:512)
at com.inductiveautomation.factorypmi.application.components.PMIEasyChart.actionPerformed(PMIEasyChart.java:503)
at com.inductiveautomation.factorypmi.application.components.util.ClickableIconButton.fireActionEvent(ClickableIconButton.java:142)
at com.inductiveautomation.factorypmi.application.components.util.ClickableIconButton.setPress(ClickableIconButton.java:188)
at com.inductiveautomation.factorypmi.application.components.util.ClickableIconButton.mouseReleased(ClickableIconButton.java:107)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)’
Thank you