Simulink Real Time Speedgoat and App Generator

11 ビュー (過去 30 日間)
Daniel Vicca
Daniel Vicca 2022 年 12 月 9 日
コメント済み: Daniel Vicca 2022 年 12 月 9 日
Hi there,
I am trying to build an user interface by starting with the App Generator. App Generator creates a basic app with all the components required to connect the generated app to the Speedgoat machine. When I try running the app from the Run button the Speedgoat machine cannot be found.
Actually I don't know how to provide the IP address ( if I have to) as I did in the Simulink real time explorer. If I connect the Speedgoat (target PC) to the Host Pc in Simulink Real Time Explorer it is works.
Any idea?
Thank you
Regards

採用された回答

Dimitri MANKOV
Dimitri MANKOV 2022 年 12 月 9 日
Hi Daniel,
You can insert a "Target Selector" UI component to your App Designer interface to select the target machine you'd like to connect to. By default, this component displays the list of all named target computers currently defined in Simulink Real-Time Explorer on the host computer.
You can also include the following code in the startup callback of your app:
% Create target object
app.tg = slrealtime;
% Initialize target properties
app.tg.TargetSettings.address = '192.168.7.5';
I hope this is helpful!
Dimitri
  2 件のコメント
Daniel Vicca
Daniel Vicca 2022 年 12 月 9 日
Hello Dimitri, thank you for your quick answer.
I have already added the Target Selector Object in my GUI inthe App designer and when I run the App I get this error shown in the picture.
As you said the App can find the Target machine registered in the Host computer but it is not able to connect it. Whenever I use Simulink Real Time Explorer the connection works
Thank you again
Regards
Daniel Vicca
Daniel Vicca 2022 年 12 月 9 日
Dear Dimitri,
I added the call back function and I specified the ip address.
Now it works
% Create target object
app.tg = slrealtime;
% Initialize target properties
app.tg.TargetSettings.address = '192.168.7.5';
Thank you

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

その他の回答 (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