Main Content


Stops signal data live streaming and File Log logging

Since R2022a



stopRecording(target_object) disables logging in the application and closes the run in the Simulation Data Inspector. The function disables the File Log logging, imports (based on the AutoImportFileLog flag) the File Log data into the Simulation Data Inspector in the current run, exports the data to base workspace based on the flag 'ExportToBaseWorkspace', and stops live streaming. Every time that signal logging and streaming is disabled by using the stopRecording function, Stop Recording button, or disabling the Enable File Log block closes a log run on the target computer.

The stopRecording function operation responds to the setting of the AutoImportFileLog option. The File Log data from the target is imported if the AutoImportFileLog option is true when you use the stopRecording function.

If the model includes an Enable File Log block, the stopRecording function only stops signal streaming. The block controls signal logging. Also, if the model includes an Enable File Log block, the AutoImportFileLog option has no effect.

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


collapse all

Use the stopRecording function to stop recording on the target computer. You also can use the Stop Recording button on the Real-Time tab in the Simulink Editor or in the Simulink Real-Time Explorer.

tg = slrealtime;

Input Arguments

collapse all

Provides access to methods that manipulate the target computer properties.

Example: tg

Version History

Introduced in R2022a

expand all