Masking Super Blocks
Apply a mask to hide the underlying blocks of a super block.
Navigating in Masked Super Blocks
You can navigate inside of a masked super block from the Project Browser or the context menu.
Editing Masked Super Blocks
The Edit Mask tool lets you modify the parameters associated with a super block.
Removing and Restoring Masks from Super Blocks
The Remove tool lets you remove a mask from a super block so that you can access the hidden contents of the super block. The Restore tool reapplies the mask.
Masking Examples
Learn about masking, auto-masking, and the creation of new blocks through masking.
Super Block Masking
A mask placed on a Super Block breaks the semi-global hierarchical scoping mechanism. A mask defines a set of parameters (mask parameters) and provides values for them, possibly as a function of parameters outside the Super Block. By analogy, an unmasked Super Block can be compared to an OML script and a masked Super Block, to an OML function.
Super Block Diagram
Consider the following diagram, inside a Super Block named SuperBlock:
If the Super Block Context is empty, the parameters of this diagram are A, B and dT. If the Super Block is masked, then the mask should define these three parameters. Such a mask may look as follows:
The mask parameter names are not directly visible on the mask GUI; they can be made visible by placing the cursor on top of the parameter description. In this case the mask parameters are named A, B and dT. The parameter values are defined by numerical values 1, 2 and 1.3. At this point the Super Block resembles a library block; the mask parameters are essentially local, private variables of the block, transparent to the user.
Auto-Masking
This mask defines parameters named A, B and dT inside the Super Block from model parameters with the same names outside the Super Block. This mask can then be edited, in particular for providing descriptions for the parameters (auto-masking places by default the name of the parameter in the description field).
Creating New Blocks through Masking
Once a Super Block is masked, it can be used like a library block, and even placed in a block library. The values of the parameters should simply be replaced by default numerical values. Several Twin Activate base library blocks are masked Super Blocks.
Creating a New Block with a Digital Chebyshev Filter
The new block can now be created by auto-masking this Super Block, and editing the mask to provide a description for the block, and, descriptions and default values for the parameters:
This block can now be used as such in the model or be placed in a library for wider usage.