Test and Measurement Forum

Maximum Segments at 4227

Post your C and C++ discussions here

Maximum Segments at 4227

Postby blaenks » Tue Jul 06, 2010 10:46 am

Hi,

I wanna measure 10 seconds and in this 10 seconds there is a unknown amount of trigger events. Each trigger event i have to sample with 8ns, and the duration of the measurement is 20µs. So I have around 2500 Samples per Trigger event. What i wanna make is for example 1000 segments with each 2500 samples. Is this possible? because i tried the GetValuesBuffer() command and there i can not read more than 128 segments at once. So how can i get the rest of the segments?

Is it also possible to read the saved values when the 10 seconds are over but i did´t get 1000 trigger events?

Thanks for you help in advance!

Mathias
blaenks
Newbie
 
Posts: 0
Joined: Thu Jul 01, 2010 10:42 am

Re: Maximum Segments at 4227

Postby Robin » Thu Jul 08, 2010 8:22 am

Hi Mathias

If you are using rapid block mode, you can only access the data once collection is complete and you need to specify the number of captures in advance. Any calls to GetValues or GetValuesBulk will read the data from the device, which is available until you call Run again.

You will only be able to access as many segments as trigger events have occurred.

Do you need to use rapid block mode or can you use normal block mode?

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Postby blaenks » Thu Jul 08, 2010 6:05 pm

Hi Robin,

Thanks for your answer.

Yes, I think that I have to use the rapid block mode (minimum time between two measurements is 2.5 µs in block mode, isn´t it?) that I can measure one pulse after another and save every pulse in a single segment.

Can I read with GetValuesBulk all segments which saved data at once or just a certain amount? Or do I have to use GetValues in a loop to read the data?

You will only be able to access as many segments as trigger events have occurred.


So its possible to stop capture and read the segments even when the set amount of captures is not reached?

Thanks

Mathias
blaenks
Newbie
 
Posts: 0
Joined: Thu Jul 01, 2010 10:42 am

Re: Maximum Segments at 4227

Postby Robin » Fri Jul 09, 2010 12:59 pm

Hi Mathias

My previous reply was a bit confusing, sorry!

You can't get the data until all of your captures are complete. If you stop the capture early, you won't be able to get the data.

If it's a feature that you require (to be able to abort the collection and access however many captures have been acquired), we may be able to add it to the driver.

Can I read with GetValuesBulk all segments which saved data at once or just a certain amount? Or do I have to use GetValues in a loop to read the data?


You can do either. GetValuesBulk can be used to get all or a subset of the captures. GetValues can be used to retrieve one capture at a time.

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Postby blaenks » Fri Jul 09, 2010 1:35 pm

Hi Robin,

Yes, thats a feature which i would need.
To capture so long until I have all my set captures or to stop the capture after a certain time (or another reason) and read then all the captures, even when the amount is not the same as the set amount.

So if it´s not a big deal do add this to the driver, it would be very nice.

Thanks

Mathias
blaenks
Newbie
 
Posts: 0
Joined: Thu Jul 01, 2010 10:42 am

Re: Maximum Segments at 4227

Postby Robin » Fri Jul 09, 2010 1:42 pm

Hi Mathias

I will pass the request on and let you know what happens.

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Postby blaenks » Tue Jul 13, 2010 5:18 am

Hi Robin,

I have just an other question:

Is it possible in rapid block modus to count the trigger events and then transfer the counter value + a reference time while I´m capturing to the PC so that I know while I´m measuring how many events occur?

Thank´s

Mathias
blaenks
Newbie
 
Posts: 0
Joined: Thu Jul 01, 2010 10:42 am

Re: Maximum Segments at 4227

Postby Robin » Tue Jul 13, 2010 9:15 am

Hi Mathias

It's not possible to count the number of triggers during the rapid block capture.

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Postby Robin » Tue Jul 13, 2010 12:33 pm

Yes, thats a feature which i would need.


Hi Mathias

We have looked in to this and unfortunately it cannot be easily done. This is because device only tells the driver when all segments have been captured. Therefore, it is not possible to do this without changing the way the scope works.

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Postby blaenks » Wed Jul 14, 2010 10:01 am

Ok, I understand, anyway thanks for your help!

So I was trying to find another solution:

To have a maximum measure time i´m using now the function with the autoTrigger_ms:

ps4000SetTriggerChannelProperties(handle, &properties, 1, 0, autoTrigger_ms)

but I have a problem:

when I set, for example, 500 captures and the autoTrigger_ms time to 120 (120ms) and I make sure that I don´t have any triggers on my Hardware (I checked this, I set the autoTrigger_ms to NULL and nothing was captured) I was expecting a capture time of 60s (120ms*500=60s) but all captures were complete after under 40 seconds.

Did I make something wrong? Or has it maybe something to do that I use the 4227 PicoScope?

Thanks

Mathias
blaenks
Newbie
 
Posts: 0
Joined: Thu Jul 01, 2010 10:42 am

Re: Maximum Segments at 4227

Postby Robin » Wed Jul 14, 2010 12:52 pm

Hi Mathias

This appears to be a bug that affects the 4226 and 4227 only.

I will post an updated driver here once it has been fixed.

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Postby Robin » Mon Jul 19, 2010 9:39 am

Hi

Here is the fix

Robin
Attachments
PS4000.zip
(360.83 KiB) Downloaded 143 times
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Postby blaenks » Tue Jul 27, 2010 9:45 am

Hi,

I just overwrote the old ps4000.dll with the new one in my C++ project, but nothing changed....

Do I have to do more, or the bug isn´t fixed?

Thanks

Mathias
blaenks
Newbie
 
Posts: 0
Joined: Thu Jul 01, 2010 10:42 am

Re: Maximum Segments at 4227

Postby Robin » Tue Jul 27, 2010 1:32 pm

Hi Mathias

I have just re-tested this DLL and the auto trigger time was correct.

Is your application definitely running this DLL?

Are your captures still completing in 40 s?

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Postby blaenks » Wed Jul 28, 2010 9:12 am

Hi,

Can you maybe give me also a updatet ps4000.lib?

I don´t have so much of an idea about dll´s and lib´s so I don´t know what I need exactly to update my C++ Project in VS 2008 with the changes.

Thanks

Mathias
blaenks
Newbie
 
Posts: 0
Joined: Thu Jul 01, 2010 10:42 am

Next

Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests