xPC Target | ![]() ![]() |
Signal Logging with xPC Target Graphical Interface
Exporting data with the xPC Target scope window does not require you to add outport blocks to your Simulink model and activate the logging of signals. You can select which signals to collect, and you can capture unexpected outputs during a run.
This procedure uses a scope window as a graphical interface to move data from the last data package collected to the MATLAB workspace. For information on exporting data using outport blocks, a scope object and the properties Data
and Time
, see Chapter 8, Scope Object Reference..
After you complete a run with a scope, you can move data from the last data package collected to the MATLAB workspace. This procedure uses the Simulink model xpcosc.mdl
as an example, and assumes you have completed a run with the target application.
The default name for the time vector is scopen_time
, and the default name
for the signal vector is scopen_data
where n
is the scope number.
whos
MATLAB displays a list of variables and their description. For example
Name Size Bytes Class ans 1x1 13958 xpc object scope1_data 250x2 4000 double array scope1_time 250x1 2000 double array t 801x1 6408 double array tg 1x1 14002 xpc object x 801x2 12816 double array y 801x1 6408 double array Grand total is 5828 elements using 59592 bytes
You can now save or further analyze the data using the MATLAB variables.
![]() | Signal Logging | Signal Logging with MATLAB Commands | ![]() |