主要内容

importToFolder

R2026b

Import file log data from target computer to folder on development computer

Since R2026a

Description

importToFolder(target_object.FileLog,'app_name','develCompFolder') imports file log signal data from available simulation runs for the selected real-time application to the current working folder on the development computer. You can import file log data from the Speedgoat® target computer when the real-time application is stopped or recording is stopped.

For information about the availability of file logging data, see list.

example

importToFolder(target_object.FileLog,run_info,'develCompFolder') imports file log signal data for the selected table of available simulation runs to the selected folder on the development computer. To create the table, use the list function.

example

importToFolder(target_object.FileLog,run_ids,'develCompFolder') imports file log signal data for the selected simulation runs to the selected folder on the development computer.

The importToFolder function finds the selected target computer file log in folder /home/slrt/application/<model>/logdata/run_<X> and imports the selection to development computer folder <develCompFolder>/<model>/run_<X>. If the optional develCompFolder input argument is omitted, the importToFolder function imports the selection to development computer folder <current_working_folder>/<model>/run_<X>.

After importing log files to the development computer, you can examine the file content by using the parquetread function.

For more information about the file logging workflow, see Real-Time Signal Logging and Streaming Basics.

example

Examples

collapse all

For target computer object tg with simulation run data available for real-time application my_app, import file log data to a folder on the development computer for the application.

importToFolder(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 to a folder on the development computer.

  1. 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);
    importToFolder(tg.FileLog,my_run_info);
  2. Alternatively, you can get the available file log information and import the file log data in one step.

    importToFolder(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 a folder on the development computer for selected simulation runs. For more information, see list.

  1. 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
  2. Import file log data from application runs 1 and 2 in the available file logs table.

    importToFolder(tg.FileLog,1:2);

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"

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.

Identifies the import destination folder on the development computer. The importToFolder function finds the selected target computer file log in folder /home/slrt/application/<model>/logdata/run_<X> and imports the selection to development computer folder <develCompFolder>/<model>/run_<X>. If the optional develCompFolder input argument is omitted, the importToFolder function imports the selection to development computer folder <current_working_folder>/<model>/run_<X>.

Example: '//root/home/username/'

Example: '\\root\home\username\'

Example: 'C:\Users\username\'

Version History

Introduced in R2026a