Capture Date/Time in Data export formats

Forum for discussing PicoScope version 6 (non-automotive version)
Post Reply
chris_l
Newbie
Posts: 0
Joined: Fri Oct 23, 2020 1:12 pm

Capture Date/Time in Data export formats

Post by chris_l »

Hello Pico community,

I need to make a connection of events in signals captured by a Picoscope oscilloscope and the time of day when these events happend. With a .psdata file the capture date/time can be viewed in PicoScope 6 in the properties panel.
Since I have quite a number of .psdata files which need to undergo further automatic processing outside of PicoScope 6 I use the command line interface for conversion of the data files to .csv/.txt. I could also use the .mat format but for neither of these formats the resulting files contain the capture date/time which is essential for me to know for further processing steps.
I am wondering if there is any way to extract the capture date/time information from the .psdata files in way that can be automated?
@Pico Technology Staff: If this is not possible I would kindly ask you to consider including that feature in a future update of the PicoScope software.

Kind regards
Christian

Gerry
PICO STAFF
PICO STAFF
Posts: 923
Joined: Mon Aug 11, 2014 11:14 am

Re: Capture Date/Time in Data export formats

Post by Gerry »

Hi Chris,

You can do what you ask by passing the time information to the converted file in the file name itself. There are 2 ways that you can do this.

1/ In PicoScope 6, you can set an alarm to automatically save a file on capture or buffer/s full and name the file %time%.psdata. Then every time the file is captured it will append the time/date to the file name (see below data file).
Time stamped file save.psdata
(84.96 KiB) Downloaded 56 times

2/ You can create the time stamp in a batch file as shown here: topic38401.html (you would want to move the setting of the Current Time immediately before the Run.Pressed=True command).

Regards,

Gerry
Gerry
Technical Specialist

chris_l
Newbie
Posts: 0
Joined: Fri Oct 23, 2020 1:12 pm

Re: Capture Date/Time in Data export formats

Post by chris_l »

Hi Gerry,

thanks for your prompt answer! As far as I understand, both of your proposed solutions work well with files that have not been recorded yet, meaning that you have to make configurations to the file naming scheme before the files are actually captured.
But is there a solution for files that have already been recorded and saved without the capture timestamp in the filename?
I guess essentially I am asking for a way to extract the capture day/time from the .psdata file unless there is a way to extract it via the command line interface or the automation commands. If this is not possible, could such a feature be included in say the export as .csv/.txt/.mat or is there a specific reason why it should not be possible?

Kind regards
Christian

Gerry
PICO STAFF
PICO STAFF
Posts: 923
Joined: Mon Aug 11, 2014 11:14 am

Re: Capture Date/Time in Data export formats

Post by Gerry »

Hi Christian,

I will certainly put this forward as an enhancement request for our Development Team. However, just be aware that if it is considered for prioritisation, it may not be a quick fix.

Regards,

Gerry
Gerry
Technical Specialist

chris_l
Newbie
Posts: 0
Joined: Fri Oct 23, 2020 1:12 pm

Re: Capture Date/Time in Data export formats

Post by chris_l »

Hey Gerry,

Thank you for your support, I appreciate your effort!

Best regards
Christian

dougxr
User
User
Posts: 3
Joined: Thu Jan 18, 2018 12:25 pm

Re: Capture Date/Time in Data export formats

Post by dougxr »

Hi,

I would find such a feature to be useful too.

I've used alarms to save data quite a few times but my post processing makes use of the automatic numbering suffix, e.g.
...
data_measured (2).psdata
data_measured (3).psdata
data_measured (4).psdata
...
to sequentially post-process the files. If the date and time were used in the filename it would make it more awkward; I'd have to increment the filename by least significant value, check if it exists, if it does then load it and if it doesn't loop back around. I think. And I can look at doing this in future but, like the OP, I've got some previously recorded data that I'd like to add a time to.

If the capture time and date and any other information could be extracted into a separate file that would be fine for my use, i.e. I'm not suggesting a change to the .CSV (or other) format. I don't know if that would resolve the OP's concern.

Or is that information accessible in another format? I see the OP mentioned it's not in the .mat file but is it accessible from any other? I guess .psdata is not an open format but if it is then I could look at reading some data from that.

Just thought I'd put a post in to show that Christian isn't the only person who would be helped by this sort of feature.

Regards,

Doug.

Post Reply