Info
此问题已关闭。 请重新打开它进行编辑或回答。
Compiled program cannot distinguish whether a request is initiated via GUI or programmable interface command
2 次查看(过去 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:
- 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.
- Possible contributors to this different behavior between source code and build ?
Thank you.
0 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!