主要内容

getTracerData

Download tracer data from target computer

Since R2026a

Description

getTracerData(target_object) downloads the tracer data for the most recent loaded application from the Speedgoat® target computer to the MATLAB® development computer.

example

getTracerData(target_object,app_name) downloads the tracer data for the real-time application app_name from the Speedgoat target computer to the MATLAB development computer.

getTracerData(target_object,app_name,fileName) downloads the tracer data for the real-time application app_name from the target computer and saves it as a text file with the filename fileName to the development computer.

Examples

collapse all

Load the slrt_ex_osc application on the target computer and download the tracer data.

Open, build, and download the real-time application.

tg = slrealtime;
modelSTF = getSTFName(tg);
modelName = "slrt_ex_osc";
openExample(modelName);
set_param(modelName,"SystemTargetFile",modelSTF);
slbuild(modelName);
load(tg,modelName);

Download the tracer data for the most recent loaded application.

getTracerData(tg);

MATLAB downloads and saves the tracer data as ftrace_slrt_ex_osc.txt in the current path.

To generate tracer data for the slrt_ex_osc application, start the tracer before starting the application.

startTracer(tg);
start(tg);

Stop the tracer and stop the application.

stopTracer(tg);
stop(tg);

Download the tracer data for the slrt_ex_osc application.

getTracerData(tg,"slrt_ex_osc");

The tracer data for the slrt_ex_osc application is saved as ftrace_slrt_ex_osc.txt in the current MATLAB path.

Download the tracer data for the slrt_ex_osc application and save it to the file slrt_ex_osc_tracer_data.txt in the current path.

getTracerData(tg,"slrt_ex_osc","slrt_ex_osc_tracer_data");

Input Arguments

collapse all

Object that represents target computer, specified as a Target object. The object provides access to methods that manipulate the target computer properties.

Example: tg

Real-time application MLDATX file name that you build from the model, specified as a character vector or string scalar.

Example: "slrt_ex_osc"

File name for the tracer data, specified as a character vector or string scalar. By default, Simulink Real-Time saves the tracer data with the file name ftrace_app_name.txt.

Example: "slrt_ex_osc_tracer_data"

Version History

Introduced in R2026a