Troubleshoot MATLAB API Call Upgrade
In R2020b and later releases, many objects and functions in the Simulink® Real-Time™ API differ from these API calls in R2020a and previous releases.
What This Issue Means
MATLAB® scripts written by using the Simulink Real-Time API require updates to run in R2020b and later releases.
Try This Workaround
These tables identify Simulink Real-Time API changes in R2020b and later releases and identify new workflows. Use these tables to guide your updates to pre-R2020b MATLAB scripts. For information about these tables to guide your updates to pre-R2020b m-scripts. For information about Simulink Real-Time in previous releases, see:
https://www.mathworks.com/help/doc-archives.html
Target Computer Operations
| Command in R2020a and Previous Releases | Command Description | Command in R2020b and Later Releases | New Workflow |
|---|---|---|---|
| Get name of real-time application. | Changed name | Use |
| Get communication status between development computer and target computers. | Changed name | Use Use |
| Close connection between development and target computers. | Changed name | Use |
| Get free space and total space on the drive, in bytes. | Moved to Speedgoat API | See the |
| Download real-time application to target computer. | Name unchanged | Use |
| Restart target computer. | Name unchanged | Use |
| Save a set of parameters to a real-time application. | Changed name and changed workflow | Use |
| Load a set of saved parameters to a real-time application. | Changed name and changed workflow | Use |
Real-Time Execution Operations
| Command in R2020a and Previous Releases | Command Description | Command in R2020b and Later Releases | New Workflow |
|---|---|---|---|
| Get CPU overload status. | Changed name | Use |
| Get average task execution time. | Changed name | Use |
| Get real-time application execution time. | Changed name | Use |
| Get maximum task execution time. | Changed name | Use |
| Get minimum task execution time. | Changed name | Use |
| Get time between samples (step size). | Changed name | Use |
| Start execution of real-time application on target computer. | Changed workflow | Use |
| Get execution status of real-time application. | Changed workflow | |
| Stop execution of real-time application on target computer. | Name unchanged | Use |
| Get or set time when real-time application stops running. | Changed workflow | Get by using |
| Access storage in the MATLAB workspace for task execution time. | Changed workflow | Use |
Execution Profiler Operations
| Command in R2020a and Previous Releases | Command Description | Command in R2020b and Later Releases | New Workflow |
|---|---|---|---|
| Retrieve profile data object. | Name unchanged | Use |
| Get state of profiler. | Changed workflow | Use |
| Reset profiling service state to Ready. | Name unchanged | Use |
| Start profiling service on target computer. | Name unchanged | Use |
| Stop profiling service on target computer. | Changed limitation | Use |
Parameter Tuning Operations
| Command in R2020a and Previous Releases | Command Description | Command in R2020b and Later Releases | New Workflow |
|---|---|---|---|
| Change value of tunable parameter in real-time application. | Changed syntax | Use |
| Read value of observable parameter in real-time application. | Changed syntax | Use |
| Get number of tunable parameters. | Changed workflow | Use |
| Get list of tunable parameters. | Changed workflow | Use |
| Set flag to display the list of parameters. | Changed workflow | Use |
Signal Tracing Operations
| Command in R2020a and Previous Releases | Command Description | Command in R2020b and Later Releases | New Workflow |
|---|---|---|---|
| Get single numerical value of a signal. | Changed workflow | Use |
| Get number of observable signals. | Changed workflow | Use |
| Access storage in MATLAB workspace for output or Y-vector. | Changed workflow | Use Simulink model Signal logging parameter: set_param(bdroot, ... SignalLogging=on) |
| Set flag to display the list of signals. | Changed workflow | Use |
| Get list of observable signals. | Changed workflow | Use |
Signal Logging Operations
| Command in R2020a and Previous Releases | Command Description | Command in R2020b and Later Releases | New Workflow |
|---|---|---|---|
| Import buffered logging data to the active session of the Simulation Data Inspector. | Replaced | Use |
Instrumentation Operations
| Command in R2020a and Previous Releases | Command Description | Command in R2020b and Later Releases | New Workflow |
|---|---|---|---|
| Create a scope of specified type. | Replaced | Use the Simulation Data Inspector. Use File Log blocks instead File Scope blocks. Use |
| Return scope identified by scope number. | Replaced | Use the Simulation Data Inspector. Use File Log blocks instead File Scope blocks. Use |
Ethernet and EtherCAT Operations
| Command in R2020a and Previous Releases | Command Description | Command in R2020b and Later Releases | New Workflow |
|---|---|---|---|
Target Computer Settings provided information about Ethernet setup on target computer. | Configure Ethernet ports on target computer. | Moved to Speedgoat API | See the |
| Display EtherCAT notifications in human-readable format. | Changed name | Use |
Target Computer Settings Operations
| Command in R2020a and Previous Releases | Command Description | Command in R2020b and Later Releases | New Workflow |
|---|---|---|---|
| Get target computer settings. | Changed name | Use |