Inst ToolsInst ToolsInst Tools
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Search
  • Books
  • Software
  • Projects
  • Process
  • Tools
  • Basics
  • Formula
  • Power Plant
  • Root Cause Analysis
  • Electrical Basics
  • Animation
  • Standards
  • 4-20 mA Course
  • Siemens PLC Course
Reading: PLC Tag Naming Conventions
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • Design
  • PLC
  • Interview
  • Control System
Search
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > PLC Tag Naming Conventions

PLC Tag Naming Conventions

Let us understand how the PLC tag naming conventions play a great role in PLC programming and during troubleshooting.

Last updated: February 28, 2024 5:23 pm
Viral Nagda
PLC Tutorials
No Comments
Share
6 Min Read
SHARE

When you design a PLC logic, you have to take care of the names that you provide to tags. It should be easily understood and interpreted by any programmer. It should neither be too long nor too short.

Contents
PLC Naming ConventionsTag Name StylesCamel StylePascal StyleSnake StylePrefix with Data Type StyleTips For Tag Naming in PLC Programming

The naming convention is important because improper tagging can cause troubleshooting issues for programmers. Also, giving lengthy names will consume the memory of PLC. So, every programmer has to follow proper naming conventions before writing a PLC program. In this post, we will see the concept of PLC tag naming conventions.

PLC Naming Conventions

PLC Tag Naming Conventions

First of all, let us understand how tag naming convention plays a great role in PLC programming. You have a motor with its run command and run feedback as PLC IO’s.

The motor is located in the blower room and it is used as an air compressor. The motor tag name in the P&ID is M-101. Now, for a PLC programmer, identifying a tag location is important. So, there are two types of mindsets that normally define a PLC programmer.

The first will try to give as much information as possible in a tag name; so he can name the motor run command as M101_Compressor_Run_Command. The second one will try to give the name as Q_M101_Comp.

The second mindset looks very clear, as he is giving short names and keeping the length as minimal as possible. This is the reason why naming a PLC tag is important, as it relieves the programmer from reading such lengthy tags in situations where urgent troubleshooting has arrived. (It is to be noted that PLC tag naming does not accept any special character apart from underscore (_) ).

A PLC tag name should contain information that can help the programmer relate to the meaning of it. This generally implies the following information –

  • data type (eg. boolean, integer),
  • data flow (eg. input, output),
  • scope (eg. local, global),
  • instrument or device type (eg. motor, valve, sensor),
  • process parameter (eg. pressure, flow, temperature) and
  • location of the device.  

Tag Name Styles

There are various styles according to IEC standards that must be followed for proper naming.

Let us have a look at some of the most generally used:

  • Camel Style,
  • Pascal Style,
  • Snake Style,
  • Prefix with Data Type Style

Camel Style

In this style, there is no underscore in between. A full name is given to the whole word, but each word in it starts with a capital letter. For example, take the above-discussed example.

M101_Compressor_Run_Command will be written as m101CompressorRunCommand. You can identify each word by a capital letter.

The first letter will be a compulsory small letter. This style looks good if the word is small. It prevents the use of underscore and this makes memory consumption smaller.

Pascal Style

It is similar to the camel style; the only difference is that the first letter will be a compulsory capital letter.

For example, our tag will be written as M101CompressorRunCommand.

Snake Style

The example that we discussed before is the snake style. Here, each word will be separated by an underscore.

Prefix with Data Type Style

Here, the tag will be prefixed by the data type of the tag name. In our case, the tag type was boolean. According to IEC standards, a boolean tag is usually given a prefix of ‘x’.

So, our style will be written as xM101CompressorRunCommand. This helps the programmer to identify what type of data is used for that particular tag.

Tips For Tag Naming in PLC Programming

The first and foremost rule is that the length of a tag should be short, but not so short that no one can understand it. As discussed, the length should contain appropriate information in a proper length. Lengthy names should be strictly avoided.

Follow the general tag naming styles that were discussed. These are according to IEC standards and make the logic look neat and clean.

To reduce bugs during tag creation, use Excel files. Excel reduces workload in a very vast way as duplication and copying becomes very easy. Errors are hardly produced in Excel files.

It is not always necessary to use a full name for a word. For example, the valve can be written as vlv and temperature can be written as temp.

Avoid making the tag fully capitals. It looks cumbersome and inappropriate to read.

If you liked this article, then please subscribe to our YouTube Channel for Instrumentation, Electrical, PLC, and SCADA video tutorials.

You can also follow us on Facebook and Twitter to receive daily updates.

Read Next:

  • Pop-up in FactoryTalk View Studio
  • How to use PLC with SQL Database?
  • What is a PLC Retrofitting Project?
  • Transferring Data Across PLC Systems
  • What is Thin Client in SCADA?
Don't Miss Our Updates
Be the first to get exclusive content straight to your email.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
You've successfully subscribed !

Continue Reading

PLC Ladder Logic for Sensor Scaling with Offset
Toggle Switch & Sensor: Conveyor and Puncher PLC Program
PLC Ladder Logic for Lube Oil Pump Motor
#18 PLC Best Practices – Store PLC Hard Stop Events from Faults
Why Use a Current Loop?
PLC Ladder Logic for Opposite Acting Control Valves Application
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

128.3kFollowersLike
69.1kFollowersFollow
210kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

200+ Quiz on Electrical Meters, Measurement, and Troubleshooting
PLC Code to Start & Stop Motor and Pump as per Logic
80+ PLC MCQ Questions
Allen Bradley PLC ControlLogix Hardware
PLC Interview Questions and Answers
VFD Pros and Cons – Variable Frequency Drives
Compare Online and Offline PLC Programs
PLC Compressor Control Ladder Logic

Keep Learning

Instrumentation During the Detail Design Phase

Instrumentation Engineer Activities & Documents – Detail Design Phase

Manual sequential logic in Schneider PLC

Programming Schneider PLC Manual Sequential Machine

If Else Statement in SCL Language

If Else Statement in SCL Language

PLC Program for Traffic Light Sequence using Functional Blocks

PLC Program for Traffic Light Sequence using Functional Blocks

Free Schneider PLC Training - Automation Course

Free Schneider PLC Training – Automation Course

Ladder Diagram Example using Memory Bits and Set Coils

Ladder Diagram Example using Memory Bits and Set Coils

Automatic Coffee Machine

Automatic Coffee Vending Machine – PLC Logic Programming

PLC Program to Separate Different Size Objects

PLC Program to Separate Different Size Objects

Learn More

Industrial Automation Architecture reference model

Industrial Automation System Architecture Reference Model

Trip Valve Shown Tripped

Trip Valve Principle

how-to-avoid-bad-grounds

How to Avoid Bad Grounds ?

Power Electronics Objective Questions

MOSFET Objective Questions

Pneumatic Counter for Counting the Strokes of a Cylinder

Pneumatic Counter for Counting the Strokes of a Cylinder

Relation Control

Relation Control System

Commissioning Checklist for Industrial Automation System

Commissioning Checklists for Industrial Automation Systems

DCS Troubleshooting Control Valve Loop

DCS Troubleshooting Control Valve Loop

Menu

  • About
  • Privacy Policy
  • Copyright

Quick Links

  • Learn PLC
  • Helping Hand
  • Part Time Job

YouTube Subscribe

Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?