Borrar filtros
Borrar filtros

simulink embedded coder block is eliminated

29 visualizaciones (últimos 30 días)
Byeong Gwan Jang
Byeong Gwan Jang el 29 de Oct. de 2021
Comentada: Sreeranjani Sekar el 16 de Nov. de 2021
현재 Matlab simulink에서 제작한 제어 시스템을 ARM 9에서 사용하기 위해 Embedded coder를 사용중에 있습니다.
simulink 안에는 여러개의 Matlab simulink function으로 구성되어 있으며,
coder를 사용하여 code generation을 하면 대부분의 simulink function 블록이 code에 구현이 되지 않고 아래와 같은 문구를 확인할 수 있습니다.
  • Block ~ is eliminated by code generation optimization. Code is not generated for eliminated blocks.
위와 같은 에러가 왜 발생하는지 확인이 불가능하여 질문 남깁니다.
Currently, the embedded coder is being used to use the control system made by Matlab simulink in ARM 9.
simulink consists of several Matlab simulink functions.
When i use a Embedded coder to generate code, most of the simulink function blocks are not implemented in the code, and you can see the following phrases.
Block ~ is eliminated by code generation optimization. Code is not generated for eliminated blocks.
It is impossible to check why the above error occurs, so I leave a question.

Respuestas (1)

Sreeranjani Sekar
Sreeranjani Sekar el 10 de Nov. de 2021
Yes blocks/signals which do not contribute to the model and virtual blocks will not genrerate any corresponding code. This is an intented behaviour of embedded coder to achieve optimization in the generated code.
But this optimization can be avoided by uncheking the block reduction. It can be found in Configuration Parameter > Simulation Target > Advanced Parameter> block reduction.
But please note that code will be generated for all the blocks in the model which might increase the complexity.
  2 comentarios
Byeong Gwan Jang
Byeong Gwan Jang el 12 de Nov. de 2021
Thanks for your explanation and advice.
I tried to do what you described. Now i am using Matlab 2020b. I checked the route that you explained above, but i didn`t find the "Adavanced Parameter" in Configuration Parameter > Simulation Target. I wonder that there are some differences depending on the Matlab version.
Sreeranjani Sekar
Sreeranjani Sekar el 16 de Nov. de 2021
  • Click on Simulation Target in config paramater
  • Scroll down and hover over to 3 dots that can be found under Reserved names
  • Click on it to view the advanced parameter.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!