Xorn, L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 1052

Advertising
background image

L-force | PLC Designer

Programming Reference

1050

DMS 4.1 EN 03/2011 TD29

XOR
IEC Bitstring Operator: Bitwise XOR operation of bit operands. If only one of the input
bits is 1, then the resulting bit will be 1; if both or none are 1, the resulting bit will be 0.
Allowed types: BOOL, BYTE, WORD, DWORD, LWORD.

Note: Notice the behaviour of the XOR function in extended form, that means if
there are more than 2 inputs. The inputs will be checked in pairs and the particular
results will then be compared again in pairs (this complies with the standard, but
may not be expected by the user).

Example in IL: (Result is 2#0001_1001)

Var1 :BYTE;

Example in ST:

Var1 := 2#1001_0011 XOR 2#1000_1010

Example in FBD:

XORN
This IEC Bitstring Operator is not prescribed by the standard IEC 61131-3.
not yet implemented

NOT
IEC Bitstring Operator: Bitwise NOT operation of a bit operand. The resulting bit will be
1, if the corresponding input bit is 0 and vice versa.
Allowed types: BOOL, BYTE, WORD, DWORD, LWORD.
Example in IL: ( Result in Var1 is 2#0110_1100 )

Var1 :BYTE;

Example in ST:

Var1 := NOT 2#1001_0011

Advertising