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
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
Notification Show More
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
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

Contactor – Basics, Wiring, Connection with PLC
Peripheral Inputs and Outputs in Siemens PLC
Types of SCADA System Architecture
Finding the Best PLC for Your Project – Tips and Tricks
Instrumentation Engineer Activities & Documents – Detail Design Phase
What is Motor Jogging ?
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
208kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

PLC Project Examples for EcoStruxure Machine Expert
PLC Light Sequence Control using Bit Shift Registers
What is Siemens TDC? – Siemens Control System
Parking Garage Indicator: PLC Automation System
FB Block in Siemens PLC Programming
Timer-Based Sequential PLC Program with One Button
Understanding Braking Theory in VFD
Documentation and Change Control of PLC or DCS Systems

Keep Learning

Function Module in Siemens PLC

What is Function Module in Siemens PLC?

Functional Block Diagram in PLC for Oil and Water Process

Functional Block Diagram in PLC for Oil and Water Process

Relay Symbols

Relay circuits

Workstation Healthiness Checks

Workstation Healthiness Checks

0 to 10 mA Current Loop

What is Live Zero in 4-20 mA Current Loop ?

Types of PLC

#14 PLC Best Practices – Restrict Third-party Data Interfaces

FIFO and LIFO Sequences in PLC

What are FIFO and LIFO Sequences in PLC?

Principle of Operation of PLC

Principle of Operation of PLC

Learn More

DeadWeight Tester

DeadWeight Tester Questions

What is Hydraulics

What is Hydraulics?

Omron PLC programs

Daily Alarm PLC Program using Real-Time Clock

Magnetic Float Level Sensor Principle

Magnetic Float Level Transmitter Working Principle

Baffle Nozzle Assembly Sensitive Mechanism

Baffle Nozzle Assembly Sensitive Mechanism

How do you select a Pressure sensor

How do You Select a Pressure sensor?

Level Gauge Interface Measurement

Level Gauge Interface & Temperature Problems

Turbine Supervisory Instrumentation

What is Turbine Supervisory Instrumentation (TSI)?

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?