Reusing a Simulink subsystem for many different inputs without exceeding Home License block limit.

조회 수: 73 (최근 30일)
I am trying to create a "function" (subsystem I can call with varying inputs) within Simulink that can be copied and used over a very large amount of input cases. If I copied and pasted the subsystem block the number of times I need, the model would exceed the block limit of the Home License; there are a decent number of operations inside the subsystem (around 88 non-virtual blocks), but all of the cases I need to run use the exact same operations. The model itself is not complicated, so it seems silly that there wouldn't be a way to reuse the exact same operations for a bunch of different cases without triggering the block limit warning. Regardless, it would be horribly redundant and inefficient to have 30 instances of the same subsystem when the blocks inside all of them are identical and do the same task.
I've been searching extensively for a method of doing this, and it appears Simulink does have a few options, but very few examples of actually implementing them.
  • Adding these operations as a MATLAB Function block would be the least ideal, given how much it would slow down the model (and the number of times it would need to be used/called). I'd much rather not need to use the MATLAB interpreter.
  • I looked into masking the subsystem, but there is no clear information online about how deep Simulink actually looks to determine if the block limit has been exceeded. When you use the "length(find_system())" command in MATLAB to calculate a model's block count, you can specify to "Look Under Masks", which makes me think they do look under masks.
  • Creating a library block appears to be another option, but I've never done this before and had the same concern about Simulink still looking underneath at all the blocks inside. Unless a library block is built using generated code from a set of blocks? I'm not yet clear on how creating a library works.
  • I've tried making the subsystem an atomic unit, then checking "Reusable Function", which seems like it should do what I'm looking for, but the model block count did not change. Maybe I attempted this wrong.
  • It looks like I could also convert the subsystem into another model, then reference this other model file each time I want to apply those operations to a set of inputs. How would this affect the block count since it is effectively a single other file getting called multiple times (no repeat blocks) and isn't in the same model to begin with? What about simulation speed?
Which of these would work best? Am I missing any options? There must be a way to do this; it seems like basic functionality (maybe I'm missing something really obvious that does exactly this). Thanks!

답변 (1개)

Aditya Mittal
Aditya Mittal 2020년 4월 20일
Hi,
Among all the options that you have explored, I find creating library block is the best option for reusing the same model at different places. You can add them in a subsystem and drag the subsystem wherever required. Refer to the below link for library link block.
However, Simulink still looks underneath and count all the nonvirtual blocks every time the library block is used. Thus if you need to use more than 1000 nonvirtual blocks (limit for home licence), you can upgrade the licence anytime to Standard licence by subscribing to MathWorks Software Maintenance Service.

카테고리

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

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by