What are the available APIs for standalone operation of Simulink Real-Time in R2020b and onwards?

76 views (last 30 days)
Until R2020a, MathWorks provides a Simulink Real-Time .NET API and Simulink Real-time C API for control and instrumentation of Speedgoat target machines that are in standalone operation. This enables me to build .NET or C applications that can run on a host PC without a MATLAB installation to interact with the target machine. The client application depended on the two DLLs 'xPCFramework.dll' and 'xpcapi.dll'.
However, in R2020b and later, I am not able to find these DLLs in the MATLAB installation anymore. 
What are the available APIs for standalone operation of Simulink Real-Time in R2020b and onwards?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 8 Aug 2022
Edited: MathWorks Support Team on 8 Aug 2022
The .NET and C APIs are not available anymore as part of Simulink Real-Time. The reason is that Simulink Real-Time went through a major product update for the R2020b release, and these APIs were deprecated in R2020b as part of this.
Consider one of the following alternative workflows:
(1) MATLAB App Designer
Starting from R2020b, the recommended way to control applications on Speedgoat is through MATLAB App Designer. The .NET API had a limited number of functions, while with App Designer, you have access to the full MATLAB API for Simulink Real-Time. For more information, see:
Starting from R2021b, if you have a MATLAB Compiler license, you can compile your App Designer GUI as a standalone executable and deploy it to a host PC without a MATLAB installation or license. For more information, see:
(2) MATLAB Engine API
You can still design your GUI in C#, C/C++, and other languages such as Python by using the MATLAB External Language Interfaces, which can call the MATLAB API for Simulink Real-Time:
Note that this workflow requires MATLAB and Simulink Real-Time on the host computer (this is a new license model introduced with R2020b: Simulink, MATLAB Coder, and Simulink Coder are no longer required if you don't need to modify or build real-time applications).
(3) (R2021b+) Simulink Real-Time ASAM XIL API:
Starting from R2021b, if your goal is automatic testing, you can interface Simulink Real-Time models with test cases from third-party software that supports the ASAM XIL API (e.g. TraceTronic ECU-TEST or Piketec TPT). To use an ASAM XIL simulation workflow for your real-time applications, install the Simulink Real-Time XIL API support package. Follow the workflow in:
The Simulink Real-Time XIL API support package provides an API that lets you use a C# program to control real-time applications on the target computer. For more information, see:
(4) Access the Target Computer Command Line via SSH
The Speedgoat target machine supports Secure Shell (SSH) starting from R2020b. This means any SSH client can connect to the target machine and issue a limited set of controls such as starting and stopping the target application. 

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!