Why does the C/C++ function interface of "Simulink Function" and "Function Caller" blocks shows incorrect information when the model is loaded in R2017b or later versions?

The C/C++ function interfaces of Simulink Function and Function Caller blocks are incorrect when a model meeting the following conditions is loaded in R2017b or later:
  • The model contains multiple Simulink Functions.
  • The C/C++ function interfaces of some of the Simulink Functions were configured in R2016b or R2017a.
  • The Simulink Functions that were not explicitly configured may have the tokens in their C/C++ function interface replaced by the corresponding Simulink names. For example, the C/C++ function name "$N" gets replaced with the function name in Simulink (say, "foo")

 Risposta accettata

This is a known issue for MATLAB R2017b and later releases. The workaround is as follows:
For those Simulink Function and Caller blocks with incorrect C/C++ function interface, perform the following action based on the MATLAB release:
 
In R2016b or R2017a release:
  1. Open the "Configure C/C++ Function Interface" dialog. Click Apply or OK.
  2. Save the model to preserve the changes permanently.
In R2017b or later release:
  1. Open the "Configure C/C++ Function Interface" dialog, and manually change the C/C++ function name and identifier names.
  2. Save the model to preserve the changes permanently.

Più risposte (0)

Categorie

Scopri di più su Simulink Coder in Centro assistenza e File Exchange

Prodotti

Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by