Maximum Segments at 4227

Post your C and C++ discussions here
blaenks
Newbie
Posts: 0
Joined: Thu Jul 01, 2010 10:42 am

Maximum Segments at 4227

Post by blaenks »

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

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Post by Robin »

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

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

Re: Maximum Segments at 4227

Post by blaenks »

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

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Post by Robin »

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

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

Re: Maximum Segments at 4227

Post by blaenks »

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

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Post by Robin »

Hi Mathias

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

Robin

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

Re: Maximum Segments at 4227

Post by blaenks »

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

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Post by Robin »

Hi Mathias

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

Robin

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Post by Robin »

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

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

Re: Maximum Segments at 4227

Post by blaenks »

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

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Post by Robin »

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
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Post by Robin »

Hi

Here is the fix

Robin
Attachments
PS4000.zip
(360.83 KiB) Downloaded 518 times

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

Re: Maximum Segments at 4227

Post by blaenks »

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

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Maximum Segments at 4227

Post by Robin »

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

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

Re: Maximum Segments at 4227

Post by blaenks »

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

Post Reply