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

UPS Working Principle and Types – Offline and Online UPS Systems
PLC Timer Instructions
What is Trace Function in Tia Portal?
PLC System Documentation
CX-Programmer Tutorial: 1 Button To Activate 4 Different Machines
What is Alarm Prioritization? – Types of Alarms
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

How to Interchange ON Delay Timer and OFF Delay Timer in a PLC
PID in Siemens TIA Portal
How to Wire a Field instrument to Control Room with Example
Classroom Bell System – PLC Programming Practice Examples
PLC Packing Machine Control System Program in XG5000
Main differences between Sinking and Sourcing Circuits
Create Logic with InTouch Scada using Scripting
PLC Techniques for I/O Mapping

Keep Learning

Motor Clock Wise Operation using PLC

CW and CCW Operation of Motor from Same Push button

Yokogawa DCS

Yokogawa DCS and SIS System Architecture

How to Create Faceplate in FactoryTalk View Studio

How to Create Faceplate in FactoryTalk View Studio?

PLC Program for Automatic Door Control System

PLC Automatic Door Control System – Programming Example

LCS Configuration equipped with LOTO Facility

Motor Control Signal Interface

Does Really a Safety Barrier is Important

Does Really a Safety Barrier is Important? – PLC DCS Systems

D flip flop in PLC

D Flip Flop PLC Ladder Logic

Speed Control of Pneumatic Cylinder (Explanation with PLC)

Speed Control of Pneumatic Cylinder (Explanation with PLC)

Learn More

Electrical Equipment Selection in Hazardous Area

Hazardous Areas in Industry – Electrical Equipment Selection

Calculate Temperature of Three Wire RTD

Determine the Temperature of 3 Wire RTD

Understanding Braking Theory in VFD

Understanding Braking Theory in VFD

Electricity Magnetism

Light ON OFF Control using PLC

Light ON OFF Control using PLC

Temperature Switch Calibration

How to Calibrate Temperature Switch? – Instrument Basics

Cavitation Test Setup

Cavitation Test Setup

Two Hand Control Logic

Two Hand Control Logic using PLC

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?