Main Content

Use MATLAB Language to Create and Execute a Real-Time Application

Real-time application configuration and execution

To run your real-time application in a repeatable manner, build, download, configure, and run your real-time application with MATLAB® language. You can:

  • Perform runs interactively or initiate automated runs and test sequences.

  • Tune parameters during, before, or after a run.

  • Instrument (configure-for-streaming-from-application), view, and log signals on the development computer or target computer.

Objects

TargetRepresent real-time application and target computer status (Since R2020b)
ApplicationRepresent application files on development computer (Since R2020b)
InstrumentCreate real-time instrument object (Since R2020b)
slrealtime.instrument.LineStyleCreate real-time instrument LineStyle object (Since R2022b)
SystemLogCreate a system log object that contains the current console log (Since R2020b)
StimulationTarget computer model root inport stimulator object (Since R2021a)

Properties

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

Functions

expand all

configureModelForTargetPlatformConfigure model to build for selected and connectable target computer (Since R2024a)
connectConnect MATLAB to target computer (Since R2020b)
disconnectDisconnect MATLAB from target computer (Since R2020b)
getSTFNameGet system target file name for selected and connectable target computer (Since R2024a)
rebootRestart target computer (Since R2020b)
setipaddrSet IP address and netmask on the target computer (Since R2020b)
slrealtimeInterface for managing target computer (Since R2020b)
updateUpdate RTOS version on target computer (Since R2020b)
getparamRead value of observable parameter in real-time application (Since R2020b)
getRootLevelInportsReturns root level inports in application (Since R2022a)
getsignalRead a signal value from a real-time application (Since R2021a)
loadDeploy to target and load real-time application to target computer (Since R2020b)
setStopTimeConfigure stop time for real-time application (Since R2020b)
setparamChange value of tunable parameter in real-time application (Since R2020b)
slbuildBuild standalone executable file or model reference target for model
startStart execution of real-time application on target computer (Since R2020b)
statusGet status of real-time application on target computer (Since R2020b)
stopStop execution of real-time application on target computer (Since R2020b)
updateRootLevelInportDataReplace external input data in real-time application with input data (Since R2020b)
addParamSetAdd a parameter set to a real-time application (Since R2021a)
clearDefaultParamSetClear default parameter set on target computer (Since R2024a)
deleteParamSetDelete selected parameter set file from an application (Since R2022b)
exportParamSetWrite ParameterSet object data to parameter set file (Since R2021a)
getCurrentParamSetGet current parameter set on target computer (Since R2024a)
getDefaultParamSetGet default parameter set on target computer (Since R2024a)
importParamSetCreate ParameterSet object (Since R2021a)
listParamSetList available parameter set files for application (Since R2021a)
loadParamSetRestore parameter values saved in specified file (Since R2021a)
saveParamSetSave real-time application parameter values (Since R2021a)
setDefaultParamSetSet default parameter set on target computer (Since R2024a)
updateAutoSaveParameterSetOnStopUpdate the auto save parameter set on stop for an application (Since R2022b)
updateStartupParameterSetUpdate the startup parameter set for an application (Since R2021a)
discardDelete file log data from target computer (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)
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)
startRecordingStarts signal data live streaming and File Log logging (Since R2022a)
stopRecordingStops signal data live streaming and File Log logging (Since R2022a)
deleteProfilerDataDelete execution profiler data from target computer (Since R2020b)
getAvailableProfileGet information about available execution profiler data (Since R2020b)
getProfilerDataRetrieve profile data object (Since R2020b)
resetProfilerReset profiling service state to Ready (Since R2020b)
startProfilerStart profiling service on target computer (Since R2020b)
stopProfilerStop profiling service on target computer (Since R2020b)
addInstrumentAdd instrument object to target object (Since R2020b)
addInstrumentedSignalsFind instrumented signals and add these to real-time instrument object (Since R2020b)
addSignalAdd signal for streaming to be available in callback (Since R2020b)
clearScalarAndLineDataClear data from children of real-time instrument object (Since R2020b)
connectCallbackAdd callback that responds to new data from target computer (Since R2020b)
connectLineConnect signal for streaming to axes (Since R2020b)
connectScalarAdd signal for streaming to scalar display (Since R2020b)
connectXYPlotConnect X and Y signal structures to display on axes (Since R2024b)
deleteDelete real-time instrument object (Since R2020b)
generateScriptGenerate script that creates scalar and axes controls from signals, scalars, and lines in real-time instrument object (Since R2020b)
getBufferedDataGets data from the real-time application instrument buffer (Since R2022b)
getCallbackDataForSignalGet callback data for a signal in real-time instrument object (Since R2020b)
removeCallbackRemoved callback from real-time instrument object (Since R2020b)
removeAllInstrumentsRemove instrument objects from target object (Since R2020b)
removeInstrumentRemove selected instrument object from target object (Since R2020b)
removeSignalRemove signal from real-time instrument object (Since R2020b)
validateValidate signals in instrument object (Since R2020b)
clearStartupAppClear startup application selection on target computer (Since R2020b)
getPersistentVariablesGet persistent variables from the Simulink Real-Time target computer to MATLAB (Since R2022a)
getStartupAppGet information about startup application configuration on target computer (Since R2020b)
installInstall real-time application on target computer (Since R2020b)
removeAllApplicationsRemoves all Simulink Real-Time applications from target computer (Since R2022b)
removeApplicationRemoves Simulink Real-Time application from Speedgoat target computer (Since R2022a)
setPersistentVariablesSet persistent variables from MATLAB to the Simulink Real-Time target computer (Since R2022a)
setStartupAppConfigure startup real-time application for target computer (Since R2020b)
messagesDisplay console log messages in a system log object (Since R2020b)
resetUpdate a system log object with current console log messages (Since R2020b)
tailDisplay a selected number of lines of console log messages in a system log object (Since R2020b)
log_traceTrace level status message (Since R2021b)
log_debugDebug level status message (Since R2021b)
log_infoInformation level status message (Since R2021b)
log_warningWarning level status message (Since R2021b)
log_errorError level status message (Since R2021b)
log_fatalFatal level status message (Since R2021b)

Topics

Application Preparation and Execution

MATLAB Interface

Troubleshooting

Troubleshooting in Simulink Real-Time

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