フィルターのクリア

Real-Time App Target Selector won't update the target to the selected one

4 ビュー (過去 30 日間)
Matteo Pellegri
Matteo Pellegri 2023 年 10 月 31 日
回答済み: Matteo Pellegri 2023 年 11 月 1 日
Hi,
I just started using the pre-made App components for the real time library in R2022b. In the past I made my own Target selector in the app, and I just switched to the one provided by Matlab as I started using 22b. Even though the different targets are visible, when I select the one I want to connect and press the Connect button, it will connect only to the Default target. Any reason why this is happening? Am I misusing the component and need to attach a callback?
Thanks
Matteo

採用された回答

Matteo Pellegri
Matteo Pellegri 2023 年 11 月 1 日
I solved this by creating a start-up function and adding it to the components events callbacks
% Code that executes after component creation
function startupFcn(app)
targetSelector = app.TargetSelector;
app.ConnectButton.TargetSource = targetSelector;
app.LoadButton.TargetSource = targetSelector;
app.SystemLog.TargetSource = targetSelector;
app.StatusBar.TargetSource = targetSelector;
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTarget Computer Setup についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by