ADL®

Formula Block

The Formula Block evaluates a user-defined equation and outputs the result of the evaluation as a True/False, numeric, or an instrument type output. You can also define any number of input ports that can be used in the user-defined equation.

Example Using the Formula Block

How to create an equation

To create an equation for the Formula Block:

  1. Double-click the Formula Bock to open its block settings.

  2. In the Formula setting, click Click to edit formula.

  3. Define the inputs to the block. For each input you want to feed into the block:

    1. Drag the Input Connector variable onto the canvas.

    2. In the Add Input dialog, set the Label name for the input, and select the appropriate Input Type.

    3. Click OK.

  4. Drag and arrange the other operators and variables to define the equation's logic. For more information about creating equations, see the Building Formulas topic.

  5. When finished, click OK in the Formula Builder.

  6. Click OK in the Block Settings.

    The Formula Block is updated on the canvas to reflect the input ports.

Block settings

To change default block settings, double-click the block to open the Block Editor.

Setting Description
Name Name to display beneath the block on the ADL canvas
BodyColor Background color of the block
Formula

Equation used to calculate the value of the block

If not yet defined, the field displays a Click to edit formula link that opens the Formula Builder.

Description Optional text to explain how the block is used