<=   LE

Operator - Test if first input is less than or equal to second input.


IN1 : ANY   First input
IN2 : ANY   Second input


Q : BOOL    TRUE if IN1 <= IN2


Both inputs must have the same type. In LD language, the input rung (EN) enables the operation, and the output rung is the result of the comparison. In IL language, the LE instruction performs the comparison between the current result and the operand. The current result and the operand must have the same type.

Comparisons can be used with strings. In that case, the lexical order is used for comparing the input strings. For instance, "ABC" is less than "ZX" ; "ABCD" is greater than "ABC".

ST Language

Q := IN1 <= IN2;

FBD Language

LeFbd.gif (1226 octets)

LD Language

(* The comparison is executed only if EN is TRUE *)
LeLd.gif (1441 octets)

IL Language:

Op1: LD  IN1
     LE  IN2
     ST  Q    (* Q is true if IN1 <= IN2 *)

See also

>   <   >=   =   <>    CMP