What is defference between masked subsystem and unmasked subsystem?

7 visualizzazioni (ultimi 30 giorni)
I have a question about mask option in subsystem.
In simulink, we can 'mask' option in subsystem and if i use this, i can encaptulate the subsystem.
Is there any difference in 'mask' option? such as the way of code generation or result of code generation or way of compliling etc.
I wonder if it's just for visual encapsulation or other difference.
thanks

Risposta accettata

Jongil Lee
Jongil Lee il 13 Giu 2023
안녕하세요.
Mask의 기능은 위 언급한 내용과 같이 subsystem을 효과적으로 블럭화 하고 필요한 파라미터만 Mask에서 이용할 수 있어, Subsystem을 component화 하여 재사용이 편리합니다.
만약 내부정보는 보호하고 모델을 공유하기 위한 방법이라면 protected model을 한번 사용해 보시기 바랍니다.
  2 Commenti
민석 옥
민석 옥 il 14 Giu 2023
안녕하세요. 답변 감사합니다.
혹시 mask의 기능이 code generation에 영향을 주거나 compile 방식의 차이가 있다거나 하는 차이점이 있지는 않나요??
감사합니다.
Jongil Lee
Jongil Lee il 14 Giu 2023
안녕하세요.
Code 생성은 사용하시는 디자인 패턴이나 Embedded Coder의 옵션에 따라 생성되는 코드의 형태를 달리 할 수 있으며, SubSystem과 Mask의 이름에 의해 변수명이 다르게 생성될 수 있습니다. SubSystem 또는 Mask 내부에 구현하신 알고리즘의 차이는 없습니다.

Accedi per commentare.

Più risposte (1)

Shivam
Shivam il 12 Giu 2023
The main difference between masked and unmasked subsystems in Simulink is that unmasked subsystems are fully visible and allow direct access to their internal components, while masked subsystems hide their internal implementation and require the use of a custom interface to modify their behavior.
The mask option does not affect the underlying behavior or functionality of the subsystem. It does not change the way the subsystem is simulated, compiled, or generates code. The mask is purely a visual representation and a means of providing user-configurable parameters.

Categorie

Scopri di più su Subsystems in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by