Main Content

Logging and Profiling

Simulation Data Inspector, Simulink Scope blocks, File Log blocks, target computer access, profiling

To observe the behavior of your real-time application and the target computer on which it is running, use logging and profiling blocks.

Blocks

File LogWrite signal data file log on target computer (Since R2020b)
Enable File LogEnable or disable file logging of signals on target computer (Since R2020b)
Enable ProfilerStart and stop execution profiler on target computer (Since R2020b)
Log EventLog an execution profiling event (Since R2020b)

Objects

TargetRepresent real-time application and target computer status (Since R2020b)
Target.FileLogTarget Computer file logger (Since R2020b)
TargetsConfigure and manage target objects (Since R2020b)
ProfilerDataData returned from profiler (Since R2020b)
InstrumentCreate real-time instrument object (Since R2020b)
slrealtime.instrument.LineStyleCreate real-time instrument LineStyle object (Since R2022b)

Properties

Target Object Propertiesslrealtime Target object properties for configuration and status (Since R2020b)

Functions

discardDelete file log data from target computer (Since R2020b)
getAllFileLogBlocksReturns block paths corresponding to File Log blocks in application (Since R2022a)
getFileLogDecimationReturns decimation value of File Log block based on block path (Since R2022a)
getProfilerDataRetrieve profile data object (Since R2020b)
listGet information about available file logs of signal data (Since R2020b)
importImport file log data from target computer (Since R2020b)
openImportDialogGet information about available file logs of signal data (Since R2023b)
resetProfilerReset profiling service state to Ready (Since R2020b)
setFileLogDecimationSets decimation value on File Log blocks based on block path and input decimation value (Since R2022a)
slrealtime.fileLogImportAfter copying file logs from the target computer to the development computer, import file logs into Simulation Data Inspector (Since R2021a)
slrealtime.fileLogListAfter copying file logs from the target computer to the development computer, list available file logs for import into Simulation Data Inspector (Since R2021a)
startProfilerStart profiling service on target computer (Since R2020b)
startRecordingStarts signal data live streaming and File Log logging (Since R2022a)
stopProfilerStop profiling service on target computer (Since R2020b)
stopRecordingStops signal data live streaming and File Log logging (Since R2022a)

Troubleshooting

Troubleshoot Signal Data Logging from Nonvirtual Bus, Fixed-Point, and Multidimensional Signals

Investigate issues that can occur when signal data logging from signals in nonvirtual buses, signals with fixed-point data type, and multidimensional signals.

Troubleshoot Signal Data Logging from Inport in Referenced Model

Investigate issues that prevent some signals from streaming to the Simulation Data Inspector.

Troubleshoot Signal Data Logging from Inport in Referenced Model in Test Harness

Investigate issues that can occur when signal data logging from signals in referenced models in test harnesses.

Troubleshoot Signal Data Logging from Send and Receive Blocks

Investigate issues that can occur when signal data logging from Send and Receive blocks.

Troubleshoot Signals for Streaming or File Logging

Investigate issues related to an error that a signal cannot be streamed or logged.

Featured Examples