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

AVEVA™ Plant SCADA

Adding Named Scripts to a Graphic

  • Last UpdatedJul 13, 2023
  • 2 minute read

You can add named scripts to a graphic. A named script runs:

  • One time when the specified values, data or expressions change.

  • Periodically if the values or expressions meet a certain criterion, such as being true.

Every named script can contain only one trigger type.

To add a named script to a graphic

  1. Open the graphic in the Industrial Graphic Editor.

  2. On the Special menu, click Scripts. The Edit Scripts dialog box appears.

  3. Click the Add icon. A new entry is created in the Named Scripts list.

  4. Type a name for the named script. The name appears on the right panel as header.

  5. In the Expression box, do one of the following:

    • Type an expression, value or reference.

    • Browse for a reference.

      The expression acts as data source for the script trigger.

  6. In the Trigger list, click:

    • WhileTrue to trigger the script periodically when the expression is true.

    • WhileFalse to trigger the script periodically when the expression is false.

    • OnTrue to trigger the script one time when the expression becomes true from false.

    • OnFalse to trigger the script one time when the expression becomes false from true.

    • DataChange to trigger the script one time when the expression or its quality changes. Select the Quality Changes check box to trigger the script when the quality of the specified expression changes.

  7. If you want to specify how often the script is run when the trigger condition is fulfilled, type a time delay in milliseconds in the Trigger Period box.

  8. If you want to specify by how much the evaluated value is expected to change before the script runs, type a deadband value in the Deadband box.

  9. Type your script in the main edit box.

  10. Use the Script Function Browser and Attribute Browser to select external data.

  11. Click OK. The script editor validates the syntax of the script and identifies any errors. Click:

    • Yes to save changes even if the script contains errors.

    • No to cancel the changes and close the script dialog box.

Adding and Maintaining Graphic Scripts

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