Tag syntax guidelines
Follow these guidelines when defining a tag.
- The data type of the tag must come before the name of the tag.
- When no value is specified, the default values for tags are defined by the data type.
- Alias tags cannot set the default value.
- FactoryTalk Design Studio applies these rules when writing out tags:
- If there is a property on a tag, tag member, bit, or array element, a curly bracket contains the property. For example:
- For tag members, if there is no property on the parent of the member, then no curly bracket is used. For example:
tag dint MyTag { desc := “hello”; }tag timer mytimer {len := 10;pre {desc := “desc on pre”;} := 10;}tag timer mytimer {len := 10;pre.1 {desc := “desc on pre.1”;} := 10;}
TIP:
Tips:
- You can specify the values of a tag by using [tag name] := [value].
- Specify properties and member values using this notation:{ [property] := [value] }
- Use this shortcut to set properties and values of tag members:{ [member<.submember(s)>][.property] := [property value] }{ [member<.submember(s)>] := [value] }
Provide Feedback