Comparisons; Equal To - HEIDENHAIN TNC 415 Technical Manual

Hide thumbs Also See for TNC 415:
Table of Contents

Advertisement

3.5 Comparisons

3.5.1 EQUAL TO (==)

Abbreviation for the PLC-Editor:
Execution time [µs]
Number of bytes
Operands: B, W, D, K
Operation:
With this command, a direct transfer from Word to Logic processing occurs. The contents of the
Word Accumulator and the contents of the addressed operand are compared. If the Word
Accumulator and the operand are equal, the condition is true and the Logic Accumulator is set to 1.
If they are not equal 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 contents of Doubleword D8. The result is then assigned to
Marker M500.
Initial state:
The Accumulator and operand contents are shown in decimal notation. The 10 bit wide Accumulator
allows the entry of the highest possible Accumulator contents (2 147 483 647).
Line Instruction
1
L K16000
Bit
2
== D8
3
= M500
Line 1: The constant is loaded into the Accumulator.
Line 2: The contents of the Accumulator and the Doubleword D8 are compared
( Accumulator = Operand ? ).
As the condition is not fulfilled the Logic Accumulator is set to 0.
Line 3: The contents of the Logic Accumulator (The result of the comparison) are
assigned to Marker M500.
01.98
TNC 407/TNC 415/TNC 425
== (EQUAL)
Byte/Word/Double
1.0 to 1.2
6
Constant
= 16 000
Doubleword D8 = 15 000
Accumulator Contents
x
x x x
31
. . .
... x x x x x x 0 x x x x x x x
... x x x x x x 0 x x x x x x x
3 Commands
Constant
0.3 to 0.5
8
x x x
x x x
1 6
0 0 0
7
0
Operand Contents
1 5
0 0 0
0
7-73

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 425eTnc 415fTnc 407Tnc 415bTnc 425

Table of Contents