Main Content

import

Import file log data from target computer

Description

example

import(target_object.FileLog,'app_name') imports file log signal data from available simulation runs for the selected real-time application.

As the function imports available file logging data, the function deletes the data from the target computer. For information about the availability of file logging data, see list.

example

import(target_object.FileLog,run_info) imports file log signal data for the selected table of available simulation runs. To create the table, use the list function.

example

import(target_object.FileLog,run_ids) imports file log signal data for the selected simulation runs.

If a Simulink Real-Time model has File Log blocks, when you load the real-time application on the target computer, file logging is enabled. This default operation is the same as enabling file logging by using the command enable.

To control file logging with the Enable File Log block, when you load the real-time application on the target computer, disable file logging by using the command disable.

When the development computer is connected to the target computer and the real-time application stops, the file log data is uploaded to the Simulation Data Inspector. For a standalone target computer that does file logging when not connected, after connecting the development and target computers, upload the file logging data for the application.

Note: When the Simulink® Real-Time™ imports file log data from the target computer and uploads the data to the Simulation Data Inspector, the data is deleted from the target computer. This data is deleted whether the data upload occurs when the real-time application stops for a connected target computer or when you use the import function for a standalone (disconnected) target computer. File log data for imported runs of the application is deleted.

Examples

collapse all

For target computer object tg with simulation run data available for real-time application my_app, import file log data to the Simulation Data Inspector for the application.

import(tg.FileLog,'app_name')

For target computer object tg with simulation run data available for real-time applications, get available simulation run information, and then import file log data.

Get table of available simulation run information. Import file log data from applications runs to the Simulation Data Inspector.

my_run_info = list(tg.FileLog);
import(tg.FileLog,my_run_info);

Alternatively, you can get the available file log information and import the file log data in one step.

import(tg.FileLog,tg.FileLog.list);

For target computer object tg with simulation run data available for real-time applications slrt_ex_osc_rt_t and slrt_ex_osc, import file log data to the Simulation Data Inspector for selected simulation runs. For more information, see list.

Get table of available simulation run information.

my_run_info = list(tg.FileLog)
my_run_info = 

  3×3 table 

             Application             StartDate          Size  
          __________________    ____________________    _____ 

    1.    "slrt_ex_osc_rt_t"    12-Dec-2019 21:59:31    94944 
    2.    "slrt_ex_osc_rt_t"    12-Dec-2019 21:59:45    84736 
    3.    "slrt_ex_osc"         12-Dec-2019 21:59:57    82176

Import file log data from application runs 1 and 2 in the available file logs table.

import(tg.FileLog,1:2);

Input Arguments

collapse all

Provides access to methods that manipulate the target computer properties.

Example: tg

Provides name of real-time application MLDATX file that you built from the model.

Example: 'slrt_ex_osc'

The run_info structure is a MATLAB table that is structured by Application and RowNames. For information about available log runs, see list.

Identifies the simulation runs to import from the target computer into the Simulation Data Inspector. The run_ids are rows in the available file logging data table. For information about available log runs, see list.

Introduced in R2020b