Using the TOP Server Tag Wizard with Controllogix S Tags

Total Page:16

File Type:pdf, Size:1020Kb

Using the TOP Server Tag Wizard with Controllogix S Tags

Using the TOP Server InTouch Tag Wizard with ControlLogix’s Tags By Colin Winchester & John Weber, Software Toolbox Inc

This paper is intended to provide the reader with an overview of the special considerations to keep in mind when dealing with the tagnames that are used in AB ControlLogix PLCs as it relates to the use of the TOP Server InTouch Tag Wizard with Wonderware InTouch. The target audience is a Wonderware InTouch user who is using the TOP Server AB Suite to connect via Ethernet to an Allen-Bradley ControlLogix PLC and may or may not have prior experience with ControlLogix tags.

Introduction to ControlLogix Tag Addressing

We must start with an overview of what tags look like when you program an Allen-Bradley ControlLogix PLC. Unlike traditional AB PLCs where everything is addressed using addresses such as N7:0, B3:0/0, etc., the ControlLogix uses what are known as “Native Tags”. Basically, you assign each variable and I/O point in your PLC a real-world tagname. This is different from assigning symbol names to addresses such as N7:0 in older AB PLCs in that in the older PLCs, the native address was always of the N7:0 style – in the ControlLogix, the tagname is the native address of the point in the PLC. This feature of the PLC is very helpful in making programs more readable and more closely related to real world processes. However, this scheme can present some challenges with regards to communications and integration with external systems.

Lets start with what some ControlLogix tagnames look like. A simple tag might look like the following: JI4210_AA

The tags data type could be one of many types – Boolean, integer, long integer, floats, and many others. The tag can also have a description like “SCONOx Reactor Module A, Shelf A, Flue Gas Inlet Damper, Control”. The tagname, JI4210_AA, is used when actually programming in your ladder or other PLC program. From the outside world, the way you address and access this tag would depend upon where you have the tag setup in the PLC, which brings us to Local and Program tags.

Global/Controller vs. Program/Local

In the ControlLogix PLC, you can have multiple programs stored in the PLC memory – similar to how you could in the PLC 5 family. When you define a tag in the ControlLogix, you can define the tag to only be seen and accessible by a specific PLC program (Program/Local tags) or throughout the PLC (Global/Controller tags). From the outside world looking in, if an external application wants to read a tag, it will need to know how to get to the tag. Lets take our tag above JI4210_AA.

From the outside world, if the tag is a Global/Controller Tag, you would address the tag simply as JI4210_AA.

Lets imagine though that the tag JI4210_AA is actually defined to be used only in a specific program called “Prgm_SystemStatusProgram”. From the outside world, the tag is accessed by asking for “Program: Prgm_SystemStatusProgram.JI4210_AA” which tells the PLC you want the tag JI4210_AA that is found specifically in the program Prgm_SystemStatusPRogram.

Copyright Software Toolbox Inc. 2001-2002, All rights reserved worldwide Why do we need to be so specific? Because the tag JI4210_AA can exist more than one time in your ControlLogix PLC if it is defined inside of either a specific program or in a structure (more on structures in a moment). Put another way, there can be two or more tag addresses with the same name like PID_1 for instance. The full path to the tag in the PLC is used to distinguish one PID_1 tag from another. An external application asking for data from the PLC tells needs to tell the PLC exactly where it wants the tag to come from. This is done by passing the full path to the PLC in its request for the tag.

At the Global/Controller level, each tagname must be unique though – thus the reason we don’t need to be so specific when asking for Global/Controller level tags, usually – which brings us to structures.

Structures

What is a structure? A structure is a collection of related data points that may or may not have the same data type. A structure is not an array. An array tag has to have elements of all the same data types, where a structure does not. In the ControlLogix PLC you have built in structures for Timers, Counters, PID loops, Motion control elements, and more. You can also create your own User Defined Structures in the ControlLogix.

Here is an example of a Timer structure in the ControlLogix that shows the various elements of the timer structure:

If you are an experienced AB PLC programmer, you recognize these sub-element names such as DN for the “timer done bit”, ACC for the timer accumulate, and so on. However, since any program can have any number of timers, you can’t just refer to a timer accumulate using the tagname “ACC” – you must specify the full tagname Minor_Fault_Check_Timer.ACC. Now imagine that you have a large number of Timers called Minor_Fault_Check_Timer in a variety of programs in your PLC – then you’ll also need to specify the program name too when asking for the tag from the outside world. For example, to get to the ACC tag in TimerAllClearHorn in the program Prgm_SystemStatusProgram, you’ll have to ask for:

Program:Prgm_SystemStatusProgram.Minor_Fault_Check_Timer.ACC

Copyright Software Toolbox Inc. 2001-2002, All rights reserved worldwide Otherwise, the ControlLogix PLC will not know which value to return.

The user-defined structure complicates matters further while adding more flexibility and power. You can create a user-defined structure that contains structures. For example, you could create a structure that controls a certain part of a machine that contains a timer structure, an alarm structure, and PID loop structure. And then you could have multiple copies of that structure with different names throughout a program. Very powerful for organizing your PLC program, but you will have to specify the structure name when asking for an element in a structure that is inside of a structure. For example, in the tag we’ve been working with, lets assume our Timer structure TimerAllClearHorn is inside of a User Defined Structure called MotorControl. To get to the ACC bit then you’d use the following syntax:

In a Global/Controller use of the structure:

MotorControl.Minor_Fault_Check_Timer.ACC

In a local/program use of the structure, you specify the program name too and the request becomes:

Program:Prgm_SystemStatusProgram.MotorControl.Minor_Fault_Check_Timer.ACC

The key thing to remember is that when an external application is asking the ControlLogix for a piece of information, the calling application MUST provide the ControlLogix with enough information to UNIQUELY identify the tag requested. If the ControlLogix cannot uniquely identify the tag you are asking for, then it can’t respond. The PLC does not search the whole memory of the tag, but only the under the path it receives in the request.

Key1 This concept is similar to the formatting of a Windows registry keys if you’ve ever looked at the Windows  Subkey1 registry. o Value1 As shown here, in the Windows registry each key, subkey  Subkey2 and value must have unique names at the same level, but o Value1 subkeys and values under different keys or subkeys can Key2 have the same name.  Subkey1 o Value1  Subkey2 Value1

Copyright Software Toolbox Inc. 2001-2002, All rights reserved worldwide How the TOP server deals with ControlLogix tags on import

When the TOP Server imports an RS Logix 5000 L5K file, it brings the full ControlLogix address format into it’s tag database making the first level of communication from the TOP server to the PLC reasonably straightforward. You can run an L5K import, start the OPC Quick Client with the TOP server, and browse the Global/Controller tags, contents of a structure, contents of local/program tags, structures within the program, all from a very logical set of folders that the TOP Server automatically sets up – as shown below

TOP Server OPC Quick Client Tag Insert Browser

The difficulty begins when trying to use these same long ControlLogix tagnames in a Wonderware project. The most intuitive thing would be to have the same full path as the Wonderware Tagname, that way when you look at the tagname in Wonderware, you know exactly where it came from in the PLC. The challenge though is that InTouch limits its’

Screenshot showing the full path to some ControlLogix tags

tagnames to 32 characters. In most situations this is not a big issue, and it rarely was before the ControlLogix. In a ControlLogix project this can become an issue quickly, particularly if there are program/local tags, or structures inside of structures to deal with. If two or more tags have the same name in the PLC and are differentiated by their location inside of a specific structure or

Copyright Software Toolbox Inc. 2001-2002, All rights reserved worldwide program, how do they get identified as different tags in Wonderware? The full path to the ControlLogix tagname is generally too long to use because of the 32 character limit.

The TOP Server InTouch Tag Wizard deals with this issue through its’ use of the Access Name in Wonderware. The Tag Wizard creates multiple access names, which allows us to use the Topic Name field in the InTouch Access name to contain part of the unique “path” to the ControlLogix tagname. A unique Access Name is given for each Topic Name (Alias Name) in the TOP Server. Each tag then gets named using the Access Name + underscore + PLC tagname. The Wizard generates a default Access Name of TSxxx, where xxx is equal to the number of Access Names created. This leaves at least 26 characters for the actual tagname in the PLC. Tagnames will get truncated if they require more then the 32 character limit with the Access Name and underscore plus incrementing number starting at 1 added. To prevent PLC tagnames from being truncated the actual tagname at the lowest level in the PLC needs to be 26 characters or shorter.

The Tag Wizard’s current default method addresses the basic problem of insuring unique tagnames in Wonderware, but it doesn’t always provide meaningful tagnames. The names TS1_PID1, TS2_PID1, TS3_PID1 don’t provide enough information in many cases to allow someone to know which PID1 tag they want to use in a given situation when creating Wonderware configurations. The most effective way to currently provide more meaningful tags is to create the Access Names in InTouch manually before running the TOP Server Tag Wizard.

When manually creating the Access Names for use with the Tag Wizard, it is important to use the default Alias map names that the TOP server creates when it imports the RS Logix 5000 L5K file. If more then one Alias Name is needed for the same path, these can be added, but the default Alias Name values will be added to the

Access Names in Wonderware if they are not already being used by Access Names created prior to running the Wizard. See the chart below to understand how the Alias Names and Access Names are related.

Copyright Software Toolbox Inc. 2001-2002, All rights reserved worldwide Wonderware Value to Enter in WW TOP Server Access Name: User defined, short meaningful name Node: Name of the PC the TOP Server is on Application Name Servermain (this is the TOP server executable name) Topic Alias Name in TOP Server Default Alias name in Alias Map – under Edit Menu DDE or SuiteLink SuiteLink recommended Enable in Tools |Options menu FastDDE/SuiteLink tab Advise Always or Only Only Active Active

The length of the Access Name still remains critical as the longer the Access Name is in InTouch, the fewer characters you have for the InTouch tagname. Once all the Access Names are created for the Alias Names in the TOP Server the Tag Wizard can be run in Wonderware, but it is best to do some verification first. The tagnames created will still follow the format given above, but the TSxxx will be replaced with the Access Name that you created manually. The length of the Access name plus one for the underscore should be subtracted from 32 to determine the number of characters left for the PLC tagname. If the space you find left for the root tagname is less then the PLC tagname, either the tagname will need to be shortened or the Access Name will need to be shortened to prevent truncated InTouch tagnames being generated.

Example of the resulting WW tags after running the TOP Import Wizard the 2nd time:

Copyright Software Toolbox Inc. 2001-2002, All rights reserved worldwide A second option is to run the Wizard and manually change the Access Names, delete all the unused tags in Wonderware, then run the Wizard a second time. This will then provide you with meaningful Access Names without having to be concerned with entering the Topics manually. This can also be done using Wonderware’s DB dump utility to manually create the Access Names.  First simply run the TOP Server Tag Wizard, letting it create the Access Names and tagnames with TSxxx.  Once it is done running use the Wonderware Special | Delete Unused tags option and delete the tags from the Tag Dictionary.  Now close the project and do a DB dump to a csv file and open it in Excel or other editor.  Edit the TSxxx names to meaningful Access Names all in the csv file, save the changes and close the editor.  Open the Wonderware project next and delete all the TSxxx Access Names from the project. This has to be done one at a time, but repeatedly hitting the Enter key after the first delete helps speed the process.  Close the project after these Access Names are deleted and do a DB Load of the modified csv file. It is important that the TSxxx Access names are all deleted otherwise the Load will fail to work.  Open the project once more and run the Tag Wizard again and you will have meaningful tagnames in the Tag Dictionary. Keep in mind the character limit issues above still apply.

Copyright Software Toolbox Inc. 2001-2002, All rights reserved worldwide

Recommended publications