Test and Measurement Forum

DataLogger 1216 Achieve 1MS/s in Matlab possible?

Post any questions you may have about our current range of USB data loggers

DataLogger 1216 Achieve 1MS/s in Matlab possible?

Postby Spiros » Wed Apr 06, 2016 1:46 pm

Hello.
I have a signal with 60kHz frequency. My goal is to record at least 120K Samples in less than half a second.

I have the PicoLog DataLogger 1216 which can have sampling rate in block mod at 1MS/s using PicoScope and API.

So, in theory, using Single mod I shall be able to get 120K samples in 0.12 seconds (because 1us/sample), however I can only get 120K smaples in 1.2 seconds (10us/sample)

Code: Select all
%% Load Libraries
loadlibrary('pl1000.dll','pl1000Api.h','mfilename', 'mHeader')
unloadlibrary('pl1000')
loadlibrary('pl1000.dll',@mHeader)

%% Open the unit - returns a handle to the device
unithandle = 0;
[status_open, unithandle] = calllib('pl1000', 'pl1000OpenUnit', unithandle);

%% Set Up acquisition
blockLength=500;
nrSamples = 1e6;

%% Initialize Some Variables
channelIDs = [4];
nrOfValues = 120000; %%%% Number of Smaples to get
values = zeros(1,nrOfValues);
overflow = 0;
triggerIndex = 0;
ready = false;

%% Get Data
[status_SetInterval] = calllib('pl1000', 'pl1000SetInterval', unithandle, blockLength,nrSamples, channelIDs, length(channelIDs));
[status_Run] = calllib('pl1000', 'pl1000Run', unithandle, nrOfValues,'BM_SINGLE'); 
while ~ready
   [status_Ready, ready] = calllib('pl1000', 'pl1000Ready', unithandle, ready);
end
[status_GetValues, values, nrOfValues, overflow, triggerIndex] = calllib('pl1000', 'pl1000GetValues',unithandle, values, nrOfValues, overflow, triggerIndex);

%% Close the unit
status_close = calllib('pl1000', 'pl1000CloseUnit', unithandle);
unloadlibrary('pl1000');


Do you have any idea why despite the fact that I have set the acquisition mode to 'BM_SINGLE' i still get 10us/S and not 1us/S????

Thank you in advance!
Spiros
Newbie
 
Posts: 0
Joined: Wed Apr 06, 2016 1:26 pm

Re: DataLogger 1216 Achieve 1MS/s in Matlab possible?

Postby Hitesh » Wed Apr 13, 2016 8:46 am

Hi Spiros,

According to the Programmer's Guide for the PicoLog 1000 Series devices:

The fastest possible sampling interval is 1 microsecond, when the number of samples
is 8192 divided by the number of channels active and the capture mode is
BM_SINGLE. Under all other conditions, the fastest possible sampling interval is 10
microseconds per channel.

Please try a total of 8192 samples shared between the channels to see if you can achieve a 1 us interval first, then try increasing the number of samples above that value to see what happens.

Regards,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2000
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: DataLogger 1216 Achieve 1MS/s in Matlab possible?

Postby Spiros » Wed Apr 13, 2016 9:10 am

Hitesh wrote:Hi Spiros,

According to the Programmer's Guide for the PicoLog 1000 Series devices:

The fastest possible sampling interval is 1 microsecond, when the number of samples
is 8192 divided by the number of channels active and the capture mode is
BM_SINGLE. Under all other conditions, the fastest possible sampling interval is 10
microseconds per channel.

Please try a total of 8192 samples shared between the channels to see if you can achieve a 1 us interval first, then try increasing the number of samples above that value to see what happens.

Regards,



Hello Hitesh!
Thank you for your reply!

I tried what you propose and I still get 10 us per sample.
So could it be that because of Matlab I cannot achive that speed?
Because in PicoScope I can get 1 us per sample, but similarly to Matlab with PicoLog I can get up to 10 us per sample.

Kind regards,
Spiros
Spiros
Newbie
 
Posts: 0
Joined: Wed Apr 06, 2016 1:26 pm

Re: DataLogger 1216 Achieve 1MS/s in Matlab possible?

Postby Hitesh » Wed Apr 13, 2016 9:53 am

Hi Spiros,

It is most likely due to the settings.

Are you using a 32-bit or 64-bit version of MATLAB and what is the version number of the pl1000.dll that you are using?

Regards,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2000
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: DataLogger 1216 Achieve 1MS/s in Matlab possible?

Postby Spiros » Thu Apr 14, 2016 6:56 am

I am using MATLAB Version: 8.4.0.150421 (R2014b).
The version number of the pl1000.dll is: 1.0.7.7.

I have upload an attachment with the code that I have uploaded above and all the dll files I am using, just to check if I am using the correct files.

Thank you for your assistance Hitesh!
Attachments
Pico_Test_x64_1.zip
(192.51 KiB) Downloaded 19 times
Spiros
Newbie
 
Posts: 0
Joined: Wed Apr 06, 2016 1:26 pm

Re: DataLogger 1216 Achieve 1MS/s in Matlab possible?

Postby Hitesh » Thu Apr 14, 2016 2:02 pm

Hi Spiros,

I have run some tests here using our SDK C console example and I have found that the maximum number of samples is 8128.

I will need to find out if this is intended, and if so, the Programmer's Guide will need an update.

How many channels do you need to capture data from?

Regards,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2000
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: DataLogger 1216 Achieve 1MS/s in Matlab possible?

Postby Spiros » Thu Apr 14, 2016 2:43 pm

I would like to get data from 2 channels (Channel 1 and 4).

However if this is not possible I shall get only from 1 channel if needed.

Thank you.

Kind regards,
Spiros
Spiros
Newbie
 
Posts: 0
Joined: Wed Apr 06, 2016 1:26 pm

Re: DataLogger 1216 Achieve 1MS/s in Matlab possible?

Postby Hitesh » Wed Apr 20, 2016 8:47 am

Hi Spiros,

Apologies for the delay but I've received confirmation that the limit is 8128 samples.

If you need to collect 120,000 samples at 1 MS/s with 1 or 2 channels you may wish to consider using an oscilloscope such as the PicoScope 2204A, 2205A, or the 2206A.

Regards,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2000
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire


Return to USB PC Data Loggers

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests