Test and Measurement Forum

PicoScope 6402B programming in matlab

Post your MATLAB discussions here

PicoScope 6402B programming in matlab

Postby florix » Mon Oct 28, 2013 1:22 pm


I would like to program a PicoScope 6402B.

To open the PicoScope I tried the following matlabcode.
Code: Select all
loadlibrary( 'PS6000.dll' , 'ps6000Api') ;
calllib('PS6000' , 'ps6000OpenUnit', 0 , '[NULL]' ) ;

But the PicoScope not open.

There are code examples for the 6000 Serie?

Thanks in advance
Posts: 0
Joined: Mon Oct 28, 2013 12:59 pm

Re: PicoScope 6402B programming in matlab

Postby Hitesh » Tue Oct 29, 2013 10:33 am

Hello Florix.

Try the following:

Code: Select all
loadlibrary('PS6000.dll' , 'ps6000Api.h');

handle = 0;
serial = [];

[status.open, handle] = calllib('PS6000' , 'ps6000OpenUnit', handle , serial);

Instrument Drivers are planned for the PicoScope 6000 series but in the meantime, you can refer to the MathWorks guidance on how to call shared library functions to write your own code:


Please also refer to the guidance in this forum on writing MATLAB scripts.

Also, call libfunctionsview('PS6000') after loading the dll to view the input and output data types for a function call.

Don't forget to call the unloadlibrary function when you have finished :wink:

Note: Pico Technology is not responsible for the content of 3rd party websites.

Technical Support Engineer
Site Admin
Site Admin
Posts: 2749
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Return to MATLAB

Who is online

Users browsing this forum: No registered users and 1 guest