Problem Connecting to Picoscope in Compiled Matlab .exe

Post your MATLAB discussions here
Post Reply
AlanTheGenie
Newbie
Posts: 0
Joined: Thu Jun 18, 2015 6:31 pm

Problem Connecting to Picoscope in Compiled Matlab .exe

Post by AlanTheGenie » Thu Jun 18, 2015 6:37 pm

I have a Matlab application for use with the Picoscope 3205A. When running it from the command line of Matlab everything works fine, however when I create executables using the Matlab compiler I can no longer connect to the Picoscope. I am using the same computer the whole time, there is no difference in installed drivers or hardware setup.

Screenshots of error messages attached.
2.PNG
2.PNG (3.81 KiB) Viewed 3041 times
1.PNG

Hitesh
Site Admin
Site Admin
Posts: 2829
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Problem Connecting to Picoscope in Compiled Matlab .exe

Post by Hitesh » Fri Jun 19, 2015 8:38 am

Hi AlanTheGenie,

Which versions of MATLAB and MATLAB Compiler are you using?

You may wish to take a look at the following MATLAB Answers article - it may relate to the use of the 'loadlibrary' in the Instrument Driver.

Please note that Pico Technology is not responsible for the content of external third-party sites.

Thanks,
Hitesh

Technical Support Engineer

AlanTheGenie
Newbie
Posts: 0
Joined: Thu Jun 18, 2015 6:31 pm

Re: Problem Connecting to Picoscope in Compiled Matlab .exe

Post by AlanTheGenie » Fri Jun 19, 2015 5:20 pm

Hi Hitesh,

I am using the latest versions of Matlab and compiler, R2015a. I looked at the link you provided, we are already using the prototype and thunk files provided in the Picoscope SDK for Matlab.

Hitesh
Site Admin
Site Admin
Posts: 2829
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Problem Connecting to Picoscope in Compiled Matlab .exe

Post by Hitesh » Mon Jun 22, 2015 1:12 pm

Hi Alan,

Are the ps3000a.dll, picoipp.dll and ps3000aWrap.dll files in a location on the Windows PATH environment variable so that your executable can locate them?

Regards,
Hitesh

Technical Support Engineer

AlanTheGenie
Newbie
Posts: 0
Joined: Thu Jun 18, 2015 6:31 pm

Re: Problem Connecting to Picoscope in Compiled Matlab .exe

Post by AlanTheGenie » Mon Jun 22, 2015 1:22 pm

Hi Hitesh,

They are included as part of the compiled Matlab executable, and we have also tried putting them on the Windows PATH env variable. No luck with either. From the console output, it appears to be finding everything and breaking on something when it loads ps3000aWrap_thunk_pcwin64. Just before that it looks like it had loaded ps3000_think_pcwin64 without any problems.

Hitesh
Site Admin
Site Admin
Posts: 2829
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Problem Connecting to Picoscope in Compiled Matlab .exe

Post by Hitesh » Mon Jun 22, 2015 3:43 pm

Hi Alan,

The ps3000aWrap.dll does require the Microsoft Visual C++ 2010 Redistributable to be installed on the PC in order for MATLAB to load the library.

If this does not help, please e-mail support@picotech.com in order to discuss further options in order to resolve this.

Regards,
Hitesh

Technical Support Engineer

Post Reply