Documentation Home Page HYPERSIM Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

Step 2: Exporting from Simulink

In Simulink, under Code/C/C++ Code...


 For MATLAB R2019b-R2024a versions

 In Simulink, go to the APPS tab, click on Simulink Coder, and then select C++ CODE

...click Code Generation Options….


 For MATLAB R2015b version



 For MATLAB R2019b-R2024a versions

 OR

 


In the Target selection dialog, click Browse… , and select the System Target File.

If you want to use Embedded coder select the file hyperlink_ert.tlc otherwise use Simulink Coder by selecting hyperlink_grt.tlc, and click Apply then OK.




Click Apply then Generate Code.


 For MATLAB R2015b version

 For MATLAB R2016a-R2018a versions

 For MATLAB R2019a-R2022b versions

image2023-2-8_13-39-30.png


 For MATLAB R2024a version


If the C Code tab does not open automatically, Ctrl+B will generate the code an the C Code tab will open.

The model code is generated in the sub-folder model_hyperlink_rtw (with an embedded coder license) or in model_hyperlink_grt_rtw folder (with the Simulink coder only).

A .def file is created in the code folder. This file is read by HYPERSIM during the importing process.

For Embedded coder target, above. ^

For Simulink coder target, above ^

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter