beautypg.com

5 greater than or equal to (>=) – HEIDENHAIN TNC 407 (243 020) Technical Manual User Manual

Page 538

background image


01.98

TNC 407/TNC 415/TNC 425

3 Commands

7-77

3.5.5 GREATER THAN OR EQUAL TO (>=)

Abbreviation for PLC Editor: >= (GREATER EQUAL)

Byte/Word/Double Constant

Execution time [µs]

1.0 to 1.2

0.3 to 0.5

Number of bytes

6

8

Operands: B, W, D, K

Operation:
With this command, a direct transfer from Word to Logic execution occurs. The content of the Word
Accumulator is compared with the content of the addressed operand. If the Word Accumulator is
greater than or equal to the operand, the condition is true and the Logic Accumulator is set to 1. If
the Word Accumulator is smaller than the operand, the Logic Accumulator is set to 0. The
comparison takes place over the number of bits corresponding to the operand i.e. B=8 bit, W=16 bit
and D=K=32 bit.

Example:
A constant is to be compared with the content of Doubleword D8. The result is then assigned to
marker M500.

Initial state:

Constant

= 16 000

Doubleword D8 = 15 000

Accumulator and operand contents are entered here in decimal notation. The ten-position
Accumulator thus permits the maximum possible Accumulator content (2 147 483 647).

Line Instruction

Accumulator Content

Operand Content

x

x x x

x x x

x x x

1

L K16000

1 6

0 0 0

Bit

31

.

.

.

7

0

1

>= D8

... x x x x x x 1 x x x x x x x

1 5

0 0 0

2

= M500

... x x x x x x 1 x x x x x x x

1

Line 1:

The constant is loaded into the Word Accumulator.

Line 2:

The contents of the Word Accumulator and operand are compared according to the
following criteria: Word Accumulator >= Operand. As this condition is fulfilled, the Logic
Accumulator is set to 1.

Line 3:

The content of the Logic Accumulator (result of the comparison) is assigned to marker
M500.