Driver for MAC

Post your MATLAB discussions here
Post Reply
lyurealm
Newbie
Posts: 0
Joined: Wed Nov 11, 2015 1:10 pm

Driver for MAC

Post by lyurealm »

Hi everyone, my name is Julio and I'm trying to connect to my PicoScope 4262 through Matlab on a Mac, but it's not explained in the original post:

http://www.mathworks.com/matlabcentral/ ... ent-driver

Is there a way to do it? So far, I've created a folder called "maci64" in the ps4000 folder and then added the files "libps4000.dylib" and "libpicoipp.dylib", and also "ps4000MFile.m" and "ps4000WrapMFile.m" from win64 folder. However, I've looked through the code and I've found that "picotech_ps4000_generic.mdd" requires "libps4000.dylib" and "libps4000wrap.dylib", which I don't have and don't know where to find it.

Furthermore, in the "Picoscope 6.app" package, files "libps4000.dylib" and "libpicoipp.dylib" were in fact symbolic shortcuts instead of actual files, so what I did was to copy "libps4000.2.dylib" and "libpicoipp.1.dylib" and then rename them to the name they're supposed to have.

I'm running Matlab r2015b and I have xcode 7. When I execute mex -setup I get this:

Code: Select all

MEX configured to use 'Xcode with Clang' for C language compilation.
And when I run PS4000Config I get the workspace working, except maybe for the variable "ps4000ThunkLibName", which value is:

Code: Select all

'.../maci64/ps4000_thunk_pcwin64'
I'm getting the following error when I try to execute any of the examples provided.

Code: Select all

Error using instrument/delete (line 82)
Operation failed: An error occurred while executing the driver disconnect code.
Struct contents reference from a non-struct array object.
If this error is not an instrument error, use MIDEDIT to inspect the
driver.

Error in icdevice (line 308)
                delete(obj);
Thank you in advance, any help will be much appreciated.

Hitesh

Re: Driver for MAC

Post by Hitesh »

Hi Julio,

I have responded via your e-mail support ticket but am posting some information to help other Users of MATLAB on Mac OS X platforms.

The win64 folders contain files specific to 64-bit versions of MATLAB for Windows.

For the Mac platform you will need to generate new prototype files (the thunk libraries will be automatically generated). In order to do this you will require the latest version of the PicoScope 6 for Mac OS X application which is due for release imminently. This will also contain the libps4000Wrap.dylib library.

You can modify the PS4000Config file in order to add the path to the libraries on the Mac OS X platform e.g.

Code: Select all

addpath('/Applications/PicoScope6.app/Contents/Resources/lib/');
Also, you can use the PicoScope Support Toolbox in place of the Functions folder, PicoConstants.m and PicoStatus.m files.

This has integrated Help documentation for MATLAB.

Regards,

grubi
Newbie
Posts: 0
Joined: Tue May 03, 2016 8:58 am

OSX/Matlab/Picoscope5000 Series

Post by grubi »

OK
3) run: ps5000aDeviceObj = icdevice('picotech_ps5000a_generic.mdd');
which results in the following error message:
>> ps5000aDeviceObj = icdevice('picotech_ps5000a_generic.mdd');

Copyright (C) Pico Technology Ltd. 2013 - 2014

PicoScope 5000 Series MATLAB Instrument Driver

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 308)
delete(obj);

Has anyone a running OS X/Matlab/Picoscope environment?
Did I forget something?
Do I have to copy some more files like in Windows with the DLLs? (I thought this won't be necessary by adding '/Applications/PicoScope6.app/Contents/Resources/lib' to the path).

Yours Michael
-->
Hi,
thanks for the advice already given.
I'm trying to get a PicoScope 5444B talking to Matlab under OS X and have some problems to get it working.
My software setup:
* OS X El Capitan
* Matlab 2015b
* Xcode 7
* Picoscope 6.11.8.11

What I already managed to work:
1) Get Matlab 2015b working with Xcode7, described in
http://de.mathworks.com/matlabcentral/a ... -xcode-7-0
2) Downloaded the current PS5000a_MATLAB_IC_Generic_Driver from Matlab File Exchange
3) Replaced the ps5000aMFile.m and ps5000aWrapMFile.m with those of the x64 folder
4) Added '/Applications/PicoScope6.app/Contents/Resources/lib' to the Matlab path (done in the PS5000aConfig.m file)

After that i run:
1) run PS5000aConfig.m
2) check the path:
>> path
MATLABPATH
/Applications/PicoScope6.app/Contents/Resources/lib
PS5000a_MATLAB_IC_Generic_Driver
PS5000a_MATLAB_IC_Generic_Driver/Functions
PS5000a_MATLAB_IC_Generic_Driver/ps5000a
...
--> OK
3) run: ps5000aDeviceObj = icdevice('picotech_ps5000a_generic.mdd');
which results in the following error message:
>> ps5000aDeviceObj = icdevice('picotech_ps5000a_generic.mdd');

Copyright (C) Pico Technology Ltd. 2013 - 2014

PicoScope 5000 Series MATLAB Instrument Driver

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 308)
delete(obj);

Has anyone a running OS X/Matlab/Picoscope environment?
Did I forget something?
Do I have to copy some more files like in Windows with the DLLs? (I thought this won't be necessary by adding '/Applications/PicoScope6.app/Contents/Resources/lib' to the path).

Yours Michael