I have a unique data retreival requirement where I want to pull data every 10 seconds from my CR6 but want a new filename for that data to be created every hour. I'll explain my current setup below but am open to making major configuration changes to get a more robust solution.
Currently I pull data from my CR6 every second for a real time display. The data from the CR6 is pulled via a scheduled collection in loggernet. I would like to continue collecting every X seconds but want a new filename created every hour (or an arbitrary time interval).
An example of the solution for a file with arbitrary timestamp ClimaVUE50_yyyymmdd-HHMMSS:
ClimaVUE50_20220408-130000.dat (is appended to every X seconds)
ClimaVUE50_20220408-140000.dat (is created an hour after the first and appended to every X seconds)
This would continue until the scheduled collection is stopped (or the program is stopped if the only solution for this is via CRBasic).
Any advice would be appreciated!
Not for the faint of heart, but Loggernet can be controlled with a command line API. Data collection interval is a setting that can be altered.
Looking through the Cora Script help, I do not see the file name as editable with the command line. If you let the most recent file be a static name, just rename the file when it is full of the interval you want. Next collection will create a new file with the static name.
I would use an external program to monitor when the file has reached the data interval and rename?
Would all of this be easier to automate by setting up my datalogger code to change file names every X interval and have it FTP files every X interval?
Hi,
I hope that have understood your requirement correctly.
Have you never seen the potential of split?
You could schedule a procedure with split that uses the file where the data arrives every x seconds and generate a new file every hour. Few use split but a really powerful application. It can be scheduled and has a lot of features. Read some help and give it a try.
Smile
Yes, FTP to send separate files is a possibility.
Split can leave the original dat file intact and output a new file based on an interval. If you want headers on the new files, there is a bit of extra work to do.
TaskMaster in Loggernet can be used to trigger scheduled tasks, like run a script file.