Unable to increase the number of memory segments on PS4824

Post your MATLAB discussions here
Post Reply
Lilian
Newbie
Posts: 0
Joined: Fri Jun 05, 2015 8:33 am

Unable to increase the number of memory segments on PS4824

Post by Lilian »

Hello

I'm using a PS4824 with MatLab and i would like to set the number of memory segment at 512 in order to get 300+ measurements.
However, when there are more than 128 segments, i have an error with the fonction 'ps4000aGetTimebase2' and the corresponding status is 'PICO_TOO_MANY_SAMPLES’.

I can't figure out why this occur and i would apreciate some help.

thank you :)

Hitesh

Re: Unable to increase the number of memory segments on PS48

Post by Hitesh »

Hi Lilian,

The ps4000aMemorySegments function will return the maximum number of samples available per segment (independent of the number of channels enabled).

You can use this information to work out how many samples you can request per waveform and accordingly use this with the ps4000aGetTimebase2 function.

Regards,

Lilian
Newbie
Posts: 0
Joined: Fri Jun 05, 2015 8:33 am

Re: Unable to increase the number of memory segments on PS48

Post by Lilian »

Hello

I saw on the programer's guide that we can set the number of samples in 'ps400aGetTimebase2' but i cannot do it on matlab.
i just need 40k samples per waves whereas maxSamples=262048 with 512 segments, 2 channels and timebase=1.

i tried this line

Code: Select all

[status.getTimebase2, timeIntNs, maxSamples] = invoke(ps4000aDeviceObj, 'ps4000aGetTimebase2', timebase,40000,0);
but MatLab return 'PICO_SEGMENT_OUT_OF_RANGE' , wich is normal if this line said that 40000 segments are required.

Hitesh

Re: Unable to increase the number of memory segments on PS48

Post by Hitesh »

Hi Lilian,

You will need to set the numPreTriggerSamples and numPostTriggerSamples using the 'set' function before calling the ps4000aGetTimebase2 function. E.g.

Code: Select all

set(ps4000aDeviceObj, 'numPostTriggerSamples', 1000000);
The ps4000aGetTimebase2 function will use the sum of these two values for the noSamples parameter required by the underlying driver function (defined in the Programmer's Guide).

Hope this helps,

Lilian
Newbie
Posts: 0
Joined: Fri Jun 05, 2015 8:33 am

Re: Unable to increase the number of memory segments on PS48

Post by Lilian »

Hi Hitesh

this seems working. :D

thank you very much for your help!

Lilian

Post Reply