beautypg.com

11 assign not (=n), 12 assign two's complement (= -) – HEIDENHAIN TNC 306 Technical Manual User Manual

Page 326

background image


7-36

TNC 416/TNC 406/TNC 306

Commands

3/2000

Example:
A bit pattern, as defined in Word W8 , is to be assigned to Outputs O5 to O20.

Initial state:

Word W8: 36 FF (hex)

Line Instruction

Accumulator contents

Operand contents

Bit

31 . . . 15

7

0

15 8 7 0

... x x x x x x x x x x x x x x x x x x

1

L W8

... 0 0 0 0 1 1 0 1 1 0 1 1 1 1 1 1 1 1

00110110 11111111

O20 ... ... O5

2

W= O5

... 0 0 0 0 1 1 0 1 1 0 1 1 1 1 1 1 1 1

00110110 11111111

Line 1:

The contents of Word W8 are loaded into the Accumulator.

Line 2:

The contents of the Accumulator are assigned to outputs O5 to O20.

The Commands B= and D= are processed in the same way except that 8 or 32 bits are used
accordingly.

3.1.11 ASSIGN NOT (=N)

Abbreviation for the PLC Editor: =N (STORE NOT)

Logic processing
Operands: M, I, O, T, C

Operation:
An ASSIGN NOT in conjunction with a logic operand (M,I,O,T,C) copies the one's complement of the
contents of the logic accumulator to the addressed operand.
For example see ASSIGN command (=).

Word processing
Operands: B, W, D

Operation:
An ASSIGN NOT in conjunction with a word operand (B,W,D) copies the one's complement of the
contents of the word accumulator to the addressed operand.

For example see ASSIGN command (=).

3.1.12 ASSIGN TWO'S COMPLEMENT (= -)

Abbreviation for the PLC Editor: = - (STORE MINUS)
Operands: B, W, D

Operation:
An ASSIGN TWO'S COMPLEMENT copies the two's complement of the contents of the word
accumulator to the addressed operand.
For example see ASSIGN command (=).

This manual is related to the following products: