Visualize Signals in Simulink Real-Time Models
When you use the Simulink External Mode Interface to run your real-time application, you can view signal data from the simulation on Simulink® Scope blocks in the model.
You also can use the Simulation Data Inspector to view signal data during the simulation for signals that you mark for logging in the Simulation Data Inspector.
To log signal data and view it in the Simulation Data Inspector after the simulation run, use the Simulink Real-Time™ File Log block.
There are programmatic options for collecting signal data that do not require adding File Log blocks or marking signals for logging in the model. These options include:
You can apply the
addForFileLogfunction to add signals to an instrument in aTargetobject. The instrument transfers the signal data from the target computer to the development computer in the same manner and with the same controls (for example,AutoImportFileLogoption for thestartfunction) as when file log data is collected through a File Log block.You can apply the
addForSDIfunction to add signals to an instrument in aTargetobject. When added to aTargetobject, the instrument transfers of signal data from the target computer to the development computer in the same manner and with the same controls (for example, thestartRecordingandstopRecordingfunctions) as streaming signal data. The streaming data is available in the Simulation Data Inspector during the simulation run, and the data is not saved on the target computer.You can apply the
addForMATLABfunction to add signals to an instrument in aTargetobject. When added to aTargetobject, the instrument transfers of signal data from the target computer to the development computer in the same manner and with the same controls as streaming signal data; same as with theaddForSDIfunction. The difference is that the streaming data is accessible through apps written in MATLAB rather than being accessible through the Simulation Data Inspector.
Tip
This additional signal logging and streaming support is dynamic. You can modify signal logging and streaming selections in your real-time application without re-building your model.
See Also
File
Log | addForFileLog | addForSDI | addForMATLAB