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

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" or "sg.mw.TargetImplLinux":
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

The error message indicates that required add-ons 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, for R2020b through R2025b only, the app creator needs to ensure "Simulink Real-Time Target Support Package" is compiled into the application:

For R2024b and earlier - 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 save the Application Compiler session as a PRJ File, it should remember this dependency every time you open the PRJ file.

For R2025b and earlier - 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)

Categories

Tags

Community Treasure Hunt

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

Start Hunting!