Templete maker or Supertags WONDERWARE INTOUCH :-https://youtu.be/5u-iiBD66do
Tags and Tag Features WONDERWARE INTOUCH :-https://youtu.be/F3lxcKqVkts
Deleting Tags in WONDERWARE INTOUCH :-https://youtu.be/bZEcizOymaA
Creating and Using Indrict Tags Wonderware Intouch :-https://youtu.be/0nfihdEKhBQ
InTouch SuperTags wonderware intouch
This section will define SuperTags using the SuperTag template structure.
SuperTags are a development tool that provides a way to organize and quickly replicate tags.
InTouch provides a template structure enabling definition of composite tagname types known as SuperTags. SuperTag templates can contain up to 64 member tagnames and 2 nesting levels.
A SuperTag parent can contain up to 64 embedded child members and each child member can contain up to 64 sub-member tagnames for a total of 4096 member tagnames. (When one SuperTag template parent is embedded into another it becomes a child member).
All SuperTag template child tags behave exactly like normal tags. They support trending, alarming and all tagname .fields.
For convenience, InTouch provides a TemplateMaker that can be used to create your SuperTags. The TemplateMaker allows you to create, edit and delete SuperTag templates and member tagnames.
InTouch saves all SuperTag templates in the file SUPERTAG.DAT within your InTouch installation directory (not the application directory). This allows the templates to be used in any application.
InTouch also provides the ability to create SuperTags in several alternative ways. For example, SuperTags can be created directly from the Tagname Dictionary, in animation link tagname or expression input boxes, in InTouch QuickScripts, or in an external file that can be loaded into your application using the InTouch DBLoad utility.
When you create a SuperTag parent template, its name is automatically added to the tagname Tag Types dialog box in the Tagname Dictionary and is immediately available for selection when a new tagname is created. WindowMaker does not need to be restarted to define tagnames using a newly created SuperTag type.
SuperTag Syntax
Since InTouch tagnames are limited to 32 characters, each SuperTag ParentInstanceChildMemberSub-member is restricted to a maximum of 32 characters. A SuperTag reference can only be a maximum of two templates (ParentInstanceChildMember) and one member deep as illustrated in the following figure.
Each member in a SuperTag template is accessible in the standard format currently used to access the .fields of normal InTouch tagname types. The SuperTag reference syntax is supported throughout InTouch where normal tagnames can be used. For example, a valid SuperTag reference would be:
ColdRoom4EvapUnit1FanMotor2.MaxEU
Remote tag references also support SuperTags. For example:
PLC1:”TurkeyEvapUnit2PrsRegVlv.EngUnits”
SuperTag Template Structure
To realistically illustrate the SuperTag concept in a factory environment, assume that we have four identical refrigerated storage rooms in which we store beef, pork, chicken and turkey. Each of these cold rooms has a room temperature sensor and two evaporator units. Each evaporator unit has seven data values that we need to monitor or control in Runtime. An InTouch HMI window might look like the following figure:
Without the use of SuperTag templates, we would need to manually define each individual tagname for each data value in each cold room multiplied by the total number of cold rooms. In other words, we would have to organize and define dozens of tagnames in the Tagname Dictionary.
By using SuperTags we can save hours of development time and minimize the chance of making errors. Using the Cold Room scenario described above, we create one SuperTag parent template called EvapUnit. This EvapUnit will later become a child member of the ColdRoom parent template. This is a detail-up design concept.
EvapUnit will be defined with seven sub-member tagnames.
Member Tag Type Description
FanMotor1 Discrete Motor Starter for Fan 1
FanMotor2 Discrete Motor Starter for Fan 2
DefrostVlv Discrete Defrost Gas Valve State
LiquidVlv Discrete Liquid Refrigerant Valve State
CoilTemp Real Temperature of the refrigerant
PrsRegVlv Integer Pressure Regulator Valve (0-100%)
EvapStatus Message Evaporator Unit Status String
SuperTag Parent Template
Click Special / TemplateMaker. The TemplateMaker dialog box appears.
Select New Template.
The New Template dialog box appears:
Enter a unique name for the new template in the Name: field. The name must have a maximum of 10 characters, with alpha character leads. No special characters are supported.
As you add new parent templates, their names immediately open as a tagname type in the Tagname Dictionary (Tag Types dialog box) and are immediately available for selection. You do not need to restart WindowMaker to define new tagnames and assign them to the SuperTag type.
Description: Enter any information to describe the template (Optional).
Click OK.
The TemplateMaker dialog box reappears displaying the new template name in its window:
Notice that once a template is created, the Add Member and Delete buttons become active. The day, date and time the template was created and/or last modified and the template’s description are now displayed when the template name is selected.
Note: The TemplateMaker window displays all currently defined SuperTag parent templates and their child members in a hierarchical list. To expand a template’s view, click the left mouse button beside the template name. All member tags defined for the parent template name will be displayed. To collapse a view, click the left mouse button beside the template name again.
Creating SuperTag Member Tagnames
Select the SuperTag template (in this example, EvapUnit).
Click Add Member.
The New Member Tag dialog box appears.:
Name: Enter a name for the member tag.
Type: Enter or select the type for the tag member. A type can be Discrete, Integer, Real, Message, or another SuperTag template.
Note: The type you specify here is only a placeholder for the SuperTag template. By default, all member tags are set to Memory types when defined in the TemplateMaker.
However, when you define a template instance in the Tagname Dictionary, you will need to specify whether they are Memory- or I/O type tags.
Comment: Enter any information to describe the member tagname.
OK: Repeat this procedure to add additional member tags to the SuperTag template.
The new member tags are added beneath the SuperTag parent template in the TemplateMaker window.
Create another parent template called ColdRoom. ColdRoom will have one member tagname, RoomTemp, and two EvapUnit child member templates, EvapUnit1 and EvapUnit2.
The two child member templates will use the parent, EvapUnit, SuperTag template for their type.
Select InTouch Templates and then click New Template.
The New Template dialog box appears:
Enter a unique name for the new parent template in the Name text field (maximum of 10 characters.)
Enter any information to describe the template in the Description text field.
Click OK.
The TemplateMaker dialog box reappears displaying the new template name in its window.
Click OK.
The parent template is added to the list of InTouch Templates in the TemplateMaker window.
Now, create three members for our ColdRoom parent template, two EvapUnit child members and one member tagname, RoomTemp.
Select the SuperTag parent template (in this case, ColdRoom) and then click Add Member.
The New Member Tag dialog box appears.
Enter a name for the member tagname in the Name text field. Enter the tagname type for the member in the Type text field. Enter any information to describe the member tagname in the Comment text field. Click OK. Next we will create our two child member templates, EvapUnit1 and EvapUnit2. They both use the EvapUnit template type. Select the SuperTag parent template (in this case, ColdRoom) and click Add Member. The New Member Tag dialog box appears.
Enter a name for the member tagname in the Name text field.
Enter the tag type for the member in the Type text field. In this case, we are using the special template type, EvapUnit.
Enter any information to describe the member tagname in the Comment text field.
Click OK.
Repeat the previous steps to add EvapUnit2.
Click OK.
When the ColdRoom parent template is completed, the TemplateMaker window will display the following template structure hierarchy:
Now that we have completed the ColdRoom SuperTag template, we can immediately create tag instances that use the template for their tag type.
Editing SuperTag Templates and Member Tagnames
SuperTag templates or member tagnames can be modified at any time. When an existing SuperTag template or its members are modified, all existing instances of that template are not affected. (Instances are tags defined in the Tagname Dictionary that use a SuperTag for their type.)
In other words, modifications made to a SuperTag are not retroactive. However, all new instances defined using the modified SuperTag will use the new composition.
In the TemplateMaker window, double-click the SuperTag template name (or member name).
The Edit Template (or Edit Member Tag) dialog box appears displaying the SuperTag template’s (or member’s) definition.
Make your edits and click OK.
Deleting a SuperTag Template or Member
In the TemplateMaker window, select the SuperTag template name (or member name) to delete and then click Delete.
A message box appears asking you to confirm the deletion.
Click Yes to delete the selected name.
Note: If you press the ESC key to close the TemplateMaker instead of OK, the template will not be deleted. When a template is deleted, all of its associated member tagnames are also deleted.
If an existing SuperTag template is modified, all existing instances of that SuperTag are not affected.
Examples are tagnames defined in the Tagname Dictionary that use a SuperTag for their type. In other words, modifications that you make to a SuperTag are not retroactive. However, all new instances defined using the modified SuperTag will use the new composition.
Similarly, if a member tagname is added to a SuperTag instance through an alternative method, its template is not updated.
Defining SuperTag Template Instances
An important concept in TemplateMaker is distinguishing a SuperTag template from a template instance. The most important difference is that the parent template name is replaced by the instance tagname. The child template name and the sub-member tags do not change.
For example, think of a literal template used for drafting, such as a stencil. A stencil is used to produce drawings. The drawings themselves, in this metaphor, are template instances that are patterned after the template or stencil used to create them.
In our ColdRoom template scenario, after we have created our template, we can create SuperTag instances of Beef, Pork, Chicken and Turkey. To do so, we will simply create four tagnames that use ColdRoom for their types. Thus, with our one time effort, we will quickly create 60 tagnames in the Tagname Dictionary. This is a huge time saver.
After we have created the ColdRoom SuperTag template and the instances, we can refer to any of its members by using valid SuperTag references in animation link expressions or QuickScripts.
For example:
BeefRoomTemp
ChickenRoomTemp.RawValue
ChickenEvapUnit1FanMotor1.OnMsg
PorkEvapUnit2EvapStatus
TurkeyEvapUnit2PrsRegVlv.EngUnits
Alternative Methods for Creating SuperTags
In addition to the TemplateMaker, InTouch supports the creation of SuperTags through animation link expressions, InTouch QuickScripts, and external .CSV (Comma Separated Variable) files that are uploaded into the Tagname Dictionary through the DBLoad utility. A member or sub-member can be added to an existing SuperTag through the Tagname Dictionary, the easiest method to use.
When a SuperTag is created through an animation expression or InTouch QuickScript you must use the valid SuperTag format. For example:
Using the Tagname Dictionary to Create SuperTags
The Tagname Dictionary is the easiest alternative method to create a SuperTag instance or member tagnames.
Click Special / Tagname Dictionary. The Tagname Dictionary dialog box appears.
Click New.
Enter the exact name of your SuperTag instance followed by the backslash () delimiter and the name of the new member tagname. In this example the name is TurkeyRoomTemp2.
Note: When adding a new member tagname to an existing SuperTag instance, the spelling of the instance name must match exactly. Otherwise, a brand new SuperTag instance and member will be added.
Click Type and select the type for the SuperTag member. (Selection of the remaining options is not required in this context.) In this case, I/O Real.
Click Save or Close to add the member.
To view the member tagname in the Turkey SuperTag without exiting the Tagname Dictionary, select the Members option at the top of the dialog box.
The Members details area appears:
Click Close to close the Tagname Dictionary.
If you click New when a SuperTag is displayed in the Tagname Dictionary, the following dialog box appears:
Click Yes to create another SuperTag instance that is an exact duplicate of the displayed SuperTag instance.
The Enter Name dialog box appears:
Enter a new SuperTag instance name.
Click OK.
Advantages of SuperTags
All SuperTag sub-member tagnames behave exactly like normal tagnames
Supports alarms and history trends
Supports .fields
Development tool
Template file can be copied
Disadvantages of SuperTags
One SUPERTAG.DAT file
No individual SuperTag member deletion
Inability to delete one tag at a time
Slight increase in tag count.
Also Read:-