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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.