|
|
| Author |
Message |
Reinier Active User

Joined: 05 Sep 2007
Posts: 8
Location: Nijmegen
|
Posted: Thu Sep 06, 2007 10:16 am Post subject: single shot acquisition using full buffer size |
|
|
Hi,
Yesterday I received my new 5204. I have been experimenting and reading documentation, but so far no success. I need to sample one channel at (approximately) 32MSa/s and I want to use the full 128 MSamples. This will give me 4 seconds of data.
questions:
- how do I do this in with PicoScope 6 (6.0.11.2)?
- is it possible to oversample with 1GHz in order to get a higher resolution. (The signal bandwith I'm interested in is only 0-5 MHz) |
|
| Back to top |
|
 |
ziko Site Admin

Joined: 01 Dec 2006
Posts: 667
Location: St Neots
|
Posted: Thu Sep 06, 2007 1:38 pm Post subject: |
|
|
Hi and thank you for your post.
You cannot achieve this in PicoScope 6 as half the memory is used as a buffer. However if you wish to write your own software you can achieve this (there will be some small ovehead), also if you download the SDK there is a programming example that does this functionality.
You can achieve oversampling at 1GS/s however you would have to make sure the collection time is small enough as we limit the number of samples when using res enhancement or oversampling, due to the long processing time.
Hope this helps.
Kind regards
Ziko |
|
| Back to top |
|
 |
Reinier Active User

Joined: 05 Sep 2007
Posts: 8
Location: Nijmegen
|
Posted: Thu Sep 06, 2007 2:20 pm Post subject: |
|
|
Hi Ziko,
Thanks for your reaction. Unfortunately it was not the answer I was hoping for... Any chance on having this single shot, all memory feature soon in PicoScope? I'd rather not program it myself.
| Quote: | You can achieve oversampling at 1GS/s however you would have to make sure the collection time is small enough as we limit the number of samples when using res enhancement or oversampling, due to the long processing time.
|
Can you be more specific? I can imagine that processing at 1GS/s is difficult. Can you give me some numbers? If I want an effective sampling speed of 32MS/s and 100MS of data, what oversampling can be achieved? Or is the result of oversampling calculated after the acquisition is completed and thus reducing the effective buffer size? Is there an API to do this?
Kind regards, |
|
| Back to top |
|
 |
ziko Site Admin

Joined: 01 Dec 2006
Posts: 667
Location: St Neots
|
Posted: Fri Sep 07, 2007 12:07 pm Post subject: |
|
|
Hi, speaking to the software engineer he says
"1. There are plans to have a long single-shot capture with the whole memory depth, but not in the immediate future.
2. Resolution Enhance is not exactly the same as oversampling, since we are not actually sampling any faster, so working at 1GS/s always requires a 1GS/s actual scope sampling rate and always produces output data at 1GS/s regardless of the resolution increase (This is fully documented in the latest PS6 help file). The primary effects of the resolution enhancement being an increase in the effective resolution and an attenuation of high frequencies (low-pass filter). The best way to see what is happening is to use the Spectrum view to observe the low-pass effects of the resolution enhance feature.
At present, we can't provide 100M points of data with resolution enhancement on, since this is too much data to download and process whilst keeping the frame-rates reasonable. The limit is somewhere around the 1M mark.
"
Kind regards |
|
| Back to top |
|
 |
Sven User

Joined: 16 Jan 2008
Posts: 2
|
Posted: Wed Jan 16, 2008 8:29 am Post subject: |
|
|
| Reinier wrote: | | … I want to use the full 128 MSamples. … |
| ziko wrote: | …
You cannot achieve this in PicoScope 6 as half the memory is used as a buffer. However if you wish to write your own software you can achieve this (there will be some small ovehead), also if you download the SDK there is a programming example that does this functionality.
… |
Hello I have read the topic „single shot acquisition using full buffer size” and I want also use the full 128 MSamples.
I have write my own Software but I can’t collect more than 64MB.
My Code:
| Code: |
…
long maxSamples, Messwerte;
long puffer_groesse= 128 * 1024 * 1024;
Messwerte=64*1024*1024;
unit->channelSettings[0].range = 3;
unit->channelSettings[0].enabled = TRUE;
unit->channelSettings[1].range = 99;
unit->channelSettings[1].enabled = FALSE;
daten_puffer[0] = (short*) malloc(puffer_groesse * sizeof(short));
ps5000SetDataBuffer(unit->handle,
PS5000_CHANNEL_A,
daten_puffer[0],
Messwerte);
ps5000MemorySegments(unit->handle,1, &maxSamples)
printf("Maxsamle1: %i\n", maxSamples); // Output 134217278
g_ready = FALSE;
status = ps5000RunBlock(unit->handle,
0,
Messwerte,
timebase,
oversample,
&timeIndisposed,
0,
CallBackBlock,
NULL);
printf("Run Block : %i\0", status);// if Messwerte lower than 64MB --> Output 0 else ---> Output 29
while (!g_ready && !_kbhit())
{
Sleep(0);
}
ps5000Stop(unit->handle);
…
|
Every thing is fine, but if I change “Messwerte” to “64*1024*1024+1” g_ready is always false, status change to 29 and I get no Data.
I use the ps5000sdk_r6_0_12. |
|
| Back to top |
|
 |
ziko Site Admin

Joined: 01 Dec 2006
Posts: 667
Location: St Neots
|
Posted: Wed Jan 23, 2008 12:04 pm Post subject: |
|
|
Hi I forwarded your query to one of the software engineers and here is his input:
"You have opened the device, but not called ps5000SetChannel to switch channel B off. This needs to be done as when the unit is first opened the drivers default state is to enable both channels. This means that the maximum number of samples that can be collected for one channel is 64MB ( the actual number is available from ps5000MemorySegments maxSamples parameter divided by two.
To collect the full memory for one channel you should first call:
ps5000SetChannel (handle, PS5000_CHANNEL_B, 0, 1, PS5000_20V);
The last two parameters do not really matter as the channel is being disabled; you just need to be in range.
"
Hope this helps |
|
| Back to top |
|
 |
Sven User

Joined: 16 Jan 2008
Posts: 2
|
Posted: Thu Jan 24, 2008 7:09 am Post subject: |
|
|
Great it works, thank you for your support.
But now I have one additional question.
When you say that
| Code: |
ps5000SetChannel (handle, PS5000_CHANNEL_B, 0, 1, PS5000_20V);
|
make the channel settings.
Are these lines
| Code: |
unit->channelSettings[0].range = 3;
unit->channelSettings[0].enabled = TRUE;
unit->channelSettings[1].range = 99;
unit->channelSettings[1].enabled = FALSE;
|
that I have found in the example file useless?
So I have to use this
| Code: |
ps5000SetChannel (handle, PS5000_CHANNEL_A, 1, 1, PS5000_100MV);
ps5000SetChannel (handle, PS5000_CHANNEL_B, 0, 1, PS5000_20V);
|
instead?
Kind regards Sven |
|
| Back to top |
|
 |
gruntman Guru

Joined: 28 Sep 2006
Posts: 96
Location: Garden City, KS USA
|
Posted: Fri Jan 25, 2008 9:57 pm Post subject: |
|
|
Sven,
Yes this is correct. Statements like 'unit->channelSettings[0].range = 3' are simply used within the program itself, but have no direct control over the unit. ps5000SetChannel would be the function that directly controls the scope.
Regards,
Richard Boyd
Technical Specialist
http://www.pc-oscilloscopes.com |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|