I'm trying to connect my PicoScope 2204 via matlab. I'm running Matlab 2014a 32bit (But I can use 64bit one too), on a 64bit windows 8. After following the instructions I got the following error:
ps2000DeviceObj = icdevice('picotech_ps2000_generic.mdd');
Warning: The library name case did not match the file name.
The library will be named "ps2000".
Warning: Control Character '\P' is not valid. See 'doc sprintf' for control characters valid in the format string.
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)
delete(obj);
I also use PS2000sdk_r10_5_0_32 but I can't find a way to solve it and it would be great to help me.
but the problem still remains, I mean even I have run mex -setup, and even modified the pathes, when I run for example PS2000_IC_Generic_Driver_GetBlock I get the following error:
Copyright (C) Pico Technology Ltd. 2013
PicoScope 2000 Series MATLAB Instrument Driver
Warning: Control Character '\P' is not valid. See 'doc sprintf' for control characters valid in the format string.
Close unit status: 0
Error using instrument/delete (line 82)
Operation failed: An error occurred while executing the driver disconnect code.
Could not find library class to unload it.
If this error is not an instrument error, use MIDEDIT to inspect the driver.
Error in icdevice (line 278)
delete(obj);
Error in PS2000_IC_Generic_Driver_GetBlock (line 49)
ps2000DeviceObj = icdevice('picotech_ps2000_generic.mdd');
I had the same problem in MATLAB R2014b on Win7. It is not a problem of the driver though.
Make sure you provide the required variables in MATLAB base workspace before calling icdevice('...'). This is probably needed by the Instrument Control Toolbox or similar.
That is, in my case
I am having the same issue, however none of the above solutions seem to work. I'm using a 3406DMSO with the PS3000Asdk_r10_5_2_1 SDK (tried with both on Matlab 2014 and 2015). I get the same error:
>> ps3000a_object = icdevice('PS3000a_IC_drv', '');
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)
delete(obj);
The version of the Instrument Driver does not fully support the PicoScope 3406DMSO.
A Beta version should be available soon, but in the meantime, could you please e-mail support@picotech.com and we can provide some files to help get you started.
Hi,
i have the same problem with the others, i'm trying to connect picoscope 3205B with matlab R2013a using ps3000Asdk, but when i already follow all of instruction and the i'm trying to run the program PS3000a_IC_Generic_Driver_1buffer_RunBlock.m but it doesn't work and display an error message in the command window, i don't know whats the problem, please help me to solve this problem.
thanks a lot
Attachments
this an error message when i run the PS3000a_IC_Generic_Driver_1buffer_RunBlock.m
Please ensure that the ps3000aWrap.dll file is on your MATLAB path or has been copied to the win32 or win64 directory in the Beta driver package's directory.
You will also need to ensure that the Microsoft Visual C++ 2010 SP1 Redistributable package has been installed according to the version of MATLAB:
I have the 2204a and try to connect with matlab but I get the same error as the other . I have PicoSDK 10.6.11 64bit Beta and Beta Oscilloscop PicoScope Software 6.11.5 . installed . Then I tried to start ps2000a \ PS2000A_IC_Driver_Block the \ PicoSDK \ MATLAB \ . It comes following error :
Copyright (C) Pico Technology Ltd. 2014 - 2015
PicoScope 2000 Series MATLAB Instrument Driver
Warning: The library name case did not match the file name.
The library will be named "PS2000a".
Warning: Control Character '\P' is not valid. See 'doc sprintf' for control characters valid in the
format string.
Error using instrument/delete (line 82)
Operation failed: An error occurred while executing the driver disconnect code.
Attempt to reference field of non-structure array.
If this error is not an instrument error, use MIDEDIT to inspect the driver.
Error in icdevice (line 278)
delete(obj);
Error in PS2000A_IC_Generic_Driver_Block (line 7)
ps2000aDeviceObj = icdevice('picotech_ps2000a_generic.mdd', '');
The issue you are having is that you are using the wrong driver set and Matlab files. Your device is a PicoScope 2204 which uses the PS2000 driver set - you have used the PS2000A drivers which does not support your device.
Another reason these errors can occur is when you first run the script, you will be prompted if you would like to "Change directory" or "Add to path", you must select Change directory or you will be faced with the same error.
Bilal Patel
Technical Support Engineer
Last edited by Bilal on Mon Nov 02, 2015 10:23 am, edited 1 time in total.
Bilal Patel
Technical Support Engineer
Pico Technology
Hi Bilal ,
many thanks for your quick response . I have now selected the PS2000 driver .
The first error is gone it remains the other . The directory is selected correctly .
what is the problem ?
I believe your file/directory structure may be wrong. Below you will find the folder structures and contents of each.
This example follows the 6000 series but the file/folder structures are the same for other PicoScope devices. I hope this will help.
1. Assuming you have installed the PicoSDK in the default install location, you will find the SDK examples installed in the following path.
C:\PicoSDK\MATLAB
2. In which case for a 64-bit system, you will find all the relevant .dll files installed in the following path; if you are missing any .dll files you will find them here. If you are missing any files from the next few steps, you should find them in here:
C:\Program Files\Pico Technology\SDK\lib
I have removed other devices for simplicity, these are the relevant file and folder structures required:
3. C:\PicoSDK\MATLAB
4. C:\PicoSDK\MATLAB\ps6000 - This will be your Current Directory in Matlab
5. C:\PicoSDK\MATLAB\ps6000\win64
6. Your Matlab current directory should be set to: C:\PicoSDK\MATLAB\ps6000 . Your Matlab current directory should look as the following screenshot. You should then open one of the Scripts as selected in the image.
Be sure your device is connected and any instances of PicoScope 6 are closed
When the editor opens, hit Run and you will see the PicoScope logo appear over the Command Window. If you are prompted, you must click Change Folder and not "add to path".
editor change folder.png (8.38 KiB) Viewed 20353 times
If the program halts at runBlock: Waiting for device to become ready... then this means you must feed a signal to the device input which meets the threshold value set in the Matlab script. Matlab will create a lock on the device and closing Matlab will not remove it. A good way to see if your device is locked is if you run PicoScope 6, it will not recognise the device. Once a signal is detected on the input of the device, a graph of the captured data will pop up.
If you find yourself not being able to feed a signal to the device, you should open the script, scroll to the bottom to the line disconnect(ps6000DeviceObj); right click > select Evaluate Current Section and unplug the device.
If you do not do this, when you try again to run these examples you will get as far as this and receive the following errors:
7. You can disable waiting for a signal and make the device trigger on a timer using the following line of code: set(triggerGroupObj, 'autoTriggerMs',1000); - Auto-trigger after 1000 milliseconds.
If you are still experiencing difficulty with the examples, please let me know and I will do my best to help you resolve them.
Bilal Patel
Technical Support Engineer
Bilal Patel
Technical Support Engineer
Pico Technology