HEIDENHAIN TNC 122 Technical Manual User Manual
Page 52

4/97
TNC 122
12 PLC Description
51
OR (O)
Logic execution with the OR command
Operands: M, I, O, T, C
This command functions in different ways depending on its position in the program:
a) At the start of a logic chain the command functions as an L command. That is. the logic state of
the operand is loaded into the Logic Accumulator.
b) Within a logic chain, the contents of the Logic Accumulator and the logic state of the operand
(M, I, O, T, C) are gated with OR. The result of the operation is stored in the Logic Accumulator.
Word execution with the OR command
Operands: B, W, D, K
The contents of the Word Accumulator and the contents of the operand (B, W, D, K) are gated with
OR. In accordance with the different sizes of operand (B = 8 bits; W = 16 bits; D = K = 32 bits),
8, 16 or 32 bits will be influenced in the Accumulator.
Thus: Bit 0 of the Accumulator is gated with bit 0 of the operand
Bit 1 of the Accumulator is gated with bit 1 of the operand, and so on.
The result of the operation is stored in the Word Accumulator.
OR NOT (ON)
Logic execution with the OR NOT command
Operands: M, I, O, T, C
This command functions in different ways depending on its position in the program:
a) At the start of a logic chain this command functions as an LN command. That is, the
complement of the operand is loaded into the Logic Accumulator.
b) Within a logic chain, the contents of the Logic Accumulator and the logic state of the operand
(M, I, O, T, C) are gated with OR NOT. The result of the operation is stored in the Logic
Accumulator.
Word execution with the OR NOT command
Operands: B, W, D, K
The contents of the Word Accumulator and the contents of the operand (B, W, D, K) are gated with
OR NOT. In accordance with the different sizes of operand (B = 8 bits; W = 16 bits; D = K = 32 bits),
8, 16 or 32 bits will be influenced in the Accumulator.
Thus: Bit 0 of the Accumulator is gated with bit 0 of the operand
Bit 1 of the Accumulator is gated with bit 1 of the operand, and so on.
The result of the operation is stored in the Word Accumulator.
EXCLUSIVE OR (XO)
Logic execution with the EXCLUSIVE OR command
Operands: M, I, O, T, C
This command functions in different ways depending on its position in the program:
a) At the start of a logic chain the command functions as an L command. That is, the logic state of
the operand is loaded into the Logic Accumulator.
b) Within a logic chain the contents of the Logic Accumulator and the logic state of the operand (M,
I, O, T, C) are gated with EXCLUSIVE OR. The result of the operation is stored in the Logic
Accumulator.