MATLAB Answers

Can I use 'xpcapi.dll' or 'xPCFramework.dll' in Simulink Real-Time in R2020b and onwards?

24 views (last 30 days)
We currently run into an issue after upgrading to R2020b. Previously, when we worked in R2020a and earlier, there was a Simulink Real-Time .NET API and Simulink Real-Time C API  to load and control the simulation on the Speedgoat using a third-party environment such as Microsoft .NET or C.
The client application depended on the two DLLs xPCFramework.dll and xpcapi.dll. However, post R2020b release, I am not able to find these DLLs in the MATLAB installation anymore.
Are these APIs still available in the latest MATLAB?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 19 Oct 2021 at 4:00
Edited: MathWorks Support Team on 19 Oct 2021 at 19:08
These .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 the .NET and C APIs for Simulink Real-Time 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 an example, see:
Starting from R2021b, if you have a MATLAB Compiler license, you can compile your App Designer GUI as a standalone executable (to run in on a computer without a MATLAB installation/license). For more information, see:
(2) MATLAB Engine API
You can still design your GUI in C# and other languages such as Python by using the MATLAB External Language Interfaces, which can call the MATLAB API for Simulink Real-Time:
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/build real-time applications).
(3) 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:

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by