Test and Measurement Forum

driver problem

Post your MATLAB discussions here

driver problem

Postby german_tech » Fri May 16, 2014 6:02 pm

Hi,

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:



Code: Select all
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.

Thanks in advance.
german_tech

Posts: 0
Joined: Fri Mar 14, 2014 9:44 pm
german_tech
Newbie
 
Posts: 0
Joined: Fri May 16, 2014 5:30 pm

Re: driver problem

Postby Hitesh » Mon May 19, 2014 10:48 am

Hi german_tech,

The Instrument Driver currently requires the 'ps2000.dll' to be named as 'PS2000.dll'.

This will be fixed when it becomes a full release.

Please ensure that the library has unloaded (call unloadlibrary('ps2000')) before trying to connect again.

Hope this help.
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2063
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: driver problem

Postby german_tech » Fri May 23, 2014 6:02 pm

Thank you for answer

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:

Code: Select all
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 don't know what is the problem
german_tech
Newbie
 
Posts: 0
Joined: Fri May 16, 2014 5:30 pm

Re: driver problem

Postby german_tech » Tue May 27, 2014 2:26 pm

Please help me,
I dont know why matlab could not find library class to unload it.

thnaks in advance
german_tech
Newbie
 
Posts: 0
Joined: Fri May 16, 2014 5:30 pm

Re: driver problem

Postby Hitesh » Thu May 29, 2014 8:25 am

Have you copied the 64-bit ps2000Wrap.dll and PicoIpp.dll files into the folder?
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2063
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: driver problem

Postby chru » Fri Feb 13, 2015 8:58 am

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

Code: Select all
[ps5000aMethodinfo, ps5000aStructs,  ps5000aEnuminfo, ...
    ps5000aThunkLibName] = ps5000aMFile;

assignin('base', 'ps5000aMethodinfo', ps5000aMethodinfo);
assignin('base', 'ps5000aStructs', ps5000aStructs);
assignin('base', 'ps5000aEnuminfo', ps5000aEnuminfo);
assignin('base', 'ps5000aThunkLibName', ps5000aThunkLibName);


Afterwards you should be able to call
Code: Select all
ps5000aDeviceObj = icdevice('picotech_ps5000a_generic', '');

from any function.

This solved my issue with the same error message. Hope it provides you some hints too.
chru
Newbie
 
Posts: 0
Joined: Fri Feb 13, 2015 8:50 am

Re: driver problem

Postby diwmond » Tue Mar 24, 2015 4:04 pm

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:

Code: Select all
>> 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);
diwmond
Newbie
 
Posts: 0
Joined: Tue Mar 24, 2015 11:22 am

Re: driver problem

Postby Hitesh » Wed Mar 25, 2015 12:14 pm

Hi diwmond,

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.

Thanks,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2063
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: driver problem

Postby Tri Aditya Nugraha » Thu Jul 09, 2015 7:20 am

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
Capture1.PNG
this an error message when i run the PS3000a_IC_Generic_Driver_1buffer_RunBlock.m
Tri Aditya Nugraha
Newbie
 
Posts: 0
Joined: Thu Jul 09, 2015 7:03 am

Re: driver problem

Postby Hitesh » Fri Jul 10, 2015 1:08 pm

Hi Tri Aditya Nugraha,

Please use the new Beta Instrument driver available for download from MATLAB Central File Exchange

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:

32-bit: http://www.microsoft.com/en-gb/download/details.aspx?id=8328

64-bit: http://www.microsoft.com/en-gb/download/details.aspx?id=13523

Hope this helps.
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2063
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: driver problem

Postby Hydrolics » Wed Oct 28, 2015 1:46 pm

Hi,

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 :

Code: Select all
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', '');



I 've attached an image from my library


please help me

Thanks
Attachments
sample.jpg
sample.jpg (48.68 KiB) Viewed 1939 times
Hydrolics
Newbie
 
Posts: 0
Joined: Wed Oct 28, 2015 1:22 pm

Re: driver problem

Postby Hydrolics » Wed Oct 28, 2015 1:58 pm

Hey Admin,

please delete this post
Hydrolics
Newbie
 
Posts: 0
Joined: Wed Oct 28, 2015 1:22 pm

Re: driver problem

Postby Bilal » Wed Oct 28, 2015 2:19 pm

Hello Hyrdolics,

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
Bilal
PICO STAFF
PICO STAFF
 
Posts: 33
Joined: Mon Oct 05, 2015 12:19 pm

Re: driver problem

Postby Hydrolics » Thu Oct 29, 2015 7:36 am

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 ?


thanks
Hydrolics
Attachments
sample.gif
Hydrolics
Newbie
 
Posts: 0
Joined: Wed Oct 28, 2015 1:22 pm

Re: driver problem

Postby Bilal » Fri Oct 30, 2015 12:15 pm

Hello Hydrolics,

Could you send me your PS2000Config.m file.

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

step 1 picosdk matlab.png


4. C:\PicoSDK\MATLAB\ps6000 - This will be your Current Directory in Matlab

step 2 picosdk matlab ps6000.png


5. C:\PicoSDK\MATLAB\ps6000\win64

step 3 picosdk matlab ps6000 win64.png


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
editor change folder.png (8.38 KiB) Viewed 1892 times


step 4 matlab screen.png


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:

runscript forceclose rerun.png


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
Bilal
PICO STAFF
PICO STAFF
 
Posts: 33
Joined: Mon Oct 05, 2015 12:19 pm

Next

Return to MATLAB

Who is online

Users browsing this forum: No registered users and 0 guests