Page 651 - ExtendSim User Guide
P. 651

Presentation 625
Hierarchy
☞ You can name a connector anything you want as long as the name ends in In or Out and is 32 characters or less. Also, every connector must have a unique name.
Connecting to the submodel
The next step is to connect the connector text label to the appropriate block:
In the submodel pane, move the WaterOut text label to the right of the Math block.
Drag a line from the output of the Math block to the WaterOut text. Once the line thickens, release the mouse and the connec- tion is made.
☞ The Stomach, Absorption, and Bloodstream
blocks in the Drug Ingestion model are exam-
ples of hierarchical blocks with connectors.
The model is located at \Examples|Continu-
ous\Standard Block Models and is discussed on page page 78.
Step 5: Connect the block in the model
To connect the finished hierarchical block to the rest of the model:
Close the structure window.
When you close the structure window of a new hierarchical block, a dialog gives options to save the block, discard changes, or cancel. These options are discussed in the fol- lowing topic. For this example:
Choose Save to this block only.
Connector changed to output connector and added to Math block
Connect the connector on the hierarchical block to other connectors in the model, just as you would any other block. In the example, the hierarchical block is connected to a Holding Tank block.
Note that there is only one output from this hierarchical block and it represents the total amount of water from the two sources. You could also add connectors for the individual Rainfall and Stream outputs so this block would more closely resemble the one created in the Tutorial.
Saving hierarchical blocks
By default, hierarchical blocks are saved with the model. You can also save a hierarchical block to a library, which makes it easier to add them to new models.
Hierarchical block connected to Holding Tank
How To


































































































   649   650   651   652   653