Entering Conditional Expressions

You can set conditional expressions to define criteria that can be used to control execution of segments of the simulation process flow.

  1. From the Design Gateway, open a model.

  2. Right-click the segment of the simulation process flow for which you want to edit the conditions, and select Edit Condition.

    The Sim-flow Conditions dialog box appears.

  3. Click Conditionally execute, and click the button.

    The Sim-Flow Condition Expression dialog box appears.

  4. Enter the conditional expressions in the Conditional Expression text box by typing the expression directly in the text box or by using any of the following methods:

    • To insert a declared parameter, double-click the parameter in the Parameters list. You can also select the parameter and click Add (beneath the Parameters list).

      Parameter names containing spaces or other punctuation are inserted in the conditional expression text surrounded by single quotation marks. You can also type parameter names in this format.

    • To insert a function, double-click the function in the Functions list. You can also select the item and click Add (below the Functions list). You can use array variables with all functions.

      Note: All trigonometric functions (e.g., sin, cos, tan, sec, csc, cot) use radians in their argument. All arc trigonometric functions (e.g., acos, asin, atan, acsc, asec, acot) return radian values.

    • To insert numbers or operators, use the Calculator buttons or the numeric keyboard.

    If you are entering multiple conditional expressions, enter each expression on a separate line in the Conditional Expression text box or separate the expressions by a semicolon.

  5. If desired, select Allow exceptional values (NaN, Infinity).

    By default, the conditional expression stops and displays an error if any function or operator returns a real result with an exceptional value (Inf, -Inf, or NaN). This option allows the Calculator component to proceed and to return the exceptional value.

  6. When the conditional expression is complete, click Calculate to execute the conditional expression and to display the result in the Status bar.

    To view a more detailed result, click the button next to the Status bar to open the Calculation Messages dialog box. Click OK to close the dialog box.

    If the expression contains errors, Isight displays a message and highlights the symbol closest to the error in pink.

  7. Click OK to save your changes and to close the Sim-flow Conditions dialog box.