New *.pcs format

Having problems ? let us know the details here
Post Reply
zhg
User
User
Posts: 3
Joined: Mon Aug 16, 2021 7:51 am

New *.pcs format

Post by zhg »

Hi Dears,
Thank you for wonderful picoscope project.
We are using 6402D and 76824E devices with PicoScope-6-Beta program for our tasks.
But we meet problem, which only you can solve, because:
1. The *.psdata is readable/process-able only with picoscope himself.
2. The */*.mat is readable/process-able with Matlab package(thousand files for events).
3. The */*.csv(txt) is readable/process-able with Excel and c,c++(also thousand files for
events). We experienced to convert */*.csv(txt) files to one *.pcs file with all samples
located in one file. The structure/format is draw here:
The first column composed with channel number(0-A,1-B,..,4-E)
and the mantissa is Delta-T[ns] for bins. Further columns are actual
values for every bin. Lines finished with "\n".
The Start time is not important for us, because we need only relative time shifts
between channels or to the triggered channel.
0.80 0.000000 1.574803 1.574803...and so on
1.80 0.000000 0.000000 0.000000...
2.80 0.000000 -0.007874 -0.007874...
3.80 0.000000 -3.149606 0.000000...
4.80 -1.574803 0.000000 -1.574803...
0.80 1.574803 0.000000 1.574803...
1.80 0.000000 0.000000 0.000000...
2.80 0.000000 -0.007874 -0.007874...
3.80 0.000000 0.000000 -1.574803...
4.80 0.000000 0.000000 0.000000...
...................................................

In your PicoExam/picosdk-c-examples/* we tried to find any hint for *.psdata writing or
converting to */*.csv files function without success.
They only usable to test usb connections with picoscope or maybe we miss something?

The question/suggestion is:
Could you please add in PicoScope program Menu-Bar "File->Save as..." widget
for the extension *.pcs (in addition to *.psdata,*.csv,...) for data output with
mentioned above structure.
// Or may we ask to describe the structure for your *.psdata files?
Or may we ask for some hint about *.psdata structure description?
(if it not for internal usage only...)
Thanks in advance,
Hamlet Z.

bennog
Advanced User
Advanced User
Posts: 208
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: New *.pcs format

Post by bennog »

.psdata on closed format you don't get the format layout.

Depending on your skills and programming experience you can try to decode .psdata files.
they are not that complicated.

But why all the trouble i think it is easy to make a python or c++ converter van .CVS to .pcs

P.S. I have looked a little but can not find the definition or RFC for the pcs, can you give me a link.

Benno

zhg
User
User
Posts: 3
Joined: Mon Aug 16, 2021 7:51 am

Re: New *.pcs format

Post by zhg »

Hi Benno,
I'll answer for your every statement.
>>.psdata on closed format you don't get the format layout.
// To be clarified I am try to send you Tst20210823.tar.gz with following
// files with 1000 events distributed between channels C,D,E,G,H(G&H divide one input):
// 20210823-0003.psdata,(no-20210823-0004/*.csv),20210823-0004.pcs.
// But file to big to attach :-))
I have had reading the documentations, but can't find any hint about *.psdata file
structure. Maybe I miss something, please mention where is it written.
(You can screenshot it;-))

>>Depending on your skills and programming experience you can try to decode .psdata
>> files, they are not that complicated.
I hope my programming experience is enough to decode, but my "trial and error method"
means check all possible combinations to extract reasonably correct outputs.

>>But why all the trouble i think it is easy to make a python or c++ converter van .CVS to .pcs
I am using c++ to convert */*.csv to the one *.pcs file. It works without problem.

>>P.S. I have looked a little but can not find the definition or RFC for the pcs, can you
give me a link.
*.pcs format is our design, not yet published, but it is trivial and obvious.

Our method to work is to read/process files written by ASICs, if possible "online,onfly" mode. So the continuous mode very desired (to see the results "online", do not lose times for conversion...).
>>Benno
Hamlet

bennog
Advanced User
Advanced User
Posts: 208
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: New *.pcs format

Post by bennog »

>>Depending on your skills and programming experience you can try to decode .psdata
>> files, they are not that complicated.
I hope my programming experience is enough to decode, but my "trial and error method"
means check all possible combinations to extract reasonably correct outputs.
You need more than that :D

Why don't you use the SDK to read data directly from the scope in your .PCS format.
Then you can stream data for as long as your storage can keep up and store the data.

https://github.com/picotech/picosdk-c-examples

Benno

zhg
User
User
Posts: 3
Joined: Mon Aug 16, 2021 7:51 am

Re: New *.pcs format

Post by zhg »

Hallow Benno,
/*
>>Depending on your skills and programming experience you can try to decode .psdata
>> files, they are not that complicated.
I hope my programming experience is enough to decode, but my "trial and error method"
means check all possible combinations to extract reasonably correct outputs.

You need more than that :D

Why don't you use the SDK to read data directly from the scope in your .PCS format.
Then you can stream data for as long as your storage can keep up and store the data.

https://github.com/picotech/picosdk-c-examples

Benno
*/
I cloned "https://github.com/picotech/picosdk-c-examples" and really find "picohrdlCon.c"
which have an output for "test.csv" file, but program need "libpicohrdl-1.0/HRDL.h"
with many HRDL...(...) functions.
They absent in /opt/picoscope/... directories.
Can you prompt me where can I find "libpicohrdl-1.0/HRDL.h" and codes.
I am working with "g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0" and easely translat all files
from SDK. For "picohrdlCon.c" I need "libpicohrdl-1.0/HRDL.h".

Best Regards,
Hamlet Z.

Martyn
Site Admin
Site Admin
Posts: 4501
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: New *.pcs format

Post by Martyn »

The HRDL code is for our High Resolution Data Loggers the ADC20 and ADC24 which will not help you.

For the 6404D you need the ps6000 example, we do not have any C code on GitHub for the 6824E so you will need to email support@picotech.com for assistance
Martyn
Technical Support Manager

Post Reply