For information on the Command Hierarchy block, see Selection in the Logic section.
To configure the Command Hierarchy block:
-
Double-click a Command Hierarchy block. The Details dialog box for the Command Hierarchy (Enum Output) or Command Hierarchy (Boolean Output) appears. See the Command Hierarchy (Enum Output or Boolean Output) screen section.
- Select the IO Modifications check box to add, remove, or reorder inputs. Adding inputs creates new columns in the command hierarchy table in the left pane. Removing inputs removes columns in the command hierarchy in the left pane. Reordering inputs allows you to change the view of inputs in the left pane. See Adding Inputs and Outputs to a Block or Module or Reordering Inputs in a Command Hierarchy Block for detailed procedures.
Note: By default, I1 is an Enum input (Off, On), and I2 is a Boolean input (False, True).Tips:
- To add an enumeration input column, select the IO Modifications check box, and then click the plus sign to add an Input. When the Add Inputs dialog box appears, adjust the count file next to Input (Enum) and then click OK. After adding an enumeration input, make sure you select the appropriate enumeration set (Units) to use. To change the units, click Edit, select the new value, and click Apply. The default set is Off/On.
- To add a Boolean input column, select the IO Modifications check box, and then click the plus sign to add an Input. When the Add Inputs dialog box appears, adjust the count file next to Input (Boolean) to add inputs, then click OK.
- To remove a column, select the IO Modifications check box, and then click the minus sign next to the corresponding input column in the right pane. When removing a column that you wish to replace with another, make sure you remove the existing column first, and then add the new column. For example, to replace the I1 column that has an Off/On enumeration input with a Boolean input column, first remove the existing I1 column, and then add a Boolean input column and rename it I1.
- Click Edit.
- In the Name field, type a new name to identify the Command Hierarchy object. This name appears in the logic diagram and replaces the Command Hierarchy heading in the Details dialog box.
- In the left pane, in the input columns, use the drop-down menus for each cell to select a value to assign when in the State listed in the State column for that row. The cell color changes to green when you change a value.
Notes:
- Shaded table rows with asterisks indicate that when the block is in a particular state, it accepts any value.
- A complete configuration is when all possible combinations of inputs and values are represented in the rows (for example, the I1 column has an Off row and an On row in Figure 2).
- An incomplete configurationis when the input and value combinations listed in the rows do not cover all of the possible combinations. The output of the command hierarchy holds the last value and the output is flagged as Output cannot be determined. Use an incomplete configuration to hold the last value if an unlisted or undesirable condition occurs. The condition does not match any of the rows in the table (that is, none of the rows are true) and the output remains at the last value. When the configuration is incomplete, a dialog box appears stating: This Command Hierarchy table is Underspecified (missing some possible combinations).
- A yellow border surrounding the table cells indicates that the combination of inputs and values configured is redundant. A redundant configuration means that there are multiple rows that cover the same combination of inputs and values. The command hierarchy selects the row that has higher priority (appears higher) in the table to generate the output. In the first and third rows in Figure 1, for example, when the Mode is Off and the Maintenance Switch is Disable, both rows are True. Since the first row is of greater priority, the State output is set to False. Additionally, to create an Else condition, add a row of asterisks as the last row in the table with a True state. When using redundant rows, lower priority rows may not be active, which could indicate unused rows or an improperly configured command hierarchy block.
Figure 1. Command Hierarchy Redundancy Example
Tips:- To change the label of a column, in the right pane, click the Name cell of the corresponding input or output and type a new name. The cell appears green when you enter a new value. Click Apply. We recommend that you leave the label field empty so that you can use dynamic naming from the Standard Name menu.
- To change the enumeration set of a column (including the State column), click Edit and in the right pane, select a new value for Units. The cell appears green when you enter a new value. Click OK.
- To add a row, right-click a cell and select Insert Row.
- To add 5 rows, right-click a cell and select Insert 5 Rows.
- To add 10 rows, right-click a cell and select Insert 10 Rows.
- To remove a row, right-click a cell and select Delete Row.
- To copy a row, right-click a cell and select Copy Row. The copied row appears at the end of the table.
- To move a row, right-click a cell and select Move Row Up or Move Row Down. Or, select a row and use the up or down arrows to the right of the table.
- To indicate a state to use when the input is not a specific value (for enumeration input columns only), right-click a cell and select ! Value. For example, when you want an event to occur during any other state than the Satisfied state and you use ! Value, the state is indicated as ! Satisfied. To remove the ! Value indication and use a regular value, right-click the cell and select Value.
- Click Apply.
For example, the following figure indicates:
-
Row 1: When Input 1 (I1) is Off and Input 2 (I2) is False, the Output State is False.
-
Row 2: When Input 1 (I1) is On, the Output State is True regardless of Input 2 (I2).
Figure 2. Command Hierarchy (Boolean Output) Example