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

AVEVA™ Plant SCADA

Arrays

  • Last UpdatedJul 18, 2023
  • 2 minute read

An array is a collection of variables (all of the same data type) that are stored in consecutive memory registers in an I/O device.

Plant SCADA supports two types of arrays:

  • Numeric arrays

  • String arrays.

Numeric Arrays

Numeric arrays are useful when you have separate devices (or processes) performing similar functions. You can program the I/O device to store, in consecutive memory registers, variables that relate to each of these processes.

In the following example, five consecutive variables (V500, V501, V502, V503, and V504) store the conveyor speed of five conveyors (1 to 5).

Embedded Image (65% Scaling) (LIVE)

Instead of configuring five separate variable tags (one for each conveyor), you can configure a single tag as an array.

To specify a single variable tag for an array, define the first address and add the size of the array (the number of consecutive addresses) to the register address.

Variable Tag Name

Conveyor_Speed

Address

V500[5]

Here, five register addresses are referred to by the variable tag Conveyor_Speed.

String Arrays

If you are using a Plant SCADA string data type, you need to specify an array of integer data types. One INT register stores two string characters.

To calculate the size of an array (for string data types), use the following formula:

Embedded Image (65% Scaling) (LIVE)

The last element of the array is always used to store the null character '\0'. This character marks the end of the string.

To store the word "Recipe", you need to specify an array with 4 elements, for example:

Variable Tag Name

Recipe_Tag

Address

V500[4]

Two characters are stored in each register, that is:

Embedded Image (65% Scaling) (LIVE)

You can then refer to the entire string by specifying the tag:

<Tag Name>

For example:

Variable Tag

Recipe_Tag

To store the word "Recipes", you would also specify an array with 4 elements. The characters are stored as follows:

Embedded Image (65% Scaling) (LIVE)

Note: If your I/O device supports string data types, you need to specify the address in the format determined by the I/O Device you are using.

See Also

Refer to Array Elements

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