About Tags and the Project Database Where NumValue1 and NumValue2 can be an integer tag or a numerical constant. For example: temperature[tk+2] or temperature[tk+6] . Using array tags in any IWS task can save a signification amount of project development time. For example, if you needed tag points related to the temperature of four tanks. The conventional configuration method is the following: • temperature1 : high temperature on tank 1 • temperature2 : high temperature on tank 2 • temperature3 : high temperature on tank 3 • temperature4 : high temperature on tank 4 Using array tags simplifies this task, as follows: • temperature[j] : high temperature on tank {j} Note:
When you create a four-position array tag, the system creates five positions (from 0 to 4). For example: tag_example[15] //start position=0, end position=15 Therefore, the tag_example[15] array has 16 elements. When using another tag to reference the index of an array, if the value of the tag is outside the size of the array, then the following results are given: • If IndexTag is greater than the size of the array, then MyArray[ IndexTag ] will point to the end position of the array; and • If IndexTag is less than 0, then MyArray[ IndexTag ] will point to the start position of the array.
Array Tags An array tag consists of a set of tags that all have the same name, but use unique array indexes (a matrix of n lines and one column) to differentiate between each tag. An array index can be a fixed value, another tag or an expression. Maximum array sizes are determined by product specifications. You can use array tags to: • Simplify configurations • Enable multiplexing in screens, recipes, and communication interfaces Page 54