Bit Test (Bt) - HEIDENHAIN TNC 426 PB/M Technical Manual

Table of Contents

Advertisement

7.7.59 BIT TEST (BT)

Function
Load the double
word D8 into the
word accumulator.
Check the state of
the bit specified in
the operand.
Assign the result to
output O12.
December 2001
Syntax:
BT (BIT TEST)
Operands:
B, W, D, K, X
Action:
With the BIT TEST you can interrogate the status of each bit in the
accumulator. With the BT command there is a direct transition from word to
logic processing, i.e. the TNC checks the state of a bit in the word accumulator
and then sets the logic accumulator. If the interrogated bit = 1, the TNC sets
the logic accumulator to 1; otherwise it sets it to 0. The corresponding bits are
selected (addressed) by the content of the specified operand or by a constant.
As to the bit numbering, bit 0 = LSB and bit 31 = MSB. For operand contents
greater than 32, the TNC uses the operand value modulo 32, i.e. the integral
remainder of the result of the operand value divided by 32.
Example:
Load the double word D8 into the accumulator and assign the logical state of
bit 0 to output O12.
Initial state:
Double word D8
= 3E 81 (hex)
Output
O12
= ?
The word accumulator and operand contents are shown here in hexadecimal
notation, the logic accumulator in binary notation.
STL
Accumulator contents (hex or [bit])
L D8
BT K+0
31..15 ..................... 7 .................. 0
= O12
x ..... x x x x x x x x 1 x x x x x x x
Commands
x x
x x
x x
x x
0 0
0 0
3 E
8 1
0 0
0 0
3 E
8 1
Operand content (hex or
[Bit])
0 0 0 0 3 E 8 1
1
7 – 139

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 430 pa/mTnc 430 mTnc 426 cbTnc 430 caTnc 426 pbTnc 430 pa ... Show all

Table of Contents