Error connecting PicoScope 3205A with matlab

Post your MATLAB discussions here
Post Reply
airul2180
Newbie
Posts: 0
Joined: Wed Dec 05, 2012 2:55 am

Error connecting PicoScope 3205A with matlab

Post by airul2180 »

Hello, i run the matlab program
PS3000a_IC_Generic_Driver_1buffer_RunBlock.m, however this error is came out. Onyone help me.Thanks

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
An error occurred while executing the driver connect code.
Index exceeds matrix dimensions.
If this error is not an instrument error, use MIDEDIT to inspect the driver.

Error in ==> PS3000a_IC_Generic_Driver_2buffers_Streaming_SimpleTrig at 62
connect(ps3000a_obj);
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

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

Re: Error connecting PicoScope 3205A with matlab

Post by Karunen »

Hi,

Have you move the wrapper from PS3000Asdk10.5.0.28\Wrapper\Release (32 or 64 bit depending on the MATLAB version you are using) to where all the other dlls are (the main SDK folder).

Also have you looked at the paths specified in MATLAB

Code: Select all

addpath('C:\PS3000asdk10.5.0.28')
please make sure that a path is specified to all the dlls.

Hopefully this helps.

Thanks,
Karunen

Technical Specialist
Pico Technology

airul2180
Newbie
Posts: 0
Joined: Wed Dec 05, 2012 2:55 am

Re: Error connecting PicoScope 3205A with matlab

Post by airul2180 »

Thanks for reply,
i al ready copy and paste in the same folder after i execute this error came out..
------------------------------------------------------------------------------------------------

Instrument Device Object Using Driver : PS3000a_IC_drv.mdd

Instrument Information
Type: Oscilloscope
Manufacturer: Pico Technology Ltd.
Model: PicoScope 3000 Series

Driver Information
DriverType: MATLAB generic
DriverName: PS3000a_IC_drv.mdd
DriverVersion: 1.0

Communication State
Status: open

Connected to PicoScope device:-
Handle: 16384
Batch/Serial number:
InstrumentModel:
??? An error occurred while executing the driver connect code.
Index exceeds matrix dimensions.
If this error is not an instrument error, use MIDEDIT to inspect the driver.

Error in ==> PS3000a_IC_Generic_Driver_2buffers_RunBlock at 77
connect(ps3000a_obj);

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

Re: Error connecting PicoScope 3205A with matlab

Post by Karunen »

Hi,

Unfortunately I am unable to replicate the issue,

Where did you download the MATLAB examples from?

Thanks,
Karunen

Technical Specialist
Pico Technology

airul2180
Newbie
Posts: 0
Joined: Wed Dec 05, 2012 2:55 am

Re: Error connecting PicoScope 3205A with matlab

Post by airul2180 »

Thanks for your reply, actually i got the example from the folder that i downloaded. PS3000a_IC_Generic_Driver_1buffer_RunBlock
PS3000a_IC_Generic_Driver_2buffers_RunBlock
all examples in the folder gave same error.Thanks

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

Re: Error connecting PicoScope 3205A with matlab

Post by Karunen »

Hi,

Apologies I meant which website did you download it from?

Did you download from this website http://www.picotech.com/software.html?

Thanks,
Karunen

Technical Specialist
Pico Technology

airul2180
Newbie
Posts: 0
Joined: Wed Dec 05, 2012 2:55 am

Re: Error connecting PicoScope 3205A with matlab

Post by airul2180 »

Yes i downloaded all files from http://www.picotech.com/. However, after i quit Matlab and reopen again,there is no error like that came out. But if i run again, same error came out which is

??? An error occurred while executing the
driver connect code.
Index exceeds matrix dimensions.
If this error is not an instrument error, use
MIDEDIT to inspect the driver.

Error in ==>
PS3000a_IC_Generic_Driver_1buffer_RapidBlock
at 66
connect(ps3000a_obj);

Thanks

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

Re: Error connecting PicoScope 3205A with matlab

Post by Karunen »

Hi,

This can be a issue if the device has not been disconnect before you try to connect.

This can occur if the script has not run all the way through,
by running the code:

Code: Select all

disconnect(ps3000a_obj);
You will disconnect from the device allowing you to connect to it again.

Thanks,
Karunen

Technical Specialist
Pico Technology

airul2180
Newbie
Posts: 0
Joined: Wed Dec 05, 2012 2:55 am

Re: Error connecting PicoScope 3205A with matlab

Post by airul2180 »

Thanks for reply,
After i applied this code same error came out.Is it Matlab2007b suitable or can be used to run sample program that i downloaded before.Thanks :(

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

Re: Error connecting PicoScope 3205A with matlab

Post by Karunen »

Hi,

Can you make sure you have run mex -setup to make sure you compiler that MATLAB is using is correct.

1. At the MATLAB command prompt type:
mex -setup
and press Enter.
2. Press 'y' when prompted for mex to locate installed compilers.
3. Select the following compiler:
MATLAB 32-bit: lcc-win32 C 2.4.1
MATLAB 64-bit: Microsoft Software Development Kit (SDK) 7.1
4. Verify the choice selected.

Would you mind running the script below and then running it again immediate to test if the issue is the compatibility with the script or the instrument control toolbox.

Code: Select all

% Edit as required
addpath('C:\Pico SDK\PS3000asdk_r10_4_3_1');
addpath('..\');
addpath('..\Functions');

% Create device
ps3000a_obj = icdevice('PS3000a_IC_drv', ''); % Specify serial number as 2nd argument if required.

% Connect device
connect(ps3000a_obj);

[methodinfo, structs, enuminfo, ThunkLibName] = PS3000aMFile;
info_status = invoke(ps3000a_obj, 'GetUnitInfo')

disconnect(ps3000a_obj);
We do recommend using version 2012b and later of MATLAB.

Kind Regards,
Karunen

Technical Specialist
Pico Technology

shahamatkhan
Newbie
Posts: 0
Joined: Wed Sep 07, 2022 9:21 am

Re: Error connecting PicoScope 3205A with matlab

Post by shahamatkhan »

I am having same kind of problem with my picoscope 3206A. I am using windows 7 with Matlab 2019 (64 bit).
I have installed the SDK 7.1 and selected it. I have also copied the required files to corresponding folders.


Instrument Information
Type: Oscilloscope
Manufacturer: Pico Technology Ltd.
Model: PicoScope 3000 Series (A API)

Driver Information
DriverType: MATLAB generic
DriverName: picotech_ps3000a_generic.mdd
DriverVersion: 1.2.24

Communication State
Status: open

Error using icdevice /connect (line 114)
An error occurred while executing the driver connect code.
Connect : unable to initialize device with wrapper - max. number of PicoScope 3000 series device is 4.
If this error is not an instrument error, use MIDEDIT to inspect the driver.

Error in ==> PS3000A_ID_Block_Example (line 57)
connect(ps3000aDeciceObj)



An urgent reply will be most appriciated

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Error connecting PicoScope 3205A with matlab

Post by Martyn »

This is a very old thread so I would suggest you check out our example code on GitHub and specifically follow the instructions in the readme file https://github.com/picotech/picosdk-ps3 ... ver#readme
Martyn
Technical Support Manager

Post Reply