To create a BQL Expression component

  1. Design your expression. This step answers the question, “What does Expr need to do?”

    For example, say you wish to create a logic component with four Boolean inputs and two Boolean outputs. One output is an AND function on all inputs, the other output is an OR function on just two of the inputs.

  2. Drag an Expr from the kitControl palette onto your wire sheet and give it a name.
    Figure 57.   kitControl components with BQL Expression (Expr) highlighted
    Image
  3. Using the slot sheet view of the component, add four Boolean inputs and two Boolean outputs to the Expr and give them appropriate and unique names.
     NOTE: When adding input slots, set (check) the Execute On Change flag for each one.
    Figure 58.   New slots (out1, out2, in1, in2, in3, in4)
    Image
     
  4. Using the property sheet view, configure any execution delay.

    The expression will run after this delay, which is useful to throttle rapidly changing properties used as inputs.

  5. Continuing on the property sheet, enter the BQL statements in the Expr field.
    Figure 59.   Example expression statements
    Image

    All other properties are assumed to be dynamic properties and can be added or removed on the Expr slot sheet.

  6. Click Save, then the Image“Up Level” menu bar icon to return to the parent wire sheet. The new Expr component is visible, but without any “pinned” slots for inputs and outputs.

    Although optional, you can pin slots before linking, by right-clicking the component and selecting Image Pin Slots. This can speed up linking, as otherwise the popup Link dialog appears if linking to unpinned slots. You can also use the right-click Reorder option to change the top-to-bottom positioning of slots.

  7. Using the wire sheet view, make links to the slots and test your logic.
    Figure 60.   Example of an expected result
    Image

    The figure above shows all slots of this example Expr component linked.