Test and Measurement Forum

Trouble Connecting 3404B to x64 Matlab 2013b

Post your MATLAB discussions here

Trouble Connecting 3404B to x64 Matlab 2013b

Postby TylerCaulk » Mon Apr 28, 2014 2:17 pm

Hi guys,

I'm having some difficulty figuring out the exact procedure for connecting my 3404B to Matlab with Instrument Control Toolbox 3.4.

I've downloaded the PS3000asdk_r10_5_0_28 file and created the location C:\Pico SDK to put it in.

The install procedure says: "The location of the SDK and the PS3000A folder must be added to the MATLAB Path"

I'm assuming that the PS3000A folder being referred to is the one inside the MATLAB folder, so that's easy enough, but I am not sure what exactly I'm supposed to add for the "location of the SDK". Would this just be the main PS3000asdk_r10_5_0_28 folder?

So, the very first thing I would type into Matlab after downloading the PS3000asdk_r10_5_0_28 files would be:

Code: Select all
>> addpath 'C:\Pico SDK\PS3000asdk_r10_5_0_28'
>> addpath 'C:\Pico SDK\PS3000asdk_r10_5_0_28\MATLAB\ps3000a'

Assuming that is correct, the next thing I would do would be to connect to the device using the following command, according to the instructions:

Code: Select all
ps3000a_object = icdevice('ps3000a', '');

Which gives the following error:

Code: Select all
Error using icdevice (line 225)
The specified MATLAB instrument driver could not be found.  DRIVER must be on the MATLAB path.

I don't know if the correct command should have been obvious to me based on the way the instructions were written, but as an ME with relatively limited programming skills compared to others on this forum, this was not very clear. By searching the forums, I realized that I needed to use the following command instead:

Code: Select all
>> ps3000a_object = icdevice('PS3000a_IC_drv');

Getting closer, but still received the following messages:

Code: Select all
Warning: The library name case did not match the file name.
The library will be named "ps3000a".
Error using instrument/delete (line 82)
Operation failed: An error occurred while executing the driver disconnect code.
Library was not found
If this error is not an instrument error, use MIDEDIT to inspect the driver.

Error in icdevice (line 278)

I found the same error in another thread, but the suggested fix was not very clear, and no resolution was ever posted. So, this is where I am stuck. I've found some other information suggesting that I need to use the loadlibary command, but it's not written in the instructions anywhere, and the exact files names I need to load are not given in any of the posts I've read, as none that mentioned it seem to be using a 3000 series scope.

I get the feeling that I am missing some major step before I ever even open Matlab. Maybe something with Visual Studio? (which I don't have...) I'm not sure.

Any help would be greatly appreciated.


Tyler Caulk
Technica Motorsports
Posts: 0
Joined: Thu Jan 02, 2014 10:03 pm
Location: Atlanta, GA

Re: Trouble Connecting 3404B to x64 Matlab 2013b

Postby Hitesh » Tue Apr 29, 2014 8:16 am

Hi Tyler,

The Instrument Driver package for the PicoScope 3000 series was released prior to 64-bit dlls being provided hence the documentation does not cover the installation process. I will request for the documentation to be updated accordingly.

You are correct with adding the location of the SDK and the 'ps3000a' directory to your path. You will also need to add the path to the ps3000aWrap.dll (located in the SDK's Wrapper\Release\x64 folder) to your path or copy the dll to the top level SDK directory.

With regards to creating the device object:

Code: Select all
ps3000a_object = icdevice('PS3000a_IC_drv');

There is an error in the documentation so this will be corrected.

The reason for the warning message is that the 64-bit dll is named 'ps3000a.dll' whereas the 32-bit dll is 'PS3000a.dll' which is what the Instrument Driver connection code is expecting - please rename the dll to 'PS3000a.dll'.

The error is likely to be due to the wrapper dll not being found.

There are also some additional files that you will need which I have attached below - please copy these into the ps3000a folder (you can overwrite the PS3000aMFile and ps3000aWrapMFile that already exist in the folder).

64-bit prototype and thunk dll files.
(53.05 KiB) Downloaded 149 times

The last step if you have not already done so, is to install Windows 7.1 SDK as this is required by MATLAB 64-bit:


Once you have installed this, please run the mex -setup command in MATLAB, and follow the prompts to set your compiler to the Microsoft 7.1 SDK compiler.

I hope this helps.

Technical Support Engineer
Site Admin
Site Admin
Posts: 2549
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