3206a 'Error using icdevice/connect'

Post your MATLAB discussions here
ChristyS
Newbie
Posts: 0
Joined: Mon Jun 15, 2015 2:44 pm

3206a 'Error using icdevice/connect'

Post by ChristyS »

Hello,

I am trying to get the 3206a oscilloscope to work with Matlab. When I try to run the example script 'PS3000a_IC_Generic_Driver_1buffer_RapidBlock.m' I get the following error:

Error using icdevice/connect (line 113)
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_RunBlock (line
70)
connect(ps3000a_obj);


I am using 64bit Windows and Matlab. I believe I have copied all the correct files into the relevant directory. Please advise how to fix this error.


Regards,
Christy

ChristyS
Newbie
Posts: 0
Joined: Mon Jun 15, 2015 2:44 pm

Re: 3206a 'Error using icdevice/connect'

Post by ChristyS »

I think I've found the source of the error but I don't know how to fix it appropriately. Opening the Connect tab of PS3000a_IC_drv.mdd in the Instrument Driver Editor, on line 81 it asks for variant(2), but variant is actually empty. This seems to be the reason for "Index exceeds matrix dimensions." I gave it a value manually: variant = ['1' '2']; and the program runs but never finishes the data collection - I have to Ctrl+C out of it.

Hitesh

Re: 3206a 'Error using icdevice/connect'

Post by Hitesh »

Hi Christy,

It would be better if you use the Beta version of the Instrument Driver which is available to download via MathWorks MATLAB Central File Exchange

There are some updated examples in the ps3000a_BETA folder which simplify data collection.

I would suggest calling the following in MATLAB in case the driver has been locked:

Code: Select all

unloadlibrary('PS3000a');
unloadlibrary('ps3000aWrap');
Hope this helps,

ChristyS
Newbie
Posts: 0
Joined: Mon Jun 15, 2015 2:44 pm

Re: 3206a 'Error using icdevice/connect'

Post by ChristyS »

Hi Hitesh,

I am now getting the error:
Error using icdevice (line 284)
An error occurred while executing the driver create code.
No units found.
If the error is not an instrument error, use MIDEDIT to
inspect the driver.

Error in PS3000A_IC_Generic_Driver_Block (line 55)
ps3000aDeviceObj = icdevice('picotech_ps3000a_generic.mdd',
'');

The Oscilloscope does show up in the device manager, so I think it is connected properly.

Regards,
Christy

Hitesh

Re: 3206a 'Error using icdevice/connect'

Post by Hitesh »

Hi Christy,

If you have recently installed PicoScope 6.10.16 or PicoScope 6.11 Beta on your PC, please can you e-mail support@picotech.com indicating which version of MATLAB you are using and if it is a 32-bit or 64-bit version.

We can then provide some updated drivers. Please ensure that you call:

Code: Select all

disconnect(ps3000aDeviceObj)
in response to that error message in order to unload the libraries.

Regards,

ChristyS
Newbie
Posts: 0
Joined: Mon Jun 15, 2015 2:44 pm

Re: 3206a 'Error using icdevice/connect'

Post by ChristyS »

Scratch my last post (assuming it's approved before this one). It's working now but I had to comment out line 155 of resetDevice in the instrument driver function to get rid of the error:

Error using icdevice/connect (line 113)
An error occurred while executing the driver connect code.
The class PicoConstants has no property or method named
'AWG_UPDATE_ZERO'.
If this error is not an instrument error, use MIDEDIT to
inspect the driver.

Error in PS3000A_IC_Generic_Driver_Block (line 58)
connect(ps3000aDeviceObj)

After this error the scope would lock. I typed in the two commands you told me and it did unlock, but Matlab stopped responding after that.

Regards,
Christy

Hitesh

Re: 3206a 'Error using icdevice/connect'

Post by Hitesh »

Hi ChristyS,

Thanks for this - this will be fixed and available in the next release.

There is a different property in the PicoConstants.m file which should have been used.

Regards,

xukl
Newbie
Posts: 0
Joined: Mon Jul 20, 2015 7:59 pm

Re: 3206a 'Error using icdevice/connect'

Post by xukl »

Hi, ChristyS

Seems that I came across the similar error, could you explain me how to comment out line 155 of resetDevice?
I could not file any script or function named as ResetDevice. Thanks a lot!

ChristyS wrote:Scratch my last post (assuming it's approved before this one). It's working now but I had to comment out line 155 of resetDevice in the instrument driver function to get rid of the error:

Error using icdevice/connect (line 113)
An error occurred while executing the driver connect code.
The class PicoConstants has no property or method named
'AWG_UPDATE_ZERO'.
If this error is not an instrument error, use MIDEDIT to
inspect the driver.

Error in PS3000A_IC_Generic_Driver_Block (line 58)
connect(ps3000aDeviceObj)

After this error the scope would lock. I typed in the two commands you told me and it did unlock, but Matlab stopped responding after that.

Regards,
Christy

Hitesh

Re: 3206a 'Error using icdevice/connect'

Post by Hitesh »

Hi xukl,

Please see the response to your other post.

Thanks,

mark.didat@ge.com
Newbie
Posts: 0
Joined: Fri Apr 15, 2016 1:21 pm

Re: 3206a 'Error using icdevice/connect'

Post by mark.didat@ge.com »

Hitesh,

I am receiving this same error with the latest downloads on my 3406D picoscope.

"Error in icdevice (line 308)
delete(obj);

Error in PS3000a_IC_Generic_Driver_1buffer_RunBlock (line 67)
ps3000a_obj = icdevice('PS3000a_IC_drv', ''); % Specify serial number as 2nd argument if required."


Pls help with this as we have spent $$$ for Matlab Instrument toolbox for this specific use.

Thanks,
Mark

Hitesh

Re: 3206a 'Error using icdevice/connect'

Post by Hitesh »

Hi Mark,

Please use the Instrument Driver MDD file and other associated files from the ps3000a_BETA folder in the package available to download from MATLAB Central File Exchange as this supports the PicoScope 3406D and has better examples.

The examples in this folder have published html pages.

If you have a 64-bit version of MATLAB on Microsoft Windows, please ensure that you have downloaded and installed the 64-bit version of the Pico Technology SDK on your PC from our Downloads page. You will also need to copy the 'thunk' libraries from the C:\PicoSDK\MATLAB\ps3000a\win64 directory in the SDK to the win64 folder in the package that you download.

Alternatively, you will require the libps3000a and libpswrappers packages if you are using MATLAB on Linux. Please e-mail support@picotech.com for the thunk libraries.

The PicoScope Support Toolbox can also be used in the place of the PicoConstants.m, PicoStatus.m and Functions folder from the Instrument Driver package.

If the PicoScope 6 application is running at the same time with this device, please ensure that it is closed.

Hope this helps,

mark.didat@ge.com
Newbie
Posts: 0
Joined: Fri Apr 15, 2016 1:21 pm

Re: 3206a 'Error using icdevice/connect'

Post by mark.didat@ge.com »

Hitesh,

I followed your instructions I get basically the same error:

Error in icdevice (line 308)
delete(obj);

Error in PS3000A_IC_Generic_Driver_Digital_Block (line 7)
ps3000aDeviceObj = icdevice('picotech_ps3000a_generic.mdd', '');


Are there more files I need to add to the path other than the "thunk" files?

mark.didat@ge.com
Newbie
Posts: 0
Joined: Fri Apr 15, 2016 1:21 pm

Re: 3206a 'Error using icdevice/connect'

Post by mark.didat@ge.com »

Also I have PicoSDK_64_10.6.10.22 installed. Let me know if I should install the newer beta version.

Hitesh

Re: 3206a 'Error using icdevice/connect'

Post by Hitesh »

Hi Mark,

You can install the Beta SDK if you wish (you may need to uninstall the stable version first).

It would be helpful to see the directory structure that you have and the files contained within.

There could be a mismatch with the prototype files, thunk libraries and the drivers so please make sure you are using the win64 sub-folder from the ps3000a_BETA folder.

Regards,

mark.didat@ge.com
Newbie
Posts: 0
Joined: Fri Apr 15, 2016 1:21 pm

Re: 3206a 'Error using icdevice/connect'

Post by mark.didat@ge.com »

Hitesh,

I tried setting everything up again per your specs and then followed the additional directions in the readme.txt with same results.


"If using the ps3000a_BETA package copy the ps3000a.dll, ps3000aWrap.dll and PicoIpp.dll files from the SDK to the ps3000a_BETA/win64 folder."


I attached my directory.

Post Reply