필터 지우기
필터 지우기

PIL block generation in a separate file

조회 수: 2 (최근 30일)
Muhammad Rizwan
Muhammad Rizwan 2020년 6월 22일
댓글: Muhammad Rizwan 2020년 6월 29일
Hi All,
I am trying to generate a PIL block for tx_micro(file attached) for ARDUINO UNO.
I ahve tried arduino PIL (https://www.mathworks.com/help/supportpkg/arduino/examples/code-verification-and-validation-with-pil.html) example and it worked perfectly fine.
Now I want same for my model so I can compare my PIL block with simulink simmulation block.
When I try to generate PIL block for my model it just displays generated c code rather than a PIL block in an extra file(as is done in arduino example above).
Can anyone help me in generating the block for comparison.
I have attached my model too.
PIL block is to generated for tx_micro.
  댓글 수: 2
Nirmalkumar Doreraju
Nirmalkumar Doreraju 2020년 6월 26일
Hi Muhammad,
I believe that the MATLAB release that you are trying on is R2020a.
If so, then before clicking on build, try this. In Simulink Toolstrip you can see a "C Code" tab, in that you should see a drop down which has two options "Generate Code" and "Build". "Generate Code" will create, only the C files, which I suspect is your case. Change it to "Build" and then click on Build in the Build Code for Subsystem window. It should create the block for you.
Please let us know, how it went.
Thanks and Regards,
Nirmal
Muhammad Rizwan
Muhammad Rizwan 2020년 6월 29일
Thanks Nirmal
Yes it worked.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Code Generation에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by