Problem with time Data from Pico 6404D

Post your MATLAB discussions here
Post Reply
Fenix
Newbie
Posts: 0
Joined: Mon Aug 04, 2014 8:34 am

Problem with time Data from Pico 6404D

Post by Fenix »

Hi,

I have a Problem with the Time Data which i get with Matlab. I enabled only Channel A with the Setchannel Method:

Code: Select all

calllib('PS6000','ps6000SetChannel',scope_handle,   'PS6000_CHANNEL_A'   ,  true ,  'PS6000_DC_1M' ,'PS6000_5V',      0       ,    'PS6000_BW_FULL'    ); %Channel A
   
Any other channel is disabled. I read 2 Million Values in my Buffer (Which has Obv. the Size 2 Million).

SetBuff Method i use:

Code: Select all

pBuffer = libpointer('int16Ptr',zeros(2000000,1));
%        libname      functionname        handle    channel  buffer  bufferLth downsampleRatioMode
calllib('PS6000','ps6000SetDataBuffer',scope_handle,   0   ,pBuffer,2000000,0);
New Measurement Method:

Code: Select all

calllib('PS6000','ps6000RunBlock',scope_handle,0,   2000000    ,    0   ,     0    ,[],     0      ,[],[]);
Then with GetValue method i fill my Array with the Data from picomemory:

Code: Select all

noOfSamplesPtr = libpointer('ulongPtr',2000000);
overflowPtr = libpointer('int16Ptr',0);

% Get Values
%        libname   functionname      handles    startIndex   noOfSamples  downSampleRatio downSampleRatioMode segmentIndex  overflow
calllib('PS6000','ps6000GetValues',scope_handle,start_index,noOfSamplesPtr,0,'PS6000_RATIO_MODE_NONE',      0     ,overflowPtr);
after i retrieve the Data i run a fft Function and plot the results to get the frequency. I run the Pico in combination with a external Signal Generator which generates me exactly 10 MHz and passes this to Channel A( as i said above it´s the only active channel). The Problem which i Encounter now is that i allways get the wrong frequency back ... it seems like it uses not 5GS/s (but i used gettimebase2 and it Returns 0.2 timeinnsecs which means it runs correctly with 5Gs/s?) ... dont know what i did wrong so far... the Software from PicoScope itself (Version 6) Shows the right Frequency of 10 MHz ... only my matlab data is wrong :/ would be thankful for any help

lg

p.s. my english is not that well ... iam not a nativ Speaker many apologies in Advantage for that

Hitesh

Re: Problem with time Data from Pico 6404D

Post by Hitesh »

Hi Fenix,

Are you using a trigger at all?

What does the raw data values returned look like?

How are you making the measurements using PicoScope 6? Could you please click View -> Properties and view the settings PicoScope 6 is using for the data capture?

Are you able to calculated the number of cycles of the waveform in the data buffer? You should have around 4000 cycles. You can use the example in this post to do this:

http://www.picotech.com/support/topic13207.html

What does the fft show? Are you using the MathWorks example?

http://www.mathworks.co.uk/help/matlab/ref/fft.html

Please note that Pico Technology is not responsible for the content of third party sites.

Regards,

Post Reply