<> NE

PLCopen motion icon

Operator - Test if first input is not equal to second input.

Inputs

IN1 : ANY   First input.
IN2 : ANY   Second input.

Outputs

Q : BOOL    TRUE if IN1 is not equal to IN2.

Remarks

Both inputs must have the same data type. In FFLD language, the input rung (EN) enables the operation, and the output rung is the result of the comparison. In ILClosed "Instruction list" This is a low-level language and resembles assembly language, the NE instruction performs the comparison between the current result and the operand. The current result and the operand must have the same data 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".

Equality comparisons cannot be used with TIME variables. The reason is that the timer has the resolution of the target cycle and test can be unsafe as some values can never be reached.

ST Language

Q := IN1 <> IN2;

FBD Language

NeFbd.gif (1232 octets)

FFLD Language

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

IL Language

Op1: FFLD  IN1
     NE  IN2
     ST  Q    (* Q is true if IN1 is not equal to IN2 *)

See Also