By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
Inst ToolsInst ToolsInst Tools
  • Courses
  • PLC Tutorials
  • Control Systems
Search
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Reading: PLC Tag Naming Conventions
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • PLC Tutorials
  • Control Systems
Search
  • Ask
  • Courses
  • Videos
  • Q & A
    • Interview
    • MCQ
  • EE
    • Electronics
    • Electrical
  • Measure
    • Control Valves
    • Calibration
    • Temperature
    • Pressure
    • Flow
    • Level
    • Analyzers
    • Switches
    • Vibration
    • Solenoid Valve
  • Control
    • PLC Tutorials
    • Control Systems
    • Safety Instrumented System (SIS)
    • Communication
    • Fire & Gas System
  • More
    • Design
    • Tools
    • Animation
    • Basics
    • Formulas
    • Standards
    • TextBooks
    • Common
    • Software
    • Excel Tools
    • Erection & Commissioning
    • Process Fundamentals
    • Videos
    • Books
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 !
Tools Required for PLC Programmer to Carry at Site
How to implement SR Flip Flop using PLC Ladder Logic
PLC Ladder Logic Questions and Answers
Procedure for Siemens S7-300 Download from PC to PLC
3 Phase Motor Control using PLC Ladder Logic
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
208kSubscribersSubscribe
38kFollowersFollow

Categories

Recent Comments

  • MIHARITSOA Aina Sitraka on Top Non-PLC Certification Courses for Automation Professionals
  • Vaishnavi on Free Instrumentation Course for Trainee Engineers
  • anuj kapoor on DCS Program to Maintain Draft in Furnace
  • anuj kapoor on IoT based Smart Boiler Control System with Cloud PLC and SCADA

Related Articles

What is Ladder Diagram Programming ?

Comparator used in Siemens S7-1200 PLC.

Siemens PLC Comparator Logic

PLC Program for Water Level Control

PLC Program for Water Level Control Logic

User Defined Data Types - UDT

User Defined Data Types (UDT) – Purpose, Need, Tutorial

Allen Bradley PLC communication is established

Procedure for Connecting Allen Bradley PLC and PC – RS Logix 500

PLC Memory Mapping

PLC Memory Mapping and I/O addressing

What is a Wet Contact in PLC

What is a Wet Contact? – Basics of PLC Wiring

Siemens Process Mode

Test and Process Modes in Siemens PLC

More Articles

testing-thermocouples-and-rtds

Testing thermocouples and RTDs using Multi-function Calibrators

Ziegler-Nichols Open Loop Tuning Procedure

Ziegler-Nichols Open Loop Tuning Procedure

Top Automation Vendors

Top Automation Vendors from Around the World – An Overview

Electrical Machines Questions and Answers

Voltage Regulation of Transformer

What is Instrumentation and Control

What is Instrumentation and Control ?

Electric Circuits Objective Questions

Electric Circuits Objective Questions – Set 3

Analyzers Questions and Answers

Pulse Height Analyzer Questions & Answers

Ultrasonic Transmitters vs. Guided Wave Radar Transmitters

Ultrasonic Transmitters vs Guided Wave Radar for Level Measurement

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?