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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.10 Bit Commands<br />

3.10.1 BIT SET (BS) BS<br />

Abbreviation for PLC Editor: BS (BIT SET)<br />

Byte/Word/Double Constant<br />

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

Number of bytes 6 8<br />

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

Operation:<br />

With this command, each bit in the Accumulator can be acted on. The addressed bit is set to "1"<br />

through the use of the BS command. 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, set the bit 0 of the Accumulator to "1" and store the result<br />

in Doubleword D12.<br />

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

Doubleword D12 = ?<br />

Accumulator and operand contents are shown here in hexadecimal notation.<br />

Line Instruction Accumulator Content Operand Content<br />

xx xx xx xx<br />

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

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

3 = D12 00 00 3E 81 00 00 3E 81<br />

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

Line 2: The bit specified in the operand is set to 1.<br />

Line 3: The result is stored in Doubleword D12.<br />

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

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

Saved successfully!

Ooh no, something went wrong!