Starting work on a project developed by someone else - many tags have leading syntax in the OPC item path that are unfamiliar to me. here is an example:
ns=1; s=[PLC]B3:3.6
My question is, what is the ‘ns=1; s=’ part of this doing?
This system has AB Micrologix and ControlLogix PLC’s.
When the tag is from an OPC-UA server, the OPC Item Path is really just the Node Id of the node in that server. The ns=X; prefix is part of the Node Id syntax that specifies the namespace the node belongs to.
Older versions of Ignition would omit the prefix if the namespace was 1, but starting in 7.8 it always specifies the namespace explicitly when a tag is dragged in. Using no prefix still works and defaults to ns=1, however, it’s just not the default behavior to rely on that any more.
This prefix indicates the namespace an OPC UA node belongs to.
In the Ignition OPC UA server all tags from devices are in index 1 and all tags from the “Exposed Tags” feature are in index 2.
Other servers have their own rules.
If you’re unsure then including the prefix is probably a better choice for you. When you drag a tag in from the OPC browser it will always include some kind of prefix. This is the best way to find out what is required or safest to use.