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: Siemens PLC Comparator Logic
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 > Siemens PLC Comparator Logic

Siemens PLC Comparator Logic

Implement Siemens PLC Comparator logic like equal, not equal, greater or equal, less or equal, greater than in S7-1200 PLC using ladder diagram language.

Last updated: November 3, 2023 2:52 pm
Editorial Staff
PLC Tutorials
1 Comment
Share
4 Min Read
SHARE

This article shows the different types of Siemens PLC Comparator Logics and their ladder diagrams.

Contents
Siemens PLC Comparator LogicProblem DiagramProblem SolutionList of Inputs and OutputsLadder diagram for comparators used in S7-1200 PLCProgram DescriptionTest Cases

Siemens PLC Comparator Logic

Problem Description

Implement equal, not equal, greater or equal, less or equal, greater than, check validity, and check invalidity comparators in Siemens S7-1200 PLC using ladder diagram language.

Problem Diagram

Comparator used in Siemens S7-1200 PLC.

Problem Solution

Comparators are used for comparing two values. Say, If we want to compare two physical quantities (temperature, pressure etc.).

We can use the equal instruction to determine, if a first comparison value is equal to a second comparison value or not.

We can use the not equal instruction to determine, if a first comparison value is not equal to a second comparison value or not.

We can use the greater or equal instruction to determine, if a first comparison value is greater than or equal to a second comparison value or not. Both values to be compared must be of the same data type.

We can use the less or equal instruction to determine, if a first comparison value is less than or equal to a second comparison value or not. Both values to be compared must be of the same data type.

We can use the greater than instruction to determine, if a first comparison value is greater than a second comparison value or not. Both values to be compared must be of the same data type.

We can use the less than instruction to determine, if a first comparison value is less than a second comparison value or not. Both values to be compared must be of the same data type.

List of Inputs and Outputs

Output List

  • Result 1 = Q0.0
  • Result 2 = Q0.1
  • Result 3 = Q0.2
  • Result 4 = Q0.3
  • Result 5 = Q0.4
  • Result 6 = Q0.5

Memory

  • MW0 :- Comparator 1
  • MW2 :- Comparator 2
  • MW4 :- Comparator 3
  • MW6 :- Comparator 4
  • MW8 :- Comparator 5
  • MW10 :- Comparator 6

Ladder diagram for comparators used in S7-1200 PLC

Siemens PLC Comparators Logic

Program Description

In this program, we have used Siemens S7-1200 PLC and TIA Portal Software for programming.

Network 1:

If value in MW0 is equal to 2, result 1 (Q0.0) will be ON.

Network 2:

If value in MW2 is not equal to 2, result 1 (Q0.1) will be ON.

Network 3:

If value in MW4 is greater or equal than 2, result 3 will be ON.

Network 4:

If value in MW6 is less or equal than 2, result 4 will be ON

Network 5:

If value in MW8 is greater than 2, result 5 will be ON.

Network 6:

If value in MW10 is less than 2, result 6 will be ON

Test Cases

Siemens Comparators

Author: Bhavesh

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:

  • Separate Different Size Objects using PLC
  • PLC Tank Heating Control using Heater
  • Implement 1 to 8 Demultiplexer using PLC
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

Advanced PLC Programming for Defective Parts Sorting
OFF Delay Timer using PLC
PLC vs PAC – Understanding the Key Differences and Similarities
Instrumentation Engineer Activities & Documents – Detail Design Phase
PLC Sequential Operation Example Program
Count and Pack Objects from Conveyor using PLC Ladder Logic
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
1 Comment
  • Miss mysterious says:
    June 8, 2021 at 12:31 pm

    If we want to control this logic continuously without assistance,what should we do?

    Reply

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

PLC Program for Controlling Sequence of Conveyors with Interlock
The Purpose of Marshalling Cabinet or Marshalling Panel
Basic Pumping System Application Used in Industrial Automation
Workstation Healthiness Checks
Applications of PLC Programming in Bottle Filling Process
Drive Multiple Speeds with Different Reference using PLC
PLC Permissive for Motor Control
Difference between Motion Controller and PLC

Keep Learning

Open Loop and Closed Loop System Questions

Open Loop and Closed Loop System Questions Answers

Delta PLC Simulator

How to Work with Delta PLC Simulator?

Count the Number of Cartons in a Storage Area PLC Logic

Count the Number of Cartons in a Storage Area PLC Logic

What is Fail-safe in Siemens PLC?

What is Fail-safe in Siemens PLC?

PLC Program for Valves

PLC Pump Permissive Interlocks

Causes of PLC Stop Mode

Various Causes for PLC Going in Stop Mode

Offline UPS

UPS Working Principle and Types – Offline and Online UPS Systems

Statement List (STL) to Find Highest Value in the Data Block

Statement List (STL) to Find Highest Value

Learn More

Ultrasonic Flowmeters Principle

Factors Affecting the Performance of Ultrasonic Flow Meters

Electronics and Instrumentation Students Quiz

Electronics and Instrumentation Students Quiz

Instrumentation Project Documents

List of Instrumentation Project Engineering Documents

RSLogix5000 PLC Program Backup procedure

DC Generator

DC Generator

Test and Electrical Measurement Objective Questions and Answers

100 Test and Electrical Measurement Objective Questions and Answers

Bellows-Type Steam Trap

Bellows Steam Trap

Sorting PLC Program Simulation

Sorting & Distribution Line PLC Programming – Advanced Logic

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?