06.08.2013 Views

Technical Manual TNC 360 - heidenhain - DR. JOHANNES ...

Technical Manual TNC 360 - heidenhain - DR. JOHANNES ...

Technical Manual TNC 360 - heidenhain - DR. JOHANNES ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.10.3 BIT TEST (BT) BT<br />

Abbreviation for PLC Editor: BT (BIT TEST)<br />

Byte/Word/Double Constant<br />

Execution time [µs] 2.2 to 2.8 2.2 to 2.4<br />

Number of bytes 8 0<br />

Operands: B, W, D, K<br />

Operation:<br />

With this command, the status of each individual bit in the Accumulator may be interrogated. With<br />

BT commands, a direct transition from Word to Logic execution takes place. The BIT TEST tests the<br />

status of a bit from the Word Accumulator and then acts correspondingly on the Logic Accumulator.<br />

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<br />

program continues in logic execution. The selection (addressing) of the corresponding bit is derived<br />

from the content of the specified Operand or a Constant. In the bit numbering, bit 0 corresponds to<br />

the LSB and bit 31 the MSB. For operand contents larger than 32, the operand value Modulo 32 is<br />

used, i.e. the integer remainder from the division (operand value)/32.<br />

Example:<br />

Load Doubleword D8 in the Accumulator, and assign the logic state of bit 0 to an Output.<br />

Initial state: Doubleword D8 = 3E 81 (hex)<br />

Output O12 = ?<br />

Word Accumulator and operand contents are shown here in hexadecimal notation, the Logic<br />

Accumulator in binary representation.<br />

Line Instruction Accumulator Content Operand Content<br />

xx xx xx xx<br />

1 L D8 00 00 3E 81 00 00 3E 81<br />

2 BT K+0 00 00 3E 81<br />

3 = O12 x x x x x x 1 x x x x x x x 1<br />

Line 1: Load Doubleword D8 into the Accumulator.<br />

Line 2: The bit specified in the operand is tested as to its status.<br />

Line 3: The Logic Accumulator is assigned to Output O12.<br />

8/95 <strong>TNC</strong> <strong>360</strong> 3 Commands 7-87

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!