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

AVEVA™ Plant SCADA

Add a Local Variable

  • Last UpdatedJul 08, 2025
  • 3 minute read

Local Variables allow you to store data in memory when you start your runtime system.

To add a local variable:

  1. In the System Model activity, select Variables.

  2. On the menu below the Command Bar, select Local.

  3. The local variables list will display in the Grid Editor.

  4. Add a row to the Grid Editor.

  5. Type the required information in each column, or in the fields in the Property Grid.

    For a description of the properties, see below.

  6. Click Save.

Local Variables Properties

General Properties

Field

Description

Name

You can use any name for a tag (79 characters) provided it follows Tag Name Syntax and is not the same as the name of a Cicode function within the project or any included projects. See Reserved Words for a list of restrictions on naming.

Data Type

The data type of the variable (16 characters). Select one of the following supported data types:

  • BCD (Binary) - Coded Decimal - 2 bytes (0 to 9,999)

  • BYTE (Byte) - 1 byte (0 to 255)

  • DIGITAL (Digital) - 1 bit or 1 byte (0 or 1)

  • INT (Integer) - 2 bytes (-32,768 to 32,767)

  • UINT (Unsigned Integer) - 2 bytes (0 to 65,535)

  • LONG (Long Integer) - 4 bytes (-2,147,483,648 to 2,147,483,647)

  • LONGBCD (Long Binary Coded Decimal) - 4 bytes (0 to 99,999)

  • REAL (Floating Point) - 8 bytes (-1.7e308 to 1.7e308)

  • STRING (String) - up to 256 bytes

  • SCII (null terminated)

    Numeric and digital variables have a default value of 0 and string variables default to "" (empty string). If you do not specify a data type, the local variable will be treated as 16-bit integer.

Array Size

In the Array Size field (8 characters), enter the size of the array (number of elements) used to store the local variable. The array will be of the data types specified in the Data Type field.

The array can be one- or two-dimensional. When specifying a two dimensional array, separate the dimensions with a comma (for example "20,30").

Up to 32768 elements can be used for a one-dimensional array. For a two-dimensional array, the size of the first dimension multiplied by the size of the second needs to be less than or equal to 32768.

The compiler will generate an error message if:

  • The size limits are exceeded

  • Invalid characters are used

  • A two-dimensional array has zero (0) defined for a dimension.

Eng Units

The engineering units that the value represents (for example, %, deg, or mm/sec). This property is optional. If you do not specify engineering units, no engineering units are used.

Format

(11 characters). The display format of the value (of the variable) when it is displayed on a graphics page, written to a file, or passed to a function (that expects a string). This property is optional. If you do not specify a format, the format defaults to ####.##.

For more information, see Format Specifiers.

Comment

Any useful comment (254 characters).

Scale Properties

Field

Description

Zero Scale

Enter the value that represents the zero point for the local variable's data (11 characters). The zero scale value is used as the lower limit for trend and bar graphs, and values below the zero scale value will cause an "Out of Range" alert message in the runtime system.

Full Scale

Enter the value that represents the full scale point for the local variable's data (11 characters). The full scale value is used as the upper limit for trend and bar graphs, and values above the full scale value will cause an "Out of Range" alert message in the runtime system.

Project Properties

Property

Description

Project

The project in which the local tag is configured.

See Also

Configure Variable Tags

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