R2022a

New Features, Bug Fixes, Compatibility Considerations

Linux platform for development computer

In R2022a, you can use Simulink® Real-Time™ on Windows® and Linux® platforms. To get started, see Enable Development Computer Communication (Linux).

If you develop App Designer applications (such as instrument panels for real-time applications) and use the App Compiler to produce standalone executable applications, remember the standalone application is not cross-platform. The executable type depends on the platform (Windows or Linux) on which the application was generated.

For blocks that support Windows and Linux platforms, use Speedgoat I/O Blockset release 9.4.0 for R2022a. For more information, see Speedgoat documentation.

Note

The Simulink Real-Time ASAM XIL support package is supported on the Windows platform only.

Instrument panel app generator

In R2022a, you can generate an App Designer instrument panel MLAPP file from a model or real-time application. You can open the MLAPP file in App Designer for additional changes.

To get started, in the Simulink Editor, on the Real-Time tab, click the App Generator button Simulink Real-Time App Generator tool button. For more information, see Simulink Real-Time App Generator and Create App Designer Instrument Panels by Using App Generator.

Real-time permanent magnet synchronous motor (PMSM) example

To aid development of real-time motor applications, the Run Real-Time Simulation of Permanent Magnet Synchronous Motor example shows how to run a real-time simulation of a permanent magnet synchronous motor (PMSM) that is externally controlled at high switching frequency. The real-time application runs on a Speedgoat target computer that has a Speedgoat® IO334 I/O module with the IO334-21 plug-in board installed.

Target computer persistent variables

In R2022a, by using Simulink Real-Time persistent variables, you can write the last value of a signal when a real-time application stops, store the value, and read it when the real-time application starts. An odometer that records mileage cumulatively is a possible application for a persistent variable. Add persistent variables to your model by using the Persistent Variable Write block and Persistent Variable Read block. The API for persistent variables enables you to access the variable values as MATLAB variables. For more information, see:

File logging decimation and frame-based input

In R2022a, functions enable you to get and set decimation values for File Log blocks in a model.

In previous releases, the File Log processed sample-based input, treating elements as channels. In R2022a, you can configure the block to process sample-based input or frame-based input by configuring the Input Processing block parameter. For processing frame-based input, the block treats columns as channels. For more information, see the File Log block and Tune Decimation for File Log Data Without Model Rebuild.

Recording controls for file logging and streaming

In R2022a, recording functions enable you to start and stop logging from File Log blocks and start and stop signal streaming from the model. For more information, see these functions:

For more information about the file logging and streaming workflow, see Signal Logging Basics.

Parameter table caching and parameter tuning in Simulink Real-Time Explorer

In R2022a, the Parameters tab in Simulink Real-Time Explorer supports caching parameter table data. By caching the data, updates to parameter data in the table are improved. This improvement is noticeable for real-time applications that have a substantial number of parameters. For instances in which the parameter table data becomes disabled (for example, when page switching occurs), the Parameters tab provides a Refresh Values button.

In R2022a, the Parameters tab in Simulink Real-Time Explorer supports a Hold Updates button and Update All Parameters button to change multiple parameter values simultaneously. These buttons in Explorer operate in the same way as these buttons operated on the Real-Time tab in the Simulink Editor.

For more information, see Simulink Real-Time Explorer.

Ethernet Receive and Send blocks

In R2022a, the Ethernet Receive block and the Ethernet Send block enable you to receive and send custom Ethernet packets. For more information, see:

EtherCAT SDO complete access mode

In R2022a, you can select the access mode for the EtherCAT Async SDO Upload block and EtherCAT Async SDO Download block. When the Access Mode is Complete Access, the protocol for CoE access to variables provides:

  • Access to all subindexes attached to a single index in the CoE dictionary for a single terminal device.

  • Read or write all subindexes in the time it takes to read or write a single one of them.

  • Simultaneously update all subindexes when a tuning parameter set is being written.

  • Capture a simultaneous read of all subindexes.

  • Allow use of EtherCAT devices that require complete access for configuration.

For more information, see EtherCAT Async SDO Upload block and EtherCAT Async SDO Download block. For an example, see Update Async SDO Block Variables by Using Complete Access Mode.

API for real-time application list root inports

In R2022a, the getRootLevelInports function enables you to get the root-level inports in a real-time application object. For more information, see getRootLevelInports.

API for real-time application uninstall

In R2022a, the removeApplication function enables you to uninstall real-time applications from the target computer. This function provides a MATLAB command that corresponds to the Delete application option in Simulink Real-Time Explorer. For more information, see removeApplication.

 Functional Mock-up Unit version 2

In R2022a, Functional Mock-up Unit (FMU) support enables you to work with FMU version 1 and FMU version 2 files for co-simulation. This change affects generated code. If you are using FMU files on Simulink Real-Time from previous releases, it is recommended to generate a new FMU binary compatible with Simulink Real-Time. For more information, see Apply Functional Mock-up Units by Using Simulink Real-Time and Compile Source Code for Functional Mock-up Units.

ASAM XIL support package version 1.1

In R2022a, use the Simulink Real-Time XIL API support package version 1.1. This version of the support package adds methods in the MAPort class, SignalFactory class, SignalGeneratoryFactory class, and SignalGenerator class. For more information about supported classes and methods, see Classes and Methods of ASAM XIL API.

 Functionality Being Removed or Changed

FunctionalityWhat Happens When You Use This Functionality? Use This Functionality Instead Compatibility Considerations

Updates to display of status log messages

Line wrap occurs for long status log messages in the status monitor display.

Not applicable

Not applicable

The UDP Send block and UDP Receive block added support for data as Simulink messages.

The blocks handle data packets as Simulink messages.

Not applicable

Not applicable

Application Compiler supports Linux development computer

Linux development computer can compile applications into standalone executables.

Not applicable

Not applicable

The TargetSelector control for instrument panel apps provides a Simulink Normal Mode selection. This selection enables you to interface the instrument panel with a normal mode simulation of a model.

To use an instrument panel app to interface with a model for normal mode simulation, select Simulink Normal Mode in the target selector control instead of selecting a target computer.

Not applicable

Not applicable

In the App Designer ParameterTable component, data for struct parameters update correctly.

Because an App Designer instrument panel monitors operation of a real-time application, data for struct parameters update correctly in a parameter table component on the instrument panel.

Not applicable

Not applicable

For the App Designer ParameterTuner component, the changeComponentValue function enables you to change parameter values programmatically.

Using this function to change the value of the component pushes the value to the real-time application on the target computer.

Not applicable

Not applicable

The removeApplication function enables you to remove a real-time application and its related files from a target computer.

New in R2022a

Not applicable

Not applicable

The getRootLevelInports function enables you to list the root level inports in an Application object.

New in R2022a

Not applicable

Not applicable

The Instrument object supports bus signals.

New in R2022a

Not applicable

Not applicable

The AutoImportFileLog check box that is available from the Start button in Simulink Real-Time Explorer is now also available from the Run on Target button on the Real-Time tab in the Simulink Editor. This check box corresponds to the AutoImportFileLog option of the start function.

New in R2022a

Not applicable

Not applicable

When a real-time application stops, its parameter values are saved to parameter set file autoSaveOnStop.

You can import the autoSaveOnStop parameter set to the development computer by using the importParamSet function and load it to the real-time application. For more information, see importParamSet.

Not applicable

Not applicable

The import function imports a file log that was created by the same release of MATLAB® as the function.

If using import on a file log from a previous MATLAB release, an error is displayed.

Not applicable

Not applicable