Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Compiled program cannot distinguish whether a request is initiated via GUI or programmable interface command

1 visualizzazione (ultimi 30 giorni)
Hello. I have an application which runs on an instrument. The app has a GUI and is compiled by Matlab compiler. It also supports programmable interface command via VISA connection.
The app has an "exit" button on the GUI (who shuts down the app and terminates its communication with the instrument). Similarly, it also includes a PI command to do the same thing. The only difference is an exit dialog will prompt if sent in by GUI, but not from PI command. This distinction is made by the following line in the exit callback:
if (gcbo == gcf) % Request via GUI
% Display an exit dialog
end
This has been tested and works fine if running app from Matlab. If a request is sent via PI, "gcbo" is [] in the above command.
However, once compiled, the build no longer recognizes request from PI. It treats all exit requests as coming from GUI, as the exit dialog is always prompted.
Anyone has suggestions:
  1. How to debug and troubleshoot this in the compiled build ? I inserted "dbstack" and "disp" at selected checkpoints. Worked to some extent, but not very comprehensive.
  2. Possible contributors to this different behavior between source code and build ?
Thank you.

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by