Get the xPC Target (Simulink Real-time) message log to the host computer

1 回表示 (過去 30 日間)
Thomas Marullo
Thomas Marullo 2014 年 5 月 20 日
回答済み: Dimitri MANKOV 2024 年 9 月 2 日
With the new xPC Target interface, the message log of all the system actions is smaller (9 lines to 6 lines) and scrolls through important things. I do not have easy access to the xPC system to connect a keyboard to it so I can scroll (PG UP) through the log. Is it possible to retrieve that text message log onto the host computer so I can review it? My simulation periodically updates the text log on the xPC with valuable information. Also, I am not looking for the 'xpctargetspy' command. That doesn't allow me to interact with the xPC system to scroll up the message log.

回答 (1 件)

Dimitri MANKOV
Dimitri MANKOV 2024 年 9 月 2 日
Hi Thomas,
In MATLAB R2020a and earlier, you can use the following command to retrieve the entire target console log:
SimulinkRealTime.utils.getConsoleLog
In MATLAB R2020b and later, the target console log can be accessed either directly in the Simulink Real-Time Explorer, or by using the following commands:
tg = slrealtime;
slog = slrealtime.SystemLog(tg);
slog.messages
I hope this is helpful!
Dimitri

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by