beautypg.com

Rockwell Automation Logix5000 Controllers I/O and Tag Data Programming Manual User Manual

Page 26

background image

Chapter 2

Organize tags

• Routines cannot access data that is at the local scope (local tag) of

another program.

• You can reuse the tag name of a local tag in multiple programs.
• For example, both Program_A and Program_B can have a local tag

named Tag_4.

• You can also use program parameters to share data between programs as

an alternative to controller-scope tags. See

Program parameter scope

on

page 27

.

Avoid using the same name for both a controller tag and a local tag. Within a

program, you cannot reference a controller tag if a local tag of the same name exists
for that program.

Certain tags must be controller scope (controller tags).

If you want to use the tag

Then assign this scope

In more than one program in the project

Controller scope (controller tags)

In a Message (MSG) instruction

To produce or consume data
In any of the seven AXIS data types
To communicate with a PanelView terminal

None of the above

Program scope (local tags)

26

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