Main Content

slrealtime.fileLogList

After copying file logs from target to development computer, list available file logs for import into Simulation Data Inspector

Since R2021a

Description

slrealtime.fileLogList() lists the available log files for import into the Simulation Data Inspector after you have copied the files from the target computer into the development computer applications folder tree under the current folder pwd.

Use the slrealtime.fileLogList workflow when working with a standalone target computer that does not connect to Simulink Real-Time. If working with a target computer that connects to Simulink Real-Time on the development computer, use the list function or Import File Log button in the Simulink Real-Time Explorer.

example

slrealtime.fileLogList('Directory',apps_path) lists the available log files for import into the Simulation Data Inspector after you have copied the files from the target computer into the development computer applications folder tree under the selected folder.

Examples

collapse all

  1. Open model slrt_ex_osc.

  2. In the Simulink Editor, from the Real-Time tab, click Hardware Settings.

  3. In the Simulink Real-Time Options pane, change Max file log runs to 5 and click OK.

  4. Click Run on Target.

  5. After the run ends, close the model and exit MATLAB.

  1. Start an SSH session by using PuTTY. Log into the target computer as user slrt with password slrt. For more information about settings for using PuTTY for an SSH session, see Execute Target Computer RTOS Commands at Target Computer Command Line.

  2. After you log in, load and run the application to generate file logs. The target computer stores up to the maximum number of logs, in this case 5. At the target computer prompt, type:

    $ slrealtime load --AppName slrt_ex_osc
    $ slrealtime start
  3. Repeat the previous step until you have created several logs. Between each run, you can change parameter values by loading different parameter set files into the application. For more information, see the loadParamSet function.

  4. List the logs that you created. At the target computer prompt, type:

    $ ls applications/slrt_ex_osc/logdata/
  1. On the development computer, use a system utility to copy the applications folders from the target computer to an applications folder on the development computer. For example on a Windows® computer, you can use pscp (a PuTTY utility) or Filezilla. You can download and install PuTTY from www.putty.org. In the MATLAB Command Window, type:

    system('pscp -r slrt@192.168.7.5:applications C:\work\my_logdata\')
  2. List the file logs that are available to import into the Simulation Data Inspector. In the MATLAB Command Window, type:

    slrealtime.fileLogList('Directory','C:\work\my_logdata\')

Input Arguments

collapse all

Provides the path to the applications folder on the development computer to which you have copied the tree of files from the applications folder on the target computer.

Example: (fullfile(pwd,'applications'))

Version History

Introduced in R2021a