PLC tag and address naming conventions
Control programming tutorial: Learn about tag templates, common factory automation tag abbreviations, process control tag abbreviations, and five tag and address naming tips.
Prior to this millennium, programmable logic controller (PLC) addresses were register based. Data was kept in registers with addresses like MW210, B3:6/2, N7:50, or DB5.dbx50.2. They’re not very descriptive, are they?
These addresses could be assigned a “Symbol” or shortcut that would make them easier to program or find, but symbol names were often limited in length. Symbols also were not kept in the PLC; only on the programming computer and in the software.
Descriptions also could be assigned to the addresses, but they also were only present in the software. They provided extra information about the address and its purpose, but were not searchable.
With the advent of tag-based PLC systems, the address became much more descriptive, and the register-based addresses were hidden from view. Tag names have different rules depending on the brand or platform of the PLC. They can be 40 or more characters in length and use alphanumeric characters. Some platforms allow spaces while some require an underscore instead.
PLC tags are downloaded
Tags are actually downloaded into the PLC. They also can be organized alphabetically or numerically in the tag database, making the naming convention important. Since so many characters can be used, tag names can be quite descriptive and contain a lot of information. At the same time, long tag names with too many abbreviations can be hard to read.
Common functions or terms such as AutoMode, AutoCycle, Fault or CycleStop are pretty common in industry and don’t require a lot of extra information. Systems or machines might be divided up into zones or stations and labeled Zone2, Cell15 or Station003, these tags could take a bit more documentation or description.
UDTs (User Defined Data Types) also have made the tags more complex by allowing “dotfields.” An example might be “VFDrive2100.ActualSpeed” or “pOP150.ToSCADA.SEvents.Call.ForSupervisor”. Nesting UDTs allows for tags like the last example.
PLC tag templates
Larger companies and machine builders/system integrators usually create a template for programming that lays out how tags will be named. Many common tags already will be created in a template program, and others will be automatically generated from a spreadsheet. The conventions used will differ from company to company, but the intent is the same: to make the program more readable and easier to troubleshoot.
There are two major divisions of tag naming philosophies. In the manufacturing industries such as automotive and other products, devices are often named by their function and location. They also often include a number referencing a page and line where the device is located in the electrical drawings. An example of this might be “PalletPushCyl_ExtPX_4120”. This example indicates the Assembly (Pallet Pusher Cylinder), the Device and its position (Extended Proximity Switch), and the location in the electrical drawings (Page 41, Line 20).
Factory tagname abbreviations
Devices in manufacturing often are designated by abbreviations as listed below:
- Photoelectric Sensor: PE, PEC, PER
- Proximity Switch/Hall sensor: PX, PRX
- Limit Switch: LS
- Master Control Relay: MCR
- Pushbutton: PB, hPB (HMI)
- Switch: SW
- Solenoid Valve: SV
- Control Relay: CR, K
- Motor Starter: MS.
The second school of thought is from process control industries, such as petroleum or chemical processing. Their technicians depend on their process and instrumentation diagrams (P&IDs). Coding guidelines for these are supported by ISA, but may differ from company to company.
These drawings assign unit numbers to assemblies like tanks or skids and loop numbers to the different control components like instruments and sensors.
Because device names are controlled, tag names in the process industries only include the P&ID number rather than the more descriptive method used in manufacturing. These designations are quite different than those used in manufacturing.
For instance, a flow transmitter might be designated as 20-FT-1982-A, where the area is 20, FT is the type of sensor, 1982 is the loop number, and A means there is at least one other redundant device. Because tags can’t start with a number on many platforms, the order of characters may be changed, or a letter may be attached before the unit number. The tag for the device above might then be FT_20_1982A or d20_FT_1982A. This type of tag may not be as descriptive as those used in manufacturing, but a description might be attached reading “Flow Transmitter A for Loop 1982 in Unit 20.
Process tag abbreviations
Devices might use designations like those listed below:
- Flow Transmitter: FT
- Valve: HV, FV
- Limit Switch: LSL (Low), LSH (High)
- Loop Control: FIC, PIC
- Pushbutton/Switch: HS, HIS
- Photoeye, Proximity Switch: ZS
- Motor Starter: M
- Pressure Transmitter: PT, PIT.
The main consideration when creating tagnames is to remember the technician or maintenance person is the customer. The more the programmer can do to help someone find and understand the code, the better.
Five tag and address naming tips
Naming conventions for device or unit tag names matter to aid understanding and speed troubleshooting. Here are five important things to consider when deciding on tag names templates or rules:
- Make names as descriptive as possible as to the function of the tag. Use standardized terms and abbreviations technicians will understand. Add descriptions if necessary.
- Tags will appear in alphabetical and numeric order, so beginning tags with the same function or area letters/numbers is important for organization.
- Use underscores or capitalization wherever necessary to make the tag more readable.
- If the software platform allows for local tags, assign all tags for a particular assembly or program before copying it to duplicate programs. This can save a lot of time.
- Use a spreadsheet to create tags. This is easier than typing tags manually into a database. Tags can be incremented and duplicated more easily. PLC platforms allow for easy export/import of tags. This also ensures programmers use the same names as electrical and mechanical designers.
Frank Lamb is the founder of Automation Consulting LLC, the creator of Automation Primer and is a member of the Control Engineering Editorial Advisory Board, and Automation Consulting is a content partner. Edited by Mark T. Hoske, content manager, Control Engineering, CFE Media and Technology, email@example.com.
KEYWORDS: PLC tags, address naming convention
Tag name rules can vary by brand of programmable logic controller (PLC)
Factory automation, process control tag name abbreviations
Five tag naming tips will help when deciding.
What tag naming best practices will smooth your programming efforts?