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
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

How to import GSD files into the TIA Portal? – Siemens PLC
Siemens TIA Portal Elevator System with Safety Features
Raw Counts to Engineering Units : Conversion Formula
Structured Text PLC Program for Measuring Event Duration
Compare Servo Motor and Stepper Motor
Allen Bradley Studio 5000: Motor Running Hours PLC Program
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

What are AI, AO, DI, and DO? – Definition, Examples, Purpose
Implement UDT in PLC Programming: User-Defined Data Type
Schneider PLC Programming Example for Beginners
Wiring Diagrams of PLC and DCS Systems – DI, DO, AI, AO
Ladder Logic Example with Timers
Up Down Counter Instruction in PLC
Top 5 Advantages of Human-Machine Interface (HMI)
PLC Counter Instructions

Keep Learning

Communication between Intouch Scada and Allen Bradley PLC

Communication between InTouch Scada and Allen Bradley PLC

Emergency Stop Push button

Emergency Stop Switch Spurious Trip

Retro-Reflective Sensor

What is a Retro-Reflective Sensor? – Principle, Applications

how-a-4-20ma-transmitter-works

How a 4-20mA Transmitter Works?

Industrial Networking Interview Questions

Industrial Networking and Wireless Interview Questions

PC-Based Motion Controller

Various Types of Delta PLC used in Industrial Automation

Create PLC Program based on Logic Circuit

Create PLC Program based on Logic Circuit

Brands PLC communication interface and protocol

Communicating Between Siemens PLC and Other PLC Brands

Learn More

Fixed Gas Detectors vs. Portable Gas Detectors

Fixed Gas Detectors vs. Portable Gas Detectors

Siemens PLC Device and Network

Difference Between PLCSIM and PLCSIM Advanced? – Siemens PLC

MCB Nameplate Details

MCB Nameplate Questions and Answers

Microprocessors Objective Questions

Microprocessors Objective Questions – Set 2

Inherent vs Installed Control Valve Flow Characteristics

Inherent vs Installed Control Valve Flow Characteristics

Analog Electronics Objective Questions

Analog Electronics Objective Questions – Set 3

Ceramic Bearings

Everything You Need to Know About Ceramic Bearings

Alarm Management System

What is Alarm Management System ?

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?