Using Indirect Tags and Remote References in InTouch

Legacy Number# 97
Doc ID: TN584
Version: 85.0
Last Modified: 08/28/2015


InTouch supports remote tag referencing (RTR) since the release of the FactorySuite™ 2000. RTRs allow you to display, animate, and perform logic based on tag information from remote nodes, which enables you to easily create distributed client/server applications and significantly reduce your application maintenance tasks.

InTouch also supports Indirect tags, which allows you to create a generic faceplate to deal with multiple data sets. For example, if you have 100 PID loops in a process, you may create one faceplate using Indirect tags and then populate that faceplate with data from any of the 100 PID loops.

There are subtle differences in implementing an application using Indirect tags with remote references versus standard tag references (that is, referencing tags in the local tag database). This Tech Note outlines those differences and provides a strategy for using with Indirect tags—whether you are using local tag references or remote tag references.


Using Indirect Tags With Local Tags

InTouch has always supported Indirect tags with local tags since release 4.0. Here is a description of how Indirect tags are typically used with local tag database references:

Indirect tags allow you to create “generic” tags to be used with multiple data sets. For example, say you want to create a generic faceplate for modifying alarm limits. The faceplate might look something like the window below and be linked to several local tags as shown.

In this example you may have many different tags for which you would like to use the alarm limit faceplate. To redirect the faceplate to the appropriate tag, you would only need to execute the following QuickScript line:

IndirectTag.<Name> = “<tagname>”;

Where <Name> is the name of the Indirect tag and <tagname> is a tagname in the local tag database (examples, TIC-101, TIC-102, MyTag, and so on). When this line is executed all of the dot fields associated with the local tag are now accessible through the Indirect tag that is shown in the above faceplate.

Using Indirect Tags With Remote References

Remote referenced tags differ from local tags in a number of ways. The syntax for a remote reference is this:


Where <AccessName> is any valid InTouch Access Name and <Item> is any valid item that is supported by the I/O Server specified by the Access Name. Note that when you use remote references, the server returns a value to the client and not a tag structure. The value includes a time stamp and a quality stamp. Thus, an Indirect tag that is assigned to a remote reference cannot access any dot fields other than those relating to value, time and quality. (For example, an Indirect tag cannot access alarm limits through a remote reference.)

The alternative to the above faceplate is to create a faceplate with several Indirect tags instead of just one Indirect tag. The faceplate below illustrates the necessary modifications to the alarm faceplate so that it will work with remote references.

Note that instead of using one Indirect tag with ten dot field references, the faceplate now uses ten Indirect tags, all using the implied ‘.Value’ reference. (That is, no dot field implies the ‘.Value’.)

Assume that the alarm faceplate above is to be redirected to a remote reference tag TIC-101 on a remote InTouch node called TagServer1. An Access Name called TagServer1 has been configured as Node = TagServer1, Application = View and Topic = Tagname. To redirect the faceplate to the remote reference tag TIC-101, the following QuickScript must be executed:

IndirectTagname.Name = RemoteReference+".Name";
IndirectTagValue.Name = RemoteReference;
IndirectTagHiHiLimit.Name = RemoteReference+".HiHiLimit";
IndirectTagHiLimit.Name = RemoteReference+".HiLimit";
IndirectTagLoLimit.Name = RemoteReference+".LoLimit";
IndirectTagLoLoLimit.Name = RemoteReference+".LoLoLimit";
IndirectTagHiHiStatus.Name = RemoteReference+".HiHiStatus";
IndirectTagHiStatus.Name = RemoteReference+".HiStatus";
IndirectTagLoStatus.Name = RemoteReference+".LoStatus";
IndirectTagLoLoStatus.Name = RemoteReference+".LoLoStatus";

{Additional indirects to handle Min and Max Eng Units}
IndirectTagMinEU.Name = RemoteReference+".MinEU";
IndirectTagMaxEU.Name = RemoteReference+".MaxEU";


However, this set of script commands must be executed each time the faceplate has be redirected, which could be tedious and prone to errors. A better solution is to use QuickFunctions, which allow you an easy way to write a script once and pass it the name of the remote reference. Using the example set of script commands above, you could define a QuickFunction called RedirectAlarmFacePlate() as show below.

You can then call just one function, RedirectAlarmFacePlate(), to handle the entire redirection. To do this, simply call the QuickFunction from any script, as shown in this example:

CALL RedirectAlarmFacePlate (“TagServer1:TIC-101”);

Generally, you should develop your new applications using remote references exclusively (it is possible to remote reference a local tag database in InTouch, a remote InTouch application, or objects in an Industrial Application Server Galaxy). This abstracts the data source—local or remote—from the graphics. By using remote references exclusively in your InTouch application, you will significantly reduce your application maintenance when you later add new windows or graphical objects to your distributed system.

Using Indirect Tags With SuperTags

The methodology for using Indirect tags with remote references can also be used when using Indirect tags to create a generic faceplate for SuperTags. With SuperTags, you would create an Indirect tag for each SuperTag member dot field, which will be used in the generic faceplate. A QuickFunction similar to our example RedirectAlarmFacePlate() QuickFunction could also be used for the SuperTag faceplate.

For More Information

For more information on using Indirect tags, remote references and SuperTags, see the InTouch User’s Guide, which is available on-line on the InTouch CD-ROM or contact Wonderware Technical Support or your local Wonderware Certified Support Provider.


Author: S. Lewarne
Updated by: F.Gonzalez