Trying to generate a code from a simevents model

3 views (last 30 days)
I am trying to build a stand-alone app from a built simevents simulation model. The compiler App tells me that the file contains simevents blocks. so I would like to understand how exaclty I could build a stand alone and web Applicaions for simevents models. I also tried to generate a code directly from simulink and tells and the problem persists.

Answers (1)

Aravind
Aravind on 3 Feb 2025
It seems like you are trying to create a standalone application from a Simulink model that includes SimEvents blocks and are encountering compiler errors. The likely cause of this issue is that some blocks in your model do not support code generation. For the Simulink Compiler to successfully compile your model into a standalone application, all blocks in the model must be capable of code generation. This is also why you faced difficulties generating code directly from Simulink.
To successfully compile and build a standalone application, ensure that all blocks in your model support code generation. You can find guidance on creating standalone applications from Simulink models here: https://www.mathworks.com/help/releases/R2022a/slcompiler/gs/create-and-deploy-a-simple-script-with-simulink-compiler.html.
To determine which blocks support code generation, you can refer to this documentation: https://www.mathworks.com/help/releases/R2022a/referencelist.html?type=block&capability=codegen. Alternatively, you can use the following command in the MATLAB command window.
showblockdatatypetable
This opens a table showing the capabilities of each block, including whether they support code generation. You can also find informatio about whether a block supports code generation or not at the documentation page of the block.
If you can, please share your Simulink model and the specific errors you encountered. This information would help me assist you more effectively.

Categories

Find more on Messages in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!