simulink coder - code generation not visible in configuration parameter pane

34 ビュー (過去 30 日間)
Ingrid
Ingrid 2012 年 11 月 12 日
編集済み: Hammed Omotoso 2022 年 10 月 19 日
I am very new to simulink and I am trying to figure out how I can convert a model that I created to s-code so that I can use it as a user-defined block (S-function) in my other code.
I first tried to reference to my own created model through a Ports & Subsystems/Model block but this did not work out in my case because than a file is generated for each time the model block is referenced which I do not want due to memory problems and is also irrelevant because the block does not change...
Therefore my solution to circumvent this problem was to create s-code from the model and then reference to this s-code in my topmodel. So* first question*: is this the good way to approach this?
Second question: where can I find the code generation pane? I have checked and have the simulink coder installed (command ver shows: Simulink Coder Version 8.2 (R2012a) but I cannot find it on the configuration pane (see picture attached) nor in the model explorer. In the help of the simulink coder this option should be there and I have no idea were to look further... )

採用された回答

Kaustubha Govind
Kaustubha Govind 2012 年 11 月 12 日
See Create S-Function Blocks from a Subsystem for information on you can use Simulink Coder to generate an S-function from a subsystem.
What do you see when you execute:
>> license('checkout', 'real-time_workshop')
If you don't see 1 as the return value, you are probably not seeing the Code Generation pane in the Configuration Parameters window because Simulink is unable to check out a license for Simulink Coder (formerly known as Real-Time Workshop).
  3 件のコメント
Ingrid
Ingrid 2012 年 11 月 13 日
Okay, I have contacted our ict-service and apparently I will not be able to obtain the license for the simulink coder as it reserved for specific departments.
Any ideas on how I can solve my problem stated above without the simulink coder?
Is it better to work with model-references or with subsystems or ... The reason that I worked with model-reference is that I have a certain set-up that needs to be repeated within one top-model at different locations and I build this top-model with matlab-code (add_block)
Ingrid
Ingrid 2012 年 11 月 13 日
for future reference to other people confronted with the same problems: first read this http://www.mathworks.com/tagteam/63037_Large-Scale%20Modeling%20for%20Embedded%20Applications.pdf
before starting the modelling - it makes much clearer which different approaches exist and which one is the best to follow in your specific case

サインインしてコメントする。

その他の回答 (1 件)

Hammed Omotoso
Hammed Omotoso 2022 年 10 月 19 日
編集済み: Hammed Omotoso 2022 年 10 月 19 日
license('checkout', 'real-time_workshop')
ruuning this code returns 1 as the output yet I can not see Code generation pane in my simulink model. I am using MATLAB 2022a version.

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by