Error Connecting to Picoscope in Matlab executable (.exe)

Post your MATLAB discussions here
Post Reply
berin.balje
Newbie
Posts: 0
Joined: Mon Feb 24, 2020 1:51 pm

Error Connecting to Picoscope in Matlab executable (.exe)

Post by berin.balje »

Hello,

I am using a PicoScope 5444D and a 64-bit windows machine with 64-bit 2019a Matlab Version.
I have a Matlab script which connects to the PicoScope and does some measurements and post-processing.
This Matlab script works perfectly when executed inside Matlab, it successfully connects to the Picoscope.

However when i create an executable (.exe) out of this Matlab script, then i come across the following error:

Warning: Disconnect: No devices found.
Error using icdevice (line 316)
An error occurred while executing the driver create code.
The specified module could not be found.

If the error is not an instrument error, use MIDEDIT to inspect the driver.


This error occurs when creating a device object using the function "icdevice"

Code: Select all

% Create a device object. 
 ps5000aDeviceObj = icdevice('picotech_ps5000a_generic.mdd');
 
% Connect device object to hardware.
connect(ps5000aDeviceObj);
The following steps have already been done:
PicoScope 5000 Series A API MATLAB Generic Instrument Driver has been installed through Add-On manager
PicoScope Support ToolBox has been installed through Add-On manager
Microsoft Windows SDK for Windows 7 and .NET Framework 4 has been installed
64-bit SDK from Pico Technology has been installed

Could someone help me solve this issue ?

berin.balje
Newbie
Posts: 0
Joined: Mon Feb 24, 2020 1:51 pm

Re: Error Connecting to Picoscope in Matlab executable (.exe)

Post by berin.balje »

I solved the issue, by compiling the application in App data and not Program files, this option is in the matlab deploy tool.

When i was compiling it in the Program files, the path to the win64 folder where the thunk and prototype files are, was too long so windows decided to ignore it, and my application did not work.

How ever when i chose to compile in the AppData in the deploy tool, everything worked fine

Pico HY
Newbie
Posts: 0
Joined: Thu Jul 23, 2020 6:26 am

Re: Error Connecting to Picoscope in Matlab executable (.exe)

Post by Pico HY »

Hello, how did you solve this problem? Can I see the program you wrote?
I tried to use appdesigener to build a software to connect to the device, and then draw, but the same problem occurred.


(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.)
Attachments
96f5733a986c11df3ae3ec01010feb2.png
96f5733a986c11df3ae3ec01010feb2.png

JavierG
Newbie
Posts: 0
Joined: Tue Aug 11, 2020 3:21 pm

Re: Error Connecting to Picoscope in Matlab executable (.exe)

Post by JavierG »

I am having a similar issue when trying to compile a stand alone executable for 32-bit (Matlab 2015b-32bit).

For 64-bit everything works both from Matlab and the stand alone exe. For 32-bit, it runs from Matlab but the compiled exe pops an error using icdevice (line 313) "No devices found"

Any ideas?

Post Reply