After you build the real-time application, you can run your model in real time.
This procedure uses the model
(matlab: open_system(docpath(fullfile(docroot, 'toolbox', 'sldrt', 'examples', 'sldrtex_model')))).
It assumes that you have already created a real-time application from
In external mode, you execute your real-time application to observe the behavior of your model in real time with the generated code. You cannot run a real-time application in Rapid Accelerator mode.
To allow exchange of commands, parameters, and logged data, establish a connection between your Simulink® model and the kernel.
Run the application in real time.
To set external mode, select Simulation > Mode > External.
To start real-time application execution, on the toolbar, click the Run button .
To stop the simulation before the end, click the Stop button .
In this example, the Scope window displays 1000 samples in 1 second, increases the time offset, and then displays the samples for the next 1 second.
Transfer of data is less critical than calculating the signal outputs at the selected sample interval. Therefore, data transfer runs at a lower priority in the CPU time that remains after real-time application computations are performed. As a result, data points can be omitted from the Scope block display.