Main Content

Run-Time Data Collection

Collect run-time data by using external mode logging

External mode logging uses specific code that Simulink® PLC Coder™ generates. External mode logging can save system states, outputs, and simulation time at each model execution time step. The data is written to a MAT-file, named (by default) model.mat, where model is the name of your model. You can collect run-time data for the variables in the MAT-file by running the generated code, which contains the logging function in your target IDE.


plcdispextmodedataDisplay the external mode logging data
plcrunextmodeRun external mode visualization


  • External Mode Logging

    Collect and visualize the output of the generated code as executed in the target PLC IDE by using external mode logging.