Alarms: Buffers Full: Save All Buffers without overwriting

Forum for discussing PicoScope version 6 (non-automotive version)
Post Reply
Tatattu
Newbie
Posts: 0
Joined: Tue Jun 03, 2014 11:37 am

Alarms: Buffers Full: Save All Buffers without overwriting

Post by Tatattu »

Hey there,
thanks for you help in advance, I assume it's an easy and short question. But I'm a total newbie when it comes to working with PicoScope, so I would appreciate it a lot if you answer as simple as you can.

I want to work with alarms. When the buffer is full I want to save all buffers and start all over again-BUT without overwriting the recent data. I want it to create a new folder and save all buffers there with a different name.
Any idea if that's possible?
Thank you so much for your time and help!
Cheerio
Tanja

Karunen
Advanced User
Advanced User
Posts: 194
Joined: Thu Nov 21, 2013 9:22 am

Re: Alarms: Buffers Full: Save All Buffers without overwriti

Post by Karunen »

Hi Tanja,

When the alarm tries to creates a file it should check and if it already exist create a file with a number extension.

For example if you want to save them as test.psdata,
the next buffers will be called test(1).psdata and
the next will be called test(2).psdata.

Alternatively you can create a .bat file that can be run as part of the alarm to change the file names.

But this would require a value or names stored somewhere so you do not end up overwriting a file.

Thanks,
Karunen

Technical Specialist
Pico Technology

Tatattu
Newbie
Posts: 0
Joined: Tue Jun 03, 2014 11:37 am

Re: Alarms: Buffers Full: Save All Buffers without overwriti

Post by Tatattu »

Hey Karunen,
thank you so much for your help!
What you described works for me when I set an alarm to "save recent buffer". But that's not what I meant to do. I was thinking about "save all buffers", so each folder contains about 1000 up to 10000 waveforms and the alarms creates a new folder after the other buffer was filled up and saved. Is that possible?
Otherwise I had to change the buffer to only contain one waveform and work with the "save recent buffer". In that case it checks for the filename and changes it automatically-like you already described.
Thank you again so much for your time and help!
Tanja

Tatattu
Newbie
Posts: 0
Joined: Tue Jun 03, 2014 11:37 am

Re: Alarms: Buffers Full: Save All Buffers without overwriti

Post by Tatattu »

Hey Karunen,
in addition I am working with Matlab which apparently has a problem with the period in the file name. For example test.csv; test (1).csv;....
To be honest I didn't understand the suggestion you made mentioning the BAT file. Could you explain it to me? I appreciate your help a lot-thanks!
Tanja

Karunen
Advanced User
Advanced User
Posts: 194
Joined: Thu Nov 21, 2013 9:22 am

Re: Alarms: Buffers Full: Save All Buffers without overwriti

Post by Karunen »

Hi Tanja,

Apologies I did not realise you where saving as CSV.

What you could do is set the alarm to save all buffer as psdata files.

Then run the BAT file attached below
(please make sure the BAT file is in the same folder as the psdate file)
groupconvert.zip
converts all psdata files in the same folder into csv
(169 Bytes) Downloaded 391 times
BAT files can send calls to the command prompt to control the pc and the applications on it.

The BAT file attached uses the command prompt to get PicoScope to convert the files into CSV.

Please note you can edit the file using notepad.

The MATLAB we used has no issues opening a file like test (13)_01.csv or test (2).csv

Thanks,
Karunen

Technical Specialist
Pico Technology

Tatattu
Newbie
Posts: 0
Joined: Tue Jun 03, 2014 11:37 am

Re: Alarms: Buffers Full: Save All Buffers without overwriti

Post by Tatattu »

Hello Karunen,
thank you so much for your help. Everything works just fine. And my apologies for not mentioning the csv-files.
I just have one last question: is there any option to make the conversion faster? Since I have to make great statistics I have to work with a lot of waveforms. The BAT-file works perfect-but it is not that fast. Do you have an idea?
Thank you so much for your help!
Tanja

Karunen
Advanced User
Advanced User
Posts: 194
Joined: Thu Nov 21, 2013 9:22 am

Re: Alarms: Buffers Full: Save All Buffers without overwriti

Post by Karunen »

Hi Tanja,

Please accept my apologies I made a mistake.

You can set up the save all buffers alarm so that it will insert the time into the name.

When choosing the file please write something along the lines of test%time%.csv this will create a folder and save all the buffers as .csv files.

Without overwriting the previous set of data.

Kind Regards,
Karunen
Karunen

Technical Specialist
Pico Technology

Post Reply