Time/date stamping PLW files

Post general discussions on using our drivers to write your own software here
Post Reply
Mike7777777
Newbie
Posts: 0
Joined: Mon Aug 30, 2010 9:09 am

Time/date stamping PLW files

Post by Mike7777777 »

Hi

I run Picolog for several days at a time, one hour recording per PLW file, the default file name on creation is
test1.PLW
test2.PLW
test3.PLW
etc

Is it possible to time stamp the PLW file as it is saved?

1100_25032011.PLW
1200_25032011.PLW
1300_25032011.PLW

which is time_daymonthyear.PLW (in UK format)

Thanks

Mike

Chris
Site Admin
Site Admin
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: Time/date stamping PLW files

Post by Chris »

The PicoLog recorder application doesn't enable you to do this.

Only by writing your own recording aplication would you be abl to do this.

Mike7777777
Newbie
Posts: 0
Joined: Mon Aug 30, 2010 9:09 am

Re: Time/date stamping PLW files

Post by Mike7777777 »

Thanks, I can run a BAT file (windows cmd lines are the limit of my programming skills!) that renames the PLW file with time and date, this is fine for completed PLW files but it also grabs the file being written to by Picolog and renames it, this confuses Picolog. Is there a windows cmd line that will force Picolog to stop writing to file test1.PLW and then start writing to a "new" test1.PLW? So every hour Picolog would stop writing to file test1.PLW, this would be renamed and moved to another folder, Picolog would then start writing to a "new" test1.PLW file.

Chris
Site Admin
Site Admin
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: Time/date stamping PLW files

Post by Chris »

I think the only way you'll be able to do this is by stopping the recording each hour, and then doing you command line renaming.

You can set the PicoLog recorder to Repeat after delay (File, New Settings, Recording), and set a restart delay.

The next screen, Sampling Rate, allows you to set a time to stop after, so this could be set to 1 hour.

You will then need to synchronise the batch file to run during the restart delay.

Hope this helps.

Mike7777777
Newbie
Posts: 0
Joined: Mon Aug 30, 2010 9:09 am

Re: Time/date stamping PLW files

Post by Mike7777777 »

Thanks
I'll let you know how I get on with this,

FrancisL
Newbie
Posts: 1
Joined: Wed Jan 31, 2007 12:32 pm
Location: England

Re: Time/date stamping PLW files

Post by FrancisL »

The PLW Files DO contain the start date and time
Take a look at the Picolog Manual at http://www.picotech.com/document/pdf/plw.en-3.pdf
Page 102
.plw data file
The .plw file has a fixed-length header, followed by a data record for each sample. It
is terminated by a copy of the .pls file that was used to record it.
The first two-byte field of the header contains the length, in bytes, of the header. The
remaining fields are as follows:
.......
PICODATE start_date;
FULLTIME start_time;
Given the start date and time and the interval each sample can be related to a date/time

That is how I managed to do this:
http://www.whereismybike.co.uk/CavityWa ... ation.html

Post Reply