Java Export Errors

I am attempting to record historical logging values to the SD card from Java using the Exporter class with a historical table export. The export works with a low number of tags, but I am seeing errors with recording the total number of tags I need (279 tags). I stripped back the program to the absolute minimum in an effort to isolate the errors but have been unable to do so. The code I am using for the export currently is below.

That code generates the errors shown in the attached screenshots when it attempts to export. I can find no documentation of any of these error codes and have tried numerous solutions to resolve the issue, including adjusting group filters, adjusting the usr partition, changing the export length, and adjusting the java heap size. Others have reported exporting 300 tags successfully, so I would like to get these errors resolved. What am I missing? Thanks for the help!

import com.ewon.ewonitf.Exporter;
import java.lang.Long;

public class MainClass {

		public static void main(String[] args) throws Exception {

		//while (true) {

		// export historical logging data to SD card
		Long Wrapped_Time = new Long(System.currentTimeMillis());
		String Time_String = Wrapped_Time.toString();
		System.out.println("The export check has started.");

		try {
		Exporter exporter = new Exporter("$dtHT$ftT$st_m1$et_m0");
		System.out.println("Export starting.");
		exporter.ExportTo("file:////usr/Backup_Export_" + Time_String + ".txt");
		System.out.println("Export complete.");
		} catch (IOException ioe) {
		System.err.println("Error in exporter while running Export From Test: " + ioe.toString());





Can you provide a backup with supports files of the unit in questions? I will need to review the device and BASIC code.

Hi Kevin,

Yes, I will send those over now.



Have you been able to acquire a backup of the flexy yet?

From Message

Hi Kevin,

Thanks for your help. Flexy backup attached. Also, just to be clear, the exporter code is in Java not in BASIC. There is a BASIC script for clearing the memory on the device, but it is not currently being used. I had been using it from the Java to erase after logging, but I disabled that feature in an attempt to track down the bug. Let me know if you have any questions.



I did review the back up and i noticed a couple issues.

Several of your tags have connection errors. Which can dump garbage infomration into the tag. I would advise resolving the connection error first, and ensuring all tags are actively updated.

Are you pull the tag information directly? Or you creating a file to hold them, and then exporting them to the SD card?

Hi Kevin,

This comes up every time I post into the forums. Those errors appear whenever the program updates on the PLC as it stops responding to requests from the Flexy whenever it is updating. All of the tags are current and are updating continuously. No tags show any issues when not updating the PLC. Furthermore, no connection errors were included in the section of data export that generated these errors. Is there something deeper I need to do to clean out the tags for export?

I am just using the export block descriptor as shown in the Java code. The eWON Java documentation says this uses a file stream to export the data to a file. Does that answer your question?

Thanks for your help! I really appreciate it!



Any ideas on this? It would be great to get this resolved. Thanks so much for your help!



I ran some tests and found similiar issues. THe root cause is the that memory cannot handle the amount of data.

Have you tried splitting the exports up to lower numbers?

Hi Kevin,

Sorry for not getting back to you more quickly on this. I posted on the developer forum as well and at that point the new firmware PR had been released. They recommended I test it on that and in the new firmware version I was able to resolve the issue by not allowing the data to circularize and instead manually deleting it before it got full. I figured I’d repost here in case helpful for anyone else. Thanks for your help to work on this!


Topic closed due to inactivity.