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"
% 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
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
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.)
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"