Error Connecting to Picoscope in Compiled App

2 visualizaciones (últimos 30 días)
JY Wong
JY Wong el 23 de Jul. de 2022
I have written a very simple app that has a pushbutton which, when pressed, runs the example code "PS3000A_ID_Block_Example.m" from the Picoscope 3000 Series A API MATLAB Generic Instrument Driver addon, as shown below.
function testGUI2()
%% Base App Figure
app.fig = uifigure;
app.fig.Name = 'Pilot Cable Fault Pinpointing Recognition System';
app.fig.Position = [100,200,350,300];
movegui(app.fig, 'center');
%% Create UI elements
app.gl = uigridlayout(app.fig, [2,1]);
app.gl.RowHeight = {'2x', '0.5x'};
%% Button
app.btn = uibutton(app.gl, 'push');
app.btn.Layout.Row = 2;
app.btn.Layout.Column = 1;
set(app.btn, 'ButtonPushedFcn', @(src, event) btnPushed());
function btnPushed()
PS3000A_ID_Block_Example()
end
end
When I run this on MATLAB R2019a, everything works fine.
But when I compile this app and run the app, it gives the following error in my log file:
Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters.
Warning: Folder C:
Error using icdevice (line 259)
The specified MATLAB instrument driver could not be found. DRIVER must be on the MATLAB path.
Error in PS3000A_ID_Block_Example (line 48)
Error in testGUI2/btnPushed (line 20)
Error in testGUI2>@(src,event)btnPushed() (line 17)
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 335)
Error while evaluating Button PrivateButtonPushedFcn.
Can anyone please tell me how to solve this error or why is this error even happening ? Thank you very much!

Respuestas (0)

Categorías

Más información sobre App Building en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by