필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 1 (최근 30일)
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.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by