beautypg.com

Array subscript out of range – Rockwell Automation Logix5000 Controllers I/O and Tag Data Programming Manual User Manual

Page 52

background image

Chapter 2

Organize tags

You can use these operators to specify the subscript of an array.

Format your expressions as shown in the following table.

If the operator requires

Use this format

Example

One value (tag or expression)

operator(value)

ABS(tag_a)

Two values (tags, constants, or expressions)

value_a operator value_b

• tag_b + 5
• tag_c AND tag_d
• (tag_e ** 2) MOD (tag_f / tag_g)

Array subscript out of range

Every instruction generates a major fault if the array subscript is out of range.

Transitional instructions also generate a major fault even if the rung is false. The

controller checks the array subscript in these instructions even if the rung is false.

Example:

52

Rockwell Automation Publication 1756-PM004E-EN-P - October 2014