- have you specified the "Function name" and "File name" in Block Parameters / Code Generation ?
- have you created a subsystem mask ?
How to build a simulink model in order to prevent Embedded Coder generating repeat identical functions.
조회 수: 4 (최근 30일)
이전 댓글 표시
Within my Simulink Model there are multiple repeated MATLAB function blocks, with their only difference being their block identifiers. I have set the paramaters of these blocks to be atomic and a reusable function within the code generation tab in the hopes of the generated code sharing one function file for all instances.
However when i generate my code using Embedded Coder i'm met with repeated function files for every instance of each MATLAB function block, with these files containg identical code. How would i go about ensuring any identical function blocks all generate into one model wide function?
댓글 수: 0
채택된 답변
sschumm
2023년 10월 18일
Hi,
A simple example would be:
The Code Generation Settings are:
The generated code looks like this:
("Slec_reusable_Sub" is the top model name, the MATLAB Function is default)
Best regards
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!