Indexof, Bitstring operators, Bitstring operators 8 – Lenze PLC Designer PLC Designer (R3-1) User Manual
Page 1050: L-force | plc designer

L-force | PLC Designer
Programming Reference
1048
DMS 4.1 EN 03/2011 TD29
Example in IL: (Result is 10)
arr1:ARRAY[0..4] OF INT;
Var1:INT;
INDEXOF
This arithmetic operator is not prescribed by the standard IEC 61131-3.
Perform this function to find the internal index for a POU.
Example in ST:
var1 := INDEXOF(POU2);
16.3.3
Bitstring Operators
The following bitstring operators are available, matching the IEC1131-3 standard:
AND, OR, XOR, NOT
not yet implemented: The following operators are not prescribed by the standard:
ANDN, ORN, XORN
Bitstring operators compare the corresponding bits of two or several operands.
AND
IEC Bitstring Operator: Bitwise AND of bit operands. If the input bits each are 1, then
the resulting bit will be 1, otherwise 0.
Allowed types: BOOL, BYTE, WORD, DWORD, LWORD.
Example in IL: (Result in Var1 is 2#1000_0010)
Var1:BYTE;
Example in ST:
var1 := 2#1001_0011 AND 2#1000_1010