beautypg.com

Logical connective operations, 3 logical connective operations – HEIDENHAIN TNC 122 Technical Manual User Manual

Page 51

background image


50

TNC 122

12 PLC Description

4/97

12.2.3 Logical Connective Operations

AND (A)

Logic execution with the AND 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 AND. The result of the operation is stored in the Logic Accumulator.

Word execution with the AND 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
AND. 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.

AND NOT (AN)

Logic execution with the AND 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 the 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 AND NOT. The result of the operation is stored in the Logic
Accumulator.

Word execution with the AND 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
AND 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.