Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ InTouch HMI

Configure condition scripts

  • Last UpdatedApr 09, 2025
  • 2 minute read

Condition scripts are triggered depending on when certain logical conditions are fulfilled. Use condition scripts to execute a script:

  • One time when a condition is fulfilled.

  • One time when a condition is not fulfilled.

  • Periodically while a certain condition is fulfilled.

  • Periodically while a certain condition is not fulfilled.

A condition script is identified by the condition syntax that initiates the script. For example: tag1>=13.

Note: A script that is assigned the On True condition type only executes if the condition transitions from False to True. A script that is assigned the On False condition type only executes if the condition transitions from True to False.

Configure a condition script

  1. In the Scripts pane, right-click Condition, and select New.

    The Condition Scripts dialog box appears.

    Condition Scripts dialog

    • To edit an existing condition script, select the plus sign next to Condition, right-click the condition script name, and select Edit. The Edit Condition Script dialog box appears.

  2. In the Condition box, type the expression that you want to use as the condition.

    You can type the expression to a maximum length of 1024 characters.

  3. You can enter a comment in the Comment box.

  4. In the Condition Type list, do one of the following:

    • Select On False to configure a script to execute one time when the condition becomes false.

    • Select While False to configure a script to execute periodically while the condition is false.

    • Select On True to configure a script to execute one time when the condition becomes true.

    • Select While True to configure a script to execute periodically while the condition is true.

  5. If you selected While False or While True in the previous step, type a time interval between 1 and 360000 milliseconds in the Every box.

    Note: The conditional WindowViewer timers will stop themselves if the condition is no longer true. For example, While Mouse Button Down events will not trigger if the mouse button is no longer down, and key scripts will stop if keys are no longer down.

  6. Type your script, or modify the existing script in the window.

  7. Select OK.

Delete all condition scripts that are associated with a condition

  • In the Scripts pane, expand Condition, right-click the condition script name and select Delete. When a message appears, select Yes.

Delete individual condition scripts that are associated with a condition

  1. In the Scripts pane, expand Condition, right-click the key script name and select Edit. The Edit Condition Script dialog box appears.

  2. In the Condition Type list, select the script trigger for the script to delete. The script appears in the main section of the Edit Condition Script dialog box.

  3. On the Edit menu, select Clear. The script from the main section clears and the associated script is deleted.

    Related Links
    TitleResults for “How to create a CRG?”Also Available in