Skip to main content

Comparator in PLC Programming

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

Ccomparator in PLC


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 Comparator Programming
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).
-END-


Comments

Popular posts from this blog

What is a Torbar? – Averaging Pitot Tubes

 The Torbar is employed for flow measurement of liquids, gases, or steam in circular, square, or rectangular section ducts for large flow rates. The Torbar is an insertion type multi-port self-averaging primary sensor for flow measurement. Torbar TORBAR is a set of Pitot tubes mounted on a bar across the pipeline with no moving parts. An averaging Pitot tube is a technology, while TORBAR is a manufacturing brand name. There are several brands available in the market with VERABAR, ANNUBAR, etc. Averaging Pitot Tube Principle Purpose Averaging Pitot tube can be employed when the average velocity of the flow profile, rather than the velocity in a specific point in the cross-section is desired. Averaging Pitot Tubes Principle It measures the differential pressure between the static pressure tap and the tap of full pressure of a stream. Thus such magnitude of differential pressure is directly proportional to the square of the flow rate. Working The TORBAR is designed in such a way that ...

Ferrules and Cross Ferruling

 Ferrules are identification labels provided for every wire terminations in an instrument, equipment, or electrical/instrumentation control panels. These tube-shaped sleeves can be inserted easily on each individual wire in a multi-core cable. In earlier days fixed digits/letters are used as ferrules, but now Instrumentation engineers/technicians prints out desired ferrules by using a ferrule printing machine. Typical Ferrule The numbers/ letters on the ferrules will be given as per the approved electrical hook up or loop diagrams. This helps technicians to easily identify a particular loop/wiring from a series of terminal blocks and to troubleshoot the desired terminal connection. Separate numbers on the ferrules distinguish the positive and negative polarities of wires, thus ensure the polarity protection of the instrument. Cross Ferruling  As a wire is connected on its both ends, it is quite useful to use a cross reference method for wire identification. Unlike normal ferru...

The Method and Process of Siemens PLC Hardware Configuration

 The hardware configuration of Siemens PLC can usually adopt the following methods and processes: Determine control tasks and system requirements: Before hardware configuration, it is necessary to clarify the tasks and requirements of the control system, including the requirements for input and output points, control accuracy, speed, and safety. Select the PLC model and module: According to the control task and requirements, select the appropriate PLC model and module, including CPU, I/O module, communication module, power supply module, etc. Assemble the cabinet and install the modules: According to the selected PLC model and module, assemble the cabinet and install the modules, pay attention to the installation sequence, cable wiring, wiring method, etc. Connect the input and output devices: connect the input and output devices with the input and output modules of the PLC, you need to pay attention to the correctness, stability and safety of the wiring. Perform software configura...