This article shows the different types of Siemens PLC Comparator Logics and their ladder diagrams.
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.
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.
In this program, we have used Siemens S7-1200 PLC and TIA Portal Software for programming.
If value in MW0 is equal to 2, result 1 (Q0.0) will be ON.
If value in MW2 is not equal to 2, result 1 (Q0.1) will be ON.
If value in MW4 is greater or equal than 2, result 3 will be ON.
If value in MW6 is less or equal than 2, result 4 will be ON
If value in MW8 is greater than 2, result 5 will be ON.
If value in MW10 is less than 2, result 6 will be ON
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:
Learn an example PLC program to control a pump based on level sensors using ladder…
In the PLC timer application for security camera recording, when motion is detected then camera…
In this example, we will learn batch mixing with PLC ladder logic program using timer…
This PLC example on manufacturing line assembly is an intermediate-level PLC program prepared for the…
In this article, you will learn the PLC programming example with pushbutton and motor control…
This article teaches how to convert Boolean logic to PLC programming ladder logic with the…
View Comments
If we want to control this logic continuously without assistance,what should we do?