Resolution of element references

A reference is when one element refers to another. Element references include:
  • An instruction referencing a tag as an argument to a parameter.
  • A tag referencing a datatype to declare the type of the tag.
  • A tag referencing a program that is to be scheduled within that task.
FactoryTalk Design Studio
resolves a reference by looking through the available scopes to find the referenced element by name. If
FactoryTalk Design Studio
cannot find the referenced element, an unresolved reference error (DS0038) appears in the error console.
All element references within
FactoryTalk Design Studio
are resolved by names. Character case does not matter. When resolving an element reference, FTDS searches through the scopes available to the element.
For example, when a routine instruction references a controller application scoped tag,
FactoryTalk Design Studio
first examines the routine’s own tags and parameters. Next it looks through its owning program, and finally it examines the program’s owner.
Searching through the scopes, if there are two or more elements with the same name,
FactoryTalk Design Studio
uses the most local scope element. For example, if a controller scoped tag and a routine parameter both have the same name, and the reference is from a routine,
FactoryTalk Design Studio
resolves to the routine parameter.
TIP:
Where there are two or more elements with the same name and within the same available scopes,
FactoryTalk Design Studio
displays a shadow warning in the error console. A shadow warning indicates that one element name (the innermost scope) is hiding other element names within the available scopes.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.