필터 지우기
필터 지우기

How can I define a custom BlockType in Simulink

조회 수: 6 (최근 30일)
Jacques
Jacques 2014년 2월 23일
답변: Kaustubha Govind 2014년 7월 10일
Hello,
When I create a custom block using an S-function, the BlockType of this block, by using
get_param(myblock, 'BlockType')
is displayed as S-Function .
If now I put a mask on my custom block, the block type will be displayed as Reference .
How can I get this to return something like Mycustomblocktype ?
Thank you,
Jack
  댓글 수: 2
Jacques
Jacques 2014년 2월 23일
Actually, even with a mask, the block type is displayed as S-function. However, if I export the variable to a c program, it will then be displayed as Reference. Why is this ??
Daniel
Daniel 2014년 7월 3일
I have the same problem. How can i change BlockType which is always marked as readonly? Currently the BlockType inherit from previous block like subsystem, s-function etc. I need my own types and using an additional attribute is more a hack than a solution for this problem.

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

채택된 답변

Jacques
Jacques 2014년 2월 23일
In fact, Reference was displayed because the library from which the block was taken was not on the path. It had nothing to do with the mask.

추가 답변 (1개)

Kaustubha Govind
Kaustubha Govind 2014년 7월 10일
The BlockType parameter cannot be customized, and is only defined by internal blocks. For your case, perhaps you could use MaskType instead?

카테고리

Help CenterFile Exchange에서 Simulink Environment Customization에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by