Contenuto principale

Real-Time Signal Logging and Streaming

Visualize real-time signals from runs of real-time application by using signal logging or streaming

To evaluate the behavior of signals in real-time applications, you can add instrumentation to the model, tune parameters, and display results.

Instrumentation includes signals marked for visualization by using the Simulation Data Inspector or Simulink® Scope blocks, signals connected to File Log blocks, and signals connected to graphical instruments by using instrument objects. You can instrument signals in a real-time application by using Simulink Real-Time™ Explorer or by using the MATLAB® language.

Tune scalar, vector, or matrix parameters and view signal values as numbers or as timestamped traces by using the Simulation Data Inspector. To identify parameters to tune or signals to observe, navigate the model hierarchy or create parameter and signal groups.

Design and run App Designer instrument panels containing graphical instruments. When you run an instrument panel, it interacts continuously with the real-time application and updates the associated parameters and signals.

Apps

Simulink Real-TimeGenerate real-time applications for simulations that run on a target computer and interface with I/O devices in the target computer
Simulink Real-Time ExplorerInteract with target computer and real-time application running on target computer
Simulink Real-Time TET MonitorObserve task execution time for the real-time application running on target computer
Simulink Real-Time App GeneratorGenerate instrument panel app to interact with target computer and real-time application running on target computer (Since R2022a)

Tools

Simulation Data InspectorInspect and compare data and simulation results to validate and iterate model designs

Functions

expand all

slrtExplorerOpen Simulink Real-Time explorer and interact with target computers and real-time applications
slrtTETMonitorOpen Simulink Real-Time task execution time (TET) monitor
slrtAppGeneratorGenerate instrument panel app to interact with target computer and real-time application running on target computer (Since R2022a)
openImportDialogGet information about available file logs of signal data (Since R2023b)
discardDelete file log data from target computer
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)
importImport file log data from target computer
listGet information about available file logs of signal data
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
slrealtime.fileLogListAfter copying file logs from the target computer to the development computer, list available file logs for import into Simulation Data Inspector
slrealtime.exportRunAccess data for Simulation Data Inspector run (Since R2023a)
startRecordingStarts signal data live streaming and File Log logging (Since R2022a)
stopRecordingStops signal data live streaming and File Log logging (Since R2022a)
addForFileLogAdd an instrument to a target object for file logging (Since R2026a)
addForMATLABAdd an instrument to a target object for MATLAB data (Since R2026a)
addForSDIAdd an instrument to a target object for data in the Simulation Data Inspector (Since R2026a)
getAllForFileLogGet a list of instruments in a target object for file logging (Since R2026a)
getAllForMATLABGet a list of instruments in a target object for MATLAB data (Since R2026a)
getAllForSDIGet a list of instruments in a target object for data in the Simulation Data Inspector (Since R2026a)
removeAllForFileLogRemove the instruments from a target object that were for file logging (Since R2026a)
removeAllForMATLABRemove the instruments from a target object that were for MATLAB data (Since R2026a)
removeAllForSDIRemove the instruments from a target object that were for data in the Simulation Data Inspector (Since R2026a)
removeForFileLogRemove an instrument from a target object that was for file logging (Since R2026a)
removeForMATLABRemove an instrument from a target object that was for MATLAB data (Since R2026a)
removeForSDIRemove an instrument from a target object that was for data in the Simulation Data Inspector (Since R2026a)
viewOpen Instrument Viewer app (Since R2026a)

Blocks

File LogWrite signal data file log on target computer
Enable File LogEnable or disable file logging of signals on target computer

Topics

Background

Visualize Signals

Use MATLAB Language

Troubleshooting

Troubleshooting in Simulink Real-Time

Troubleshoot problems that you encounter while using the Simulink Real-Time product

Troubleshoot Signals Not Accessible by Name

Investigate issues for some signal types prevent file logging or streaming.

Featured Examples