It is important to give Tags a meaningful structure and arrange them in hierarchical Tag folders so that they are easy to understand, identify, and locate for all developers. You can also rename Tags independent of their Item Path.
Another important concept to consider when naming and organizing your Tags, is to do this early in your project. If you rename or move any of your Tags to another folder, and your Tag is being used in other places, chances are you are going to break the reference to the Tag on your screen. So keeping your Tags organized and defining your Tag structure early on in your project is critical.
The best way to keep your Tags organized is to rename them with something meaningful. By default, Ignition Tags are named after their OPC Server address when a Tag is dragged into the Tag Browser. You can change this name to just about anything that you want. We recommend using names that mean something to your process like 'Motor 3 Amps,' or creating folders in your Tag Browser like 'Motor 3/Amps'. When renaming Tags and folders, there is really only one question to ask: "does this structure make sense?"
When you choose a new name for your Tags and Folders, there are some reserved characters that you cannot use. There are many special characters that are available to use when naming Tags, but we recommend using only alphanumeric characters (A-Z, a-z, 0-9) and spaces. There are many characters that are not allowed, here are a few that are commonly tried. These have special significance in the Tag's path so they aren't valid in a name.
. | period |
~ | tilda |
/ | forward slash |
\ | back slash |
[ ] | square brackets |
{ } | braces |
One noticeable exception is the parentheses "(" and ")" are missing from this list. Technically they are valid for Tag names, but we do not recommend that you ever use them because it tends to cause confusion. When displaying information in a client, use them as much as you'd like, but they shouldn't be a part of a Tag or Folder rules that must be followed. The first character of the Tag name must be one of the following:
- any alphanumeric
- any valid unicode letter
- an underscore
The second character, and every character after that can then be one of the following:
- any alphanumeric
- any valid unicode letter
- an underscore
- a space
- and any of the following special characters:
All other special characters can not be used in a Tag name.
Tags and their properties can be referenced by a string-based path. Each Tag has a unique absolute path and often has many equivalent relative paths when referenced from other Tags. You most often generate these paths by browsing or through dragging. However, it's a good idea to understand how Tag paths work, particularly if you get into indirect Tag binding or scripting.
A Tag path looks something like this: [Tag Provider]folder/path/tag.property
The folder/path/tag.property
portion of the path may contain the following:
- A Tag
- Any number of nested folders followed by a Tag, separated by forward slashes (/).
- A period (.) followed by a property name after the Tag. Omitting this is equivalent to using the .Value property.