Why do I get errors regarding "Simulink Real-Time Target Support Package" or "sg.mw.TargetImplQnx" with my deployed SLRT app?

31 views (last 30 days)
I am trying to run a real-time simulation on my Speedgoat target from a standalone application deployed using MATLAB Compiler, but I encounter one of the following errors: 
Error communicating with target 'xxx.xxx.x.x': Unable to connect to target computer 'xxx.xxx.x.x': Function requires Simulink Real-Time Target Support Package. Open Add-On Explorer to install the support package.
Or I get the following error regarding "sg.mw.TargetImplQnx":
Error communicating with target 'xxx.xxx.x.x': Error on target computer 'xxx.xxx.x.x': Unable to resolve the name 'sg.mw.TargetImplQnx'. You tried to connect to a Speedgoat target machine. Please download and install the latest version of the Speedgoat I/O Blockset from speedgoat.com/login.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 10 Apr 2025
Edited: MathWorks Support Team on 10 Apr 2025
The error message indicates that the "Simulink Real-Time Target Support Package", or the associated "Speedgoat I/O Blockset", were not included when compiling the application. To correct this, the app creator needs to make sure to install Speedgoat I/O Blockset and re-build the real-time application MLDATX file. In addition, the app creator needs to ensure "Simulink Real-Time Target Support Package" is compiled into the application:

Using Application Compiler:

When you package MATLAB code or an App Designer app that communicates with a Speedgoat real-time target, wait until "Simulink Real-Time Target Support Package" appears under "Suggested Support Packages" in the Application Compiler app before you package the application:
Also, don't forget to specify the real-time application MLDATX file under "Files required for your application to run".
Once you saved the Application Compiler session as PRJ File, it should remember this dependency every time you open the PRJ file.

Using mcc:

When using the "mcc" command instead of Application Compiler to package the app, the equivalent switch is "-Z" as shown below (available in R2021b and later):
mcc -e slrt_ex_pendulumApp.mlapp -a slrt_ex_pendulum_100Hz.mldatx -Z 'Simulink Real-Time Target Support Package'
.

Important note for MATLAB R2024a:

If the standalone SLRT app is developed in MATLAB R2024a, make sure to use at least the following software versions:
  • MATLAB R2024a Update 7
  • Simulink Real-Time Target Support Package" v24.1.1
  • Speedgoat I/O Blockset v9.8.1.1
To check the software versions, use the following code:
>> version
>> matlabshared.supportpkg.getInstalled
>> speedgoat.version
.

Further reading:

See the following MATLAB answer for a collection tips for deploying SLRT app with MATLAB Compiler: Best practices & tips for creating standalone SLRT apps for interaction with Speedgoat using App Designer & MATLAB Compiler

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!