Bit Test - HEIDENHAIN TNC 415 Technical Manual

Hide thumbs Also See for TNC 415:
Table of Contents

Advertisement

3.10.3 BIT TEST (BT)
Abbreviation for PLC Editor:
Execution time [µs]
Number of bytes
Operands: B, W, D, K
Operation:
With this command, the status of each individual bit in the Accumulator may be interrogated. With
BT commands, a direct transition from Word to Logic execution takes place. The BIT TEST tests the
status of a bit from the Word Accumulator and then acts correspondingly on the Logic Accumulator.
If the tested bit is "1", then the Logic Accumulator is also set to "1"; if it is "0" ,it is set to "0". The
program continues in logic execution. The selection (addressing) of the corresponding bit is derived
from the content of the specified Operand or a Constant. In the bit-numbering, bit 0 corresponds to
the LSB and bit 31 the MSB. For operand contents larger than 32, the operand value Modulo 32 is
used, i.e. the integer remainder from the division (operand value)/32.
Example:
Load Doubleword D8 in the Accumulator, and assign the logic state of bit 0 to an Output.
Initial state:
Word Accumulator and operand contents are shown here in hexadecimal notation, the Logic
Accumulator in binary representation.
Line Instruction
1
L D8
2
BT K+0
3
= O12
x x x x x x 1 x x x x x x x
Line 1: Load Doubleword D8 into the Accumulator.
Line 2: The bit specified in the operand is tested as to its status.
Line 3: The Logic Accumulator is assigned to Output O12.
7-98
TNC 407/TNC 415/TNC 425
BT (BIT TEST)
Byte/Word/Double
Constant
0.6 to 1.1
0.3 to 0.5
8
Doubleword D8 = 3E 81
Output
O12 = ?
Accumulator Content
xx
xx
xx
00
00
3E
00
00
3E
3 Commands
0
(hex)
Operand Content
xx
81
00
00
3E
81
81
1
01.98

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 425eTnc 415fTnc 407Tnc 415bTnc 425

Table of Contents