Indirect Tags wonderware intouch
This post explains the concept and practice of indirect tags, including discussion of the advantages and disadvantages.
- NB Designer OMRON HMI Youtube Tutorial Videos
- DOPSOFT DELTA HMI Youtube Tutorial Videos
- Wonderware Intouch Youtube Tutorial Videos
- GT Designer MITSUBISHI HMI Youtube Tutorial Videos
- WinCC Siemens HMI Youtube Tutorial Videos
- FACTORY TALK VIEW Youtube Tutorial Videos
Indirect Tags
Indirect-type tags allow you to create one window and reassign the tags in that window to multiple sources. For example, you could create a Data Change QuickScript that would modify the source for all tags in a window, based on a value that has changed.
When you equate an indirect tag to another source tag, both the indirect and the source tags become exact duplicates of each other in every aspect including .fields, scripts, and so on.
If the value of the source tag changes, the indirect tag reflects the change. If the indirect tag’s value changes, the source tag changes accordingly. You can define indirect tag values in the database as retentive and reset them to take on their last tag’s assignment on startup.
Indirect tags are assigned by using the .Name field. For example, if you created an indirect analog tag called Setpoint and used the expression below in a QuickScript, Setpoint1 would become the source for the value of Setpoint, and vice versa:
Setpoint.Name = “Setpoint1”;
Setpoint.Name = Setpoint1.Name;
You can also concatenate tagnames for use in indirect tags. For example, if you created a Data Change QuickScript that executes each time the value of the tagname “Number” changes, the indirect tagname, “Setpoint,” would change accordingly:
Number=1;
Setpoint.Name = “Setpoint” + Text(Number, “#” );
When this QuickScript executes, the value of the analog tag Number is converted to text and added to the analog tag Setpoint, making Setpoint.Name equal to Setpoint1.
Indirect analog-type tags are used for both integer (whole numbers) and real (floating point) tags.
Indirect tags can be mapped to any other tag providing they are the same type.
Advantages of Indirect Tag Addressing
Saves on window development
Scalable
Supports alarm and history trends
Supports .fields (attributes of a tag)
Supports Remote Tagname Referencing
Works With Dynamic Reference Addressing
Disadvantages of Indirect Tag Addressing
Increases tag count
Requires planning (e.g., tagnames, scripting)
Special steps must be taken to be sure that tags assigned to the indirect tags are not deleted
Note: If the Indirect assignment does not exist or the tag has not been created, the last assignment is retained.
Creating and Using Indirect Tags
Open the Scratch window in WindowMaker.
Insert two sliders, a button and a text display object as shown.
Create two new tags called Tag_A and Tag_B, with a Min Value of 0 and a Max Value of 100. Each is a Memory Integer-type.
Attach Tag_A to a slider as shown.
Attach Tag_B to the second slider.
Change each slider Label to reflect the tagnames.
Configure the Button Object
Attach the following Touch Pushbutton Action – On Key Down script to the button.
Click Validate.
You will be prompted to define the Indirect_Toggle tag reference.
Click OK.
Define the Indirect_Toggle tag as Memory Discrete.
Click Close.
You are prompted to define Indirect.
Click OK.
Define Indirect as an Indirect Analog type.
Click Save, then Close.
Click OK to exit the script editor.
Click OK to exit the Animation Links Selection dialog box.
Change the button text to read Indirect_Toggle.
Configure the Text Object
Double-click the text object.
Assign a User Input – Analog link.
Enter the values shown in the following figure.
Click OK to exit Animation Links.
Switch to Runtime.
Move the Tag_A slider up.
Move the Tag_B slider to a different location.
Click the Indirect_Toggle button.
The value changes to reflect the opposite slider setting. Moving the slider changes the value display for the toggled slider.