Pico 6404D get´s the wrong Frequency

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

Pico 6404D get´s the wrong Frequency

Post by Fenix »

Setup:

I use the Pico 6404D in Combination with a Signal Generator which creats me exactly 10 MHz. With PicoScope Software 6 i get this back exactly. The Problem is that if i use Matlab to get the Data from my Picoscope and then Plot the Data i allways get the wrong frequency back (i dont even get a static Offset its dynamic ... :/). I use BlockMode my Buffer has 2 Million Values. And with the Function "ps6000GetTimebase2" i get for Timeintervall in nsecs 0.2 ... so i use 5GHz Sampling Frequency if iam correct. I use fft function on my raw values to determine the Frequency in the end ... it seems like iam not sampling static with 5GS/s (even tho i get this back with gettimebase2 method)...

SetBuffer Method:

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);
GetValue Method:

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);

RunBlock Method:

Code: Select all

calllib('PS6000','ps6000RunBlock',scope_handle,0,   2000000    ,    0   ,     0    ,[],     0      ,[],[]);
SetChannel Method: ( I disabled all other Channels)

Code: Select all

calllib('PS6000','ps6000SetChannel',scope_handle,   'PS6000_CHANNEL_A'   ,  true ,  'PS6000_DC_1M' ,'PS6000_5V',      0       ,    'PS6000_BW_FULL'    );
I would be thankful for any help.

edit: my english isnt that well (from Germany) apology in Advantage :P
lg

Karunen
Advanced User
Advanced User
Posts: 194
Joined: Thu Nov 21, 2013 9:22 am

Re: Pico 6404D get´s the wrong Frequency

Post by Karunen »

Hi Fenix,

Would you be able to send in the code to support@picotech.com?

Or could you test what the status code is being returned when you call ps6000GetTimebase2?

Kind Regards,
Karunen

Technical Specialist
Pico Technology

Post Reply