Test and Measurement Forum

Time/date stamping PLW files

Post general discussions on using our drivers to write your own software here

Time/date stamping PLW files

Postby Mike7777777 » Mon Mar 28, 2011 9:14 pm

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
Mike7777777
Newbie
 
Posts: 0
Joined: Mon Aug 30, 2010 9:09 am

Re: Time/date stamping PLW files

Postby Chris » Wed Mar 30, 2011 1:41 pm

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.
Chris
Site Admin
Site Admin
 
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: Time/date stamping PLW files

Postby Mike7777777 » Thu Mar 31, 2011 6:50 am

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.
Mike7777777
Newbie
 
Posts: 0
Joined: Mon Aug 30, 2010 9:09 am

Re: Time/date stamping PLW files

Postby Chris » Thu Mar 31, 2011 3:30 pm

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.
Chris
Site Admin
Site Admin
 
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: Time/date stamping PLW files

Postby Mike7777777 » Tue Apr 05, 2011 10:42 am

Thanks
I'll let you know how I get on with this,
Mike7777777
Newbie
 
Posts: 0
Joined: Mon Aug 30, 2010 9:09 am

Re: Time/date stamping PLW files

Postby FrancisL » Sat Apr 09, 2011 4:32 pm

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
FrancisL
Newbie
 
Posts: 1
Joined: Wed Jan 31, 2007 12:32 pm
Location: England


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests