Inst ToolsInst ToolsInst Tools
  • Courses
  • Videos
  • Q & A
    • Interview
      • Instrumentation
      • Electronics
      • Electrical
      • Practical Questions
    • MCQ
      • Instrumentation MCQ
      • Electrical MCQ
      • Electronics MCQ
      • Control Systems MCQ
      • Analog Electronics MCQ
      • Digital Electronics MCQ
      • Power Electronics MCQ
      • Microprocessor MCQ
      • Multiple Choice Questions
  • EE
    • Electronics
      • Electronics Q & A
      • Electronic Basics
      • Electronic Devices & Circuits
      • Electronics Animation
      • Digital Electronics
    • Electrical
      • Electrical Basics
      • Electrical Q & A
      • Power Electronics
      • Electrical Machines
      • Electrical Animation
      • Power Systems
      • Switchgear & Protection
      • Transmission & Distribution
  • 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
Search
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Reading: Comparator in PLC Programming
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • PLC Tutorials
  • Control Systems
Search
  • 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 > Comparator in PLC Programming

Comparator in PLC Programming

Last updated: March 4, 2021 3:29 pm
Editorial Staff
PLC Tutorials
No Comments
Share
5 Min Read
SHARE

To study the working of comparator blocks (EQU, NEQ, LES, GRT, LEQ and GEQ) using simple example in Allen Bradley programmable logic controllers (PLC).

Contents
Ccomparator in PLCDescription of Comparator Blocks :Program LogicPLC Input Output ListPLC Comparator ProgrammingLogic Description:Conclusion

Ccomparator in PLC

Ccomparator in PLC Programming

There are two parameter in each block,

Source A & Source B –where values are stored.

Description of Comparator Blocks :

EQU :

Ā Equal block is used to compare the two values stored in Source A and source B and gives output as ā€œ1ā€ if both are equal and ā€œ0ā€ if both are not equal.

LES :

Lesser than block is used to compare the two values stored in Source A and source B and gives output as ā€œ1ā€ ifĀ  Source A value is Lesser than Source B value and ā€œ0ā€ if Source A value is greaterĀ  thanĀ  or equal to Source B value.

LEQ :

Lesser than or equal toĀ Ā  block is used to compare the two values stored in Source A and source B and gives output as ā€œ1ā€ if Source A value is lesser than or equal value to Source B value and ā€œ0ā€ if Source A value is greater Source B value.

NEQ :

Not equalĀ  block is used to compare the two values stored in Source A and source B and gives output as ā€œ1ā€ ifĀ  Source A value is not same asĀ  Source B value and ā€œ0ā€ if Source A value is same as Source B value.

GRT :

Greater thanĀ  block is used to compare the two values stored in Source A and source B and gives output as ā€œ1ā€ ifĀ  Source A value is Greater than Source B value and ā€œ0ā€ if Source A value is lesser thanĀ  or equal to Source B value.

GEQ :

Greater than or equal toĀ  block is used to compare the two values stored in Source A and source B and gives output as ā€œ1ā€ if Source A value is Greater than or equal value to Source B value and ā€œ0ā€ if Source A value is Lesser Source B value.

Let us understand the working of comparator block using simple example,

Program Logic

When start switch is pressed,

  1. If water level is below 5, motor should turn ON till water level reach 95.
  2. If water level indicates the value below 5, low level water alarm should ON.
  3. If water level indicates the value above 95, high level water alarm should ON.
  4. If water level is exactly at 95, steamer should turn ON.
  5. System under control indication should always ON when water level is not equal to 100.

PLC Input Output List

PLC input output list for water tank

PLC Comparator Programming

PLC Programming Comparator examples

Logic Description:

RUNG 0000

When Start switch is pressed,N7:0 is the water level value which is compared with 5 and 95 using GEQ and LEQ block to turn ON Motor.(i.e-Motor should turn ON if water level is between 5 and 95)

RUNG 0001

Low level alarm is triggered, when water level goes below 5.Less than block is used to perform this function.

RUNG 0002

High level alarm is triggered, when water level goes above 95.Greater than (GRT) block is used to perform this function.

RUNG 0003

Steamer output is turned ON when water level reached exactly at 95.

RUNG 0004

System under control output always in ON condition when water level is not at 100.

Conclusion

We can use this example program to understand the working comparator block function in Allen Bradley programmable logic controllers (PLC).

Author :Ā Hema Sundaresan

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

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

Read Next:

PLC Questions and Answers

Allen Bradley Interview Questions

Basics of PLC Programming

Distributed Control Systems

PLC Math instructions

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

Muting Functions of Safety Control Circuits – PLC Example
#2 PLC Best Practices – Track Operating Modes
How to Convert Current to Voltage using Resistor ?
Tutorial: Siemens Communication between PLCs using I-Device
D Flip Flop PLC Ladder Logic
Tia Portal – OB121 Programming Errors Interrupt Organization Block
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

Explore More

Intrinsically Safe Barriers Questions and Answers
Structured Text PLC Programming for Two-Tanks Level Application
Best 100 PLC Projects for Final Year Engineering Students
Label the Electrical Circuit Schematic
PLC Program to Separate Different Size Objects
Web-based SCADA HMI Software
SCADA Systems
PLC Program for Automatic Liquid Mixing Application

Keep Learning

0-10 VDC to 0-20 mA Conversion

How to Convert Voltage to Current using Resistor ?

Ladder Logic of Motor Forward and Reverse

PLC Programming Example for Motor Forward and Reverse Control

PLC Load Memory

What is Resources Tab in the Siemens PLC?

PLC Programming for Pumping and Draining System

PLC Programming for Pumping and Draining System

PLC Programming Example with Pushbutton and Motor

PLC Programming Example with Pushbutton and Motor

RSLogix5000 PLC Program Backup procedure

PLC Program for Counting Objects on Conveyor

PLC Program for Counting Moving Objects on Conveyor

How to Blink Lights in Ladder Logic

How to Blink Lights in Ladder Logic?

Learn More

Servo Tank Gauge Level Principle

Servo Tank Gauges Working Principle

Bipolar Junction Transistor Construction

Bipolar Junction Transistor Construction

SCADA RTU TELEMETRY

SCADA & Telemetry Systems

Time Response Analysis

Time Response of Second Order Systems – I

Valve Software

Free Control Valve Software Download

P&ID Legend

What is a Legend? – Piping and Instrumentation Diagram

Instruction List in PLC Programming

What is an Instruction List? – PLC Programming

Foxboro model 13 DP transmitter

Re-calibrate the Foxboro DP Pneumatic Transmitter

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?