Trigger an action on a Button Behavior event

Add a Button Behavior event to a graphic element or Add-On Graphic to have the element perform typical button actions. Button Behavior events apply typical button behaviors to a graphic element by performing pre-configured commands. For example, you can create a Button Behavior event that sets a tag to 1 on a touch press and sets the same tag to 0 on a touch release. This is useful for creating events for a button to start and stop a conveyor belt. Button behavior events include internal commands that you do not have to configure. Graphic elements and Add-On Graphics can have only one Button Behavior event.
You can use an external keyboard with the HMI device. The
L1
through
L10
keys listed when creating Key Press and Key Release events correspond with pressing
Shift+F1
through
Shift+F10
keys on an external keyboard. The
R1
through
R10
keys listed when creating Key Press and Key Release events correspond with pressing
Ctrl+F1
through
Ctrl+F10
on an external keyboard.
To trigger an action on a Button Behavior event
  1. On the screen, right-click the graphic element or Add-On Graphic and then select
    Button Behavior
    .
    TIP:
    Adding a Button Behavior event for the selected element is also done through the
    Events
    tab of the
    Properties
    window.
  2. Select the button behavior.
    TIP:
    An instance of an Add-On Graphic cannot bind directly to a controller tag. Bind an instance of an Add-On Graphic to a controller tag by creating a user-defined data type property in the definition of the Add-On Graphic.
  3. To have the event occur even if focus is not first set by tabbing to the graphic element, clear the
    Requires Focus
    check box.
  4. For momentary button behaviors such as
    Set a tag to 1 on press, 0 on release
    and
    Set a tag to 0 on press, 1 on release
    , check the
    Always Trigger Release Event
    box.
    TIP:
    Tips:
    • Selecting the behavior type after entering a tag leaves the selected tag in the
      Tag
      box. This occurs unless the selected behavior is HMIBC or navigation. For example, selecting Tag_1 for the Set a tag to 1 on release behavior and changing to Set a tag to 0 on release, leaves Tag_1 configured for the new selection.
    • By default, Button Behavior events work with touch only. To have a key press activate the Button Behavior event, in the
      Key
      box, select an HMI device key. Press the selected key or touch the graphic element to trigger the event.
    • Clear the
      Always Trigger Release Event
      check box to not commit to a press action. This allows a finger to slide off the graphic element without triggering the release event.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal