Schneider PLC Comparison Instructions – Equal, Greater, Less, Greater/Equal, Less/Equal

Published on Aug 29, 2025 | Category: Comparison

Share this Page:

Comparison instructions in Schneider PLC EcoStruxure Control Expert are used to evaluate two values and make logical decisions in automation programs. These operators determine whether one value is equal to, greater than, or less than another—letting you control outputs, trigger actions, or branch logic based on real-time process data. They’re fundamental for level checks, speed monitoring, counter validation, and alarm handling.

The most common instructions are Equal (EQ), Greater Than (GT), Less Than (LT), Greater or Equal (GE), and Less or Equal (LE). Each compares two numbers or variables: EQ checks if values match; GT verifies if one exceeds another; LT confirms a smaller value; GE and LE include equality for inclusive limits. You can use these across both Ladder (LD) and Structured Text (ST).

In practice, comparison operators drive decisions across process control—from verifying tank levels against a setpoint to validating whether a counter reached its preset. Correct use improves program accuracy and flexibility. EcoStruxure makes configuration and simulation straightforward, so both beginners and experienced programmers can test and refine comparison logic quickly.

What is a Comparison Instruction in Schneider PLC?

Comparison instructions in Schneider PLC EcoStruxure Control Expert are used to compare two or more values of the same data type and generate a logical result. These instructions can handle a maximum of 32 inputs of the same data type, and the output is determined by the comparison operation (e.g., equal, greater, less).

Each comparison instruction provides a Boolean result (TRUE or FALSE) based on the evaluation. You can also manage the EN/ENO (Enable/Enable Output) option. If you don’t want to use it, simply double-click the instruction, go to its properties, and uncheck the EN/ENO option.

Types of Comparison Instructions

Classification of Comparison Instructions by Data Type

In Schneider PLCs, comparison instructions are categorized based on the data type of their inputs, and it is important that all inputs are of the same type to ensure correct operation. For example, there are instructions for integers, double integers, real numbers, and time values, with each instruction designed specifically for its data type. Using the correct type is crucial because mixing different types can lead to errors or unexpected results. For instance, if you choose a comparison instruction for integers, both inputs must be integers; you cannot use one integer and one real number. Proper selection of data types ensures that the PLC program functions reliably and avoids runtime issues.

img/ecostruxure-comparison/ecostruxure-plc-classification-of-comparison-instruction.webp

EQ (Equal) Comparison Instruction in Schneider PLC EcoStruxure Control Expert

The EQ (Equal) instruction in Schneider PLC is used to check whether two input values are exactly the same. It compares the values and outputs TRUE if they are equal, and FALSE if they are not. The EQ instruction is essential in PLC programming for decision-making, allowing actions to occur only when specific conditions match. It is commonly used in control logic, such as starting a process when two signals are identical or verifying sensor readings.

img/ecostruxure-comparison/ecostruxure-plc-eq-comparison-instruction.webp

Example: If variable A = 10 and variable B = 10, using the EQ instruction to compare them will produce a TRUE output because the values are equal. If A = 10 and B = 15, the output will be FALSE. This simple comparison is often used in PLC programs to ensure certain conditions are met before executing actions.

GT (Greater Than) Comparison Instruction in Schneider PLC EcoStruxure Control Expert

The GT (Greater Than) instruction is used to compare two values and outputs TRUE if the first value is greater than the second, otherwise it outputs FALSE. This instruction is commonly used in PLC programs to monitor conditions where a value must exceed a certain threshold, such as checking sensor readings or triggering alarms.

img/ecostruxure-comparison/ecostruxure-plc-gt-comparison-instruction.webp

Example: If variable A = 15 and variable B = 10, using the GT instruction will produce a TRUE output because 15 is greater than 10. If A = 5 and B = 10, the output will be FALSE because 5 is not greater than 10.

GE (Greater or Equal) Comparison Instruction in Schneider PLC EcoStruxure Control Expert

The GE (Greater or Equal) instruction compares two values and outputs TRUE if the first value is greater than or equal to the second, and FALSE if it is less. This is useful in PLC programming for situations where a process must continue if a value meets or exceeds a threshold.

img/ecostruxure-comparison/ecostruxure-plc-ge-comparison-instruction.webp

Example: If A = 10 and B = 10, the GE instruction will produce a TRUE output because the values are equal. If A = 15 and B = 10, the output will also be TRUE because 15 is greater than 10. If A = 5 and B = 10, the output will be FALSE.

LT (Less Than) Comparison Instruction in Schneider PLC EcoStruxure Control Expert

The LT (Less Than) instruction compares two values and outputs TRUE if the first value is less than the second, otherwise it outputs FALSE. It is commonly used to monitor values that should remain below a certain limit, such as low-level alarms or pressure limits.

img/ecostruxure-comparison/ecostruxure-plc-lt-comparison-instruction.webp

Example: If variable Temperature = 45°C and MaxLimit = 50°C, using the LT instruction will produce a TRUE output because 45 is less than 50. If Temperature = 55°C and MaxLimit = 50°C, the output will be FALSE.

LE (Less or Equal) Comparison Instruction in Schneider PLC EcoStruxure Control Expert

The LE (Less or Equal) instruction compares two values and outputs TRUE if the first value is less than or equal to the second, otherwise it outputs FALSE. It is useful for minimum limit checks or ensuring that process variables do not exceed defined thresholds.

img/ecostruxure-comparison/ecostruxure-plc-le-comparison-instruction.webp

Example: If variable Level = 30 liters and MaxLevel = 30 liters, the LE instruction will produce a TRUE output because the values are equal. If Level = 25 liters and MaxLevel = 30 liters, the output will also be TRUE. If Level = 35 liters and MaxLevel = 30 liters, the output will be FALSE.

NE (Not Equal) Comparison Instruction in Schneider PLC EcoStruxure Control Expert

The NE (Not Equal) instruction compares two values and outputs TRUE if the values are different, otherwise it outputs FALSE. It is commonly used to detect mismatches, trigger fault conditions, or ensure that two process variables are not identical.

img/ecostruxure-comparison/ecostruxure-plc-ne-comparison-instruction.webp

Example: If variable Pressure = 100 psi and SetPoint = 120 psi, the NE instruction will produce a TRUE output because the values are not equal. If Pressure = 120 psi and SetPoint = 120 psi, the output will be FALSE.

Applications of Comparison Instructions in Schneider PLC

  • Checking tank levels against setpoints (e.g., high/low level alarms)
  • Monitoring temperature or pressure values to trigger safety actions
  • Comparing sensor readings for process validation or control
  • Validating counters and triggering outputs when preset values are reached
  • Activating alarms or indicators based on specific conditions
  • Controlling pumps, motors, or actuators when thresholds are exceeded
  • Automating decision-making in production and process control