Import buffered logging data to the active session of the Simulation Data Inspector



importLogData(target_object) imports buffered logging data to the active session of the Simulation Data Inspector immediately. Without using this function, the Simulation Data Inspector imports the data when the stop time is reached for the run of the real-time application. A limitation is that a small gap in the logged data appears in the Simulation Data Inspector at the time that you use the importLogData function.


Import Buffered Log Data to the Simulation Data Inspector

To import buffered logging data into the active session of the Simulation Data Inspector immediately, use these steps.

  1. Open the xpcFileLogging model.

  2. Mark a signal for logging.

  3. Set the logging properties to buffered

  4. Set the model stop time to 'Inf'

  5. Build and download the real-time application

  6. Create a target object for the default target computer with the command:

    tg = slrt;
  7. Run the real-time application.

  8. Create a new Simulation Data Inspector run.

  9. Import the buffered logged data into the Simulation Data Inspector


The status message indicates that the log data is being transferred.

Transferring logging data for model xpcFileLogging, please wait ...

Input Arguments

collapse all

Object that represents the target computer. Before calling this function, make sure that you start the target computer with the Simulink® Real-Time™ kernel and apply the required Ethernet link settings.

Example: tg

Introduced in R2018a