フィルターのクリア

In App Designer, how can I ignore UI inputs while a block of code is running?

4 ビュー (過去 30 日間)
Ryan Budde
Ryan Budde 2019 年 1 月 8 日
コメント済み: Soong Yuan See 2020 年 2 月 18 日
I'm using the App Designer to build a small app to use a National Instruments Daq (USB-6343) to do both analog input and output. I have two different "modes" that I use. Mode #1 (button #1) outputs and records for a set period of time. Mode #2 (button #2) outputs continuously until another button press (button #3). In the code for button #3, I reset the daq using "daqreset" and re-establish each of the channels that I want to use for Mode #1 (I use Mode #1 much more frequently, so it is much faster if I don't have to set up the daq every time inside button #1 code). If I wait 5-10 seconds after pressing button #3, then I have no problems pressing button #1. However, if I try to click button #1 too soon after clicking button #3, then the App crashes with various errors related to the daq, I believe because the previous code from the end of button #3, which resets the daq, has not finished running, so the daq settings are not correct for the commands I use in button #1.
I would like to be able to ignore all button clicks / user inputs from the UI until all active code has finished running the daq reset section (button #3), to prevent users from accidentally crashing the App. I have found examples of pausing the matlab code until there is a user input, but I would like to do the opposite. Are there any commands / strategies to accomplish this?
  2 件のコメント
Prajith Chilummula
Prajith Chilummula 2019 年 1 月 11 日
You can use the 'Interruptible' property of the UIfigure to control the interruptions.
Soong Yuan See
Soong Yuan See 2020 年 2 月 18 日
the reminder that pop out at the bottom of the GUI figure blocking me from resizing the GUI. This pop out is really disturbing the user experience.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by