startRecording
Description
startRecording( starts a
simulation run in the Simulation Data Inspector, enables signal data live streaming, and
enables signal data File Log logging. Every time that signal logging and streaming is
enabled by using the target_object)startRecording function, Start
Recording button, or enabling the Enable File
Log block creates a log run on the Speedgoat® target computer.
When a model includes an Enable File
Log block, the startRecording function and
stopRecording function only control signal streaming and do not
control file logging. For such a model, the AutoImportFileLog option does
not import file log data into the Simulation Data Inspector on a
stopRecording.
When a boolean signal in the model triggers the Enable File
Log block, new Logs are created on the target. Retention of these new logs depends
on the FileLogMaxRuns setting.
For more information about the file logging workflow, see Real-Time Signal Logging and Streaming Basics.
Tip
The startRecording function, stopRecording
function, and related buttons are recording controls for streaming to the Simulation
Data Inspector and file log. Other types of streaming (such as streaming to apps or to
Simulink Real-Time explorer) are not affected by these functions and buttons.
Tip
Because logging and streaming operations are time-intensive and are executed as background tasks on the target computer, start and stop actions do not occur instantly. For example, there is a delay between enabling the log operation and recording the first samples. To avoid missing samples related to an event, start logging data before a trigger event that you are observing.
Examples
Input Arguments
Version History
Introduced in R2022aSee Also
Target | File Log | Enable File
Log | import | stopRecording