How to close properly an app (built with Matlab App Designer) ?
Ältere Kommentare anzeigen
Hey,
I built a Matlab App Designer App for some kind of real time measurements. It communicates with Arduino by RS232... When I want to close the App, the Arduino continues to send some datas... and so the following procedure does not work: disp('FERMETURE DE L''APPLICATION'); %fclose(app.COM_A); fclose(app.COM_B); delete(app);
I also get the following error:
"Invalid or deleted object.
Error in app_v4/serial_data_available_B (line 125) app.oldTempsCOM_B=tempsCOM_B;
Error in app_v4>@(varargin)app.serial_data_available_B(varargin{:}) (line 168) app.COM_B.BytesAvailableFcn = @app.serial_data_available_B;
Error in instrcb (line 42) feval(val{1}, obj, eventStruct, val{2:end});
Warning: The BytesAvailableFcn is being disabled. To enable the callback property either connect to the hardware with FOPEN or set the BytesAvailableFcn property."
Akzeptierte Antwort
Weitere Antworten (1)
Prashant Gautam
am 30 Mär. 2018
1 Stimme
use
app.delete;
2 Kommentare
Simeon Georgiev
am 11 Dez. 2018
Hey,
Would this call the CloseReqest if there is one?
Andrew Eldredge
am 13 Apr. 2021
It does not appear to.
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!