About this task
The tool automatically creates and configures the hierarchy table in a translation block when you connect an Activity Input block to an Activity Output block of different types (Boolean to two-state Enum or two-state Enum to Boolean). The Enum input or output block must have a two-state enumeration set for the connection and automatic creation of the translation block to occur.
To connect blocks of other types, manually add and configure the Translation block according to the following procedure.
To manually configure the Translation block:
- Double-click a Translation block. The Details dialog box for the Enum to Boolean Translation or Boolean to Enum Translation dialog box appears. See the Translation (Enum to Boolean or Boolean to Enum) screen section.
Select the IO Modifications check box to add, remove, or reorder inputs. Adding inputs creates new columns in the table in the left pane. Removing inputs removes columns in the table 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.
- 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, 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, 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, then add a Boolean input column and rename the column to I1.
- Click Edit.
- In the Name field, type a new name to identify the object. This name appears in the logic diagram and replaces the Translation 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.
- Shaded table rows with asterisks indicate that when the block is in a particular state, no behavior change occurs, and the block checks for the next state listed.
- 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).
- An incomplete configuration is 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 Translation 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. 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 block.
- 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 leaving the label field empty so that dynamic naming from the Standard Name menu may be used.
- To change the enumeration set of a column (including the State column), click Edit and in the right pane, click the drop-down box for Units, and select a new value. In the left pane, the cells appear green to indicate the change. 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.