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.
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.
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.
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:
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.
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.
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.
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.
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.