automatic change a block number in a mask, coming from simulink library, when I drag it more than onetime in my working space
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi any dear,
I have simulated a dynamic ball mill model in simulink. the name of a block in ball mill mask is "ballmill_number", I want to change this block number automatically when I drag More than one of this mask in working space. How can I do it?
Thank you so much
댓글 수: 0
채택된 답변
Kaustubha Govind
2013년 7월 8일
You can typically perform operations on block copy using the CopyFcn callback of the block. See Block Callbacks.
댓글 수: 4
Kaustubha Govind
2013년 7월 11일
Ted: Sorry, this forum is meant to help with specific questions. Writing entire pieces of code is beyond the scope of our involvement here. I would recommend that you spend more time studying the Simulink command-line API and post when you run into specific issues.
추가 답변 (1개)
Guru
2013년 7월 7일
Are you referring to the block name of a block within a masked subsystem that you want to change the name of?
If so, no you cannot do this, but really the question I suppose is why would you want to change the name of the block within a masked subsystem when you have multiple copies in the model?
Simulink changes or adds a block number to blocks, because its requirement is that every block at a certain hierarchical level of Simulink needs to have a unique block name. The block name is only used as a means to identify the block which is mainly just used with the MATLAB API to Simulink.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Author Block Masks에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!