Create a tag with general properties
Use tags to allocate and reference data stored in the controller. A tag can be a simple, single element, or an array, or a structure.
Prerequisites
- Create anFactoryTalk Smart Object.
- Create a program.
- Create a routine.
- Add an instruction to the routine.
To create a tag with general properties
- On the explorer bar, selectSystem.
- InSystem, double-click the routine.
- In the routine, select a red instruction operand, type a new for a new tag, and then click elsewhere.TIP: To enter the full path of a tag, use the following formats where "owner" is an alias used in the path for a program tag and "owner.owner" is an alias used in the path for a controller tag:
- Program scope:
- ControllerName.ProgramName.TagName
- Area.SOName.ProgramName.TagName
- SOName.ProgramName.TagName
- ProgramName.TagName
- Owner.TagName
- Controller scope:
- ControllerName.TagName
- Owner.Owner.TagName
- Right-click the new tag name and then selectCreate new tag.
- On theGeneraltab ofCreate new tag, complete:ParameterDescriptionNameThe name for the tag.Data TypeBrowse to select the tag data type, enter the array dimensions, and then selectApply. Some instructions are limited to specific data types.UsageSelect a usage value for the tag or LOCAL, INPUT, OUTPUT, or INOUT.ScopeThe tag scope:
- Controller. Controller tags apply to the entire controller, and can be used by all programs. In other words, the data in a controller tag is available to every task or program within the controller application. These tags can be used as global variables.
- Program. Program tags contain data that is used exclusively by the routines within an individual program. This means that program tags can have the same name in more than one program, allowing programs to be copied and reused more easily. These tags can be seen as local variables.
DescriptionAn optional description of the tag. - SelectCreate.TIP: If you enter the tag path in an instruction operand and use the alias "owner" or "owner.owner", the path of the tag appears under the instruction operand in the routine.
- SelectTags and parametersand select the new tag.
- InPropertiesfor the tag, complete:
- Type. Enter the data type of the tag, such as BOOL, Counter, or INT. To see a complete list of available data types, browse to openSelect Data Typeand select the data type from the list. To configure array values, see Array concepts.
- Value. Enter a data value for the tag.
- Style. On theGeneraltab inProperties, select the style.
Provide Feedback