Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Cropping DAT files


Clayton Apr 11, 2011 09:01 PM

Using Split, I am trying to crop my DAT files once a week to contain only a month's worth of data so that they don't get too bloated. The Split PAR file is working fine, but very slowly. We collect minute as well as hourly average data, so a month contains over 40,000 lines and it takes several minutes to read the original file and write the new one. During this process, LoggerNet is still collecting data once a minute. If I overwrite the original file with the one that Split has output, I'll lose all the data that was collected. Does anyone know how to speed up Split, pause the scheduled collection automatically while Split is running, or have some other solution to cropping large files quickly? In the past I've done this with a week's worth of data and it moves fast enough that it's not a problem. However, I would like to be able to take advantage of the ability in RTMC v3 to use files as data sources for projects, thereby being able to graph a lot more data than will fit on our CR10X dataloggers. If you let the DAT files get really huge, it takes a very long time for RTMC projects to load since they scroll though all of the data. Thanks for any assistance.

Alex


Clayton Apr 11, 2011 09:06 PM

I've come up with an extremely clumsy solution. I am running another Split PAR which does basically the same thing as my cropping version, but instead of outputting all of the last month, it just outputs the data collected since the last time that PAR was run by using the "Last Count" start offset. By running it just before running the 30 day PAR, then immediately after and setting the output to append, it seems to be catching the last few minutes worth of data that the 30 day file is missing. It's working, but it's messy and seems prone to snags.


ChipsNSalsa Apr 12, 2011 12:11 AM

You could do something like this in a batch file:

start /w "C:\Program Files\Campbellsci\LoggerNet\cora_cmd.exe"<"C:\Campbellsci\BATCH\DEACTIVATE.TXT"

start /w "C:\Program Files\CampbellSci\LoggerNet\splitr.exe" /m c:\CampbellSci\par\lc4w/q

start /w "C:\Program Files\Campbellsci\LoggerNet\cora_cmd.exe"<"C:\Campbellsci\BATCH\ACTIVATE.TXT"

The contents of DEACTIVATE.TXT and ACTIVATE.TXT in the above example would contain:

connect localhost;
set-lgrnet-setting 1 false;
quit;

and

connect localhost;
set-lgrnet-setting 1 true;
quit;

respectively.

LoggerNet scheduled data collection would be paused as if you enabled "Pause Schedule" on the Status screen, SplitR would run and do its thing, and then LoggerNet scheduled data collection would resume.


Dana Apr 12, 2011 05:55 PM

A PAR file will process faster if the output is not being written to the screen. You can turn off the display by clearing the Screen Display checkbox on the Output File tab in Split (and then saving the PAR file so the changes take effect).

Dana W.


Clayton Apr 12, 2011 10:16 PM

ChipsNSalsa, I see what you're getting at, and it seems like a really good way to accomplish what I need, but so far it isn't quite working. Using your text, the batch file opens another command window which says it's cora_cmd.exe, but sure seems like it's just another command window (it doesn't say CoraScript 1, 1, 10, 20 and it doesn't recognize CoraScript commands), and the batch file in the original window just pauses. It doesn't input the text from C:\Campbellsci\BAT\DEACTIVATE.TXT either. If I just do a simple

"C:\Program Files\Campbellsci\LoggerNet\cora_cmd.exe"

in the batch file, then a CoraScript command line appears in the original command window (CoraScript 1, 1, 10, 20), but the original batch still seems to be paused. It seems like I should then just be able to write a few lines to get it to enter

connect localhost;
set-lgrnet-setting 1 false;
quit;

but I can't figure out what the command is to enter text into a CoraScript command line, if there is one. Type doesn't work. It seems like the CoraScript command line is basically just locking out any input from the batch file, so I don't even know if this would be possible.

Perhaps I'm misunderstanding your text, but I think I've tried every combination. The start /w instructions are all one line, right? And they are just being split at the "<" by the limits of the text box here? I've tried it as one or two lines, a > instead of <, with and without the start /w, used short URLs to eliminate the spaces and the quotation marks...any ideas?

Log in or register to post/reply in the forum.