PicoScope 6402B programming in matlab

Post your MATLAB discussions here
Post Reply
Posts: 0
Joined: Mon Oct 28, 2013 12:59 pm

PicoScope 6402B programming in matlab

Post by 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

Advanced User
Advanced User
Posts: 2856
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: PicoScope 6402B programming in matlab

Post by 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:

http://www.mathworks.co.uk/help/matlab/ ... tlab-.html

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.

Software Dev. Engineer

Post Reply