Hierarchical Boxes

The HierarchicalBox operator is a special operator in VisualApplets that allows to structure designs. As the name implies, the operator has the function of a box. You can mark a part of your design and make it the content of a hierarchical box.

The hierarchical box is visible in the design as an operator instance (of operator HierarchicalBox). The content of the hierarchical box you can see and edit in an individual design window.

A hierarchical box contains a combination of operators and links and can connect them to an arbitrary number of input and output links. The use of HierarchicalBox modules allows you to

  • structure your design very clearly, and to

  • administrate groups of modules.

In the design panel, the HierarchicalBox module is displayed as an M-type operator (oval shape); nevertheless, its behavior depends on the operators inside the hierarchical box.

The following figure shows an example of a HierarchicalBox. As you can see, the operators included in the hierarchical box are displayed in a separate design window. Depending on the window settings, both diagrams can be viewed at the same time as shown in the example. See 'Main Program Window' for more information on how to arrange diagram windows.

Example of a Hierarchical Box

Figure 118. Example of a Hierarchical Box


Creating a Hierarchical Box

There are several ways to add a hierarchical box:

  • Making a part of your design a hierarchical box:

    1. Select the modules of your design you want to assemble as hierarchical box. (Press the STRG key on your keypad and click on the modules you want to assemble.)

    2. Keep the STRG key pressed and right-click on an empty part of the design window to open the context menu.

    3. From the context menu, select Move to Hierarchical Box.

      A new hierarchical box is created that contains all selected modules and the according in- and out links.

    4. Double-click on a hierarchical box to open the diagram window that shows the hierarchical box implementation.

  • Defining an empty hierarchical box:

    1. Select the HierarchicalBox operator from the Base library and add it to your design, or

      Right-click on an empty area in a diagram and select InsertHierarchical Box, or

      select DesignHierarchical Box from the main menu, or

      Select the icon in the Edit toolbar.

    2. In the window that occurs, define the number of input and output links of your new HierarchicalBox.

    3. Click OK.

      The HierarchicalBox module is inserted into your diagram; it has the number of input and output ports you just specified.

    4. Double-click on the hierarchical box module to open its design window.

    5. Add the operators you want to have in your hierarchical box.

    6. Connect the design in the box to the input and output ports of the box via links.

Navigating between Design Windows

To go back to the design window of the process that contains the hierarchical-box module:

  1. Click on the window tab in the design window:

    Window tabs of the design window

    Figure 119. Window tabs of the design window


To step back in the hierarchy:

  1. Select ViewWindow Up ( Backspace ) or click the Window Up button in the View toolbar.

Editing Module Properties

To open the module properties:

  1. Right-click on a hierarchical box and from the context menu, select "Properties". Here, you can see and edit the parameters of the hierarchical box that are available for parametrization.

For information how to make parameters deeply nestled within a protected hierarchical box (or within a protected hierarchical box that is part of another protected hierarchical box) visible and available at this level, see the Operator Reference, library "Parameters".

Re-use of Hierarchical Boxes

You can use hierarchical boxes more than once by copy & paste. Each instance of a hierarchical box is independent from its siblings,i.e., if you make changes to one of the copied hierarchical boxes, this has no impact on the others.

For information on how to use hierarchical boxes as library elements and protected library elements, see section 'Creating a User Library Element'.

Inserting Additional Ports to Hierarchical Boxes

You can add further input and output ports to your hierarchical box anytime. To add a port:

  1. Navigate to the design window that shows the hierarchical box module.

  2. With the mouse pointer, go to an input port (if you want to insert an input port), or to an output port (if you want to insert an output port) so that the port is highlighted.

    Highlighting a Port

    Figure 120. Highlighting a Port


  3. Right-click on the port.

  4. From the context menu, select Insert Port Above or Insert Port Below.

The new port is inserted. It is given a default name. To give an individual name to the port, use context menu item Rename Port (see below).

Deleting a Port of a Hierarchical Box

You can delete input or output ports of your hierarchical box anytime. To delete a port:

  1. Navigate to the design window that shows the hierarchical box module.

  2. With the mouse pointer, go to the port you want to delete so that it is highlighted.

  3. Right-click on the port.

  4. From the context menu, select Remove Port.

The port is deleted.

Re-naming the Ports of Hierarchical Boxes

To enhance the readability of your design, you can give names to the input ports and output ports of a hierarchical box:

  1. Navigate to the design window that shows the hierarchical box module.

  2. With the mouse pointer, go on the port you want to re-name so that it is highlighted.

    Highlighting a Port

    Figure 121. Highlighting a Port


  3. Right-click on the port you want to re-name.

  4. From the context menu, select Rename Port.

  5. In dialog Rename Port, enter a name for the port.

    Entering a port name

    Figure 122. Entering a port name


  6. Click OK.

The new name is visible, for example, in the design window of the hierarchical box module:

Renamed ports of a hierarchical box

Figure 123. Renamed ports of a hierarchical box


Re-ordering the Ports of Hierarchical Boxes

In quite the same manner as renaming, you can re-order the ports of a hierarchical box module:

  1. Navigate to the design window that shows the hierarchical box module.

  2. With the mouse pointer, go on the port you want to change the position of so that it is highlighted.

    Highlighting a port

    Figure 124. Highlighting a port


  3. Right-click on the port you want to re-order.

  4. From the context menu, select Move Port Up or Move Port Down.

The order of the ports is swapped. This is visible, for example, in the design window of the hierarchical box module:

Reordered input ports of a hierarchical box

Figure 125. Reordered input ports of a hierarchical box


The re-arrangement of port order has no impact on the functionality of the hierarchical box. The re-arranged ports are linked to the same inner and outer design elements as before.