How to add global variables
    • 04 Jul 2023
    • 1 Minute to read
    • Dark
      Light

    How to add global variables

    • Dark
      Light

    Article Summary

    Global variables can be defined to be controlled by and referenced in logical rules. 

    This enables a user to, for instance, create a timer to start when a certain condition is met, and for multiple gates, pumps, and/or abstraction units to then be controlled by this global timer.

    Note:

    This guide covers the minimum data required. Several optional settings are also available for logical rules, please see the Rules section of the technical reference for further details.

    Steps

    1. On the 1D River Build tab, click Edit Variables. This will open a new window.

    2. Click Add Variable and a new row will be added to the table.

    3. Define your variable(s) by filling out the table fields:

      • Enter a unique Name for your variable.
      • From the drop-down provided, select the Variable Type required; Timer, Integer, Float, Binary, or Ternary.
      • For a variable of type Timer, an Initial Status (ON or OFF) must be provided.
      • A Comment can optionally be provided for each variable.
      • An Initial Value for the variable can also be provided (leaving this column blank will result in the default value of 0).
    4. Click OK to save when you have fully defined your variables.

    5. Use your global variables within logical rules in any applicable units (sluice or gated weir, pump or abstraction unit) in the normal manner. An ALSO statement can be used if needed. An example is provided below.

      Example usage: switching a global timer on (and setting no abstraction) when the flow is a specified level.

      RULE1

      IF(FLOW(A2).LE.100.0)

      THEN ABS= 0

      ALSO MyGlobalTimer=ON

      END

    6. Click OK to save and close the unit. Don't forget to also Save these changes to the network.


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.