Shift Commands; Shift Left - HEIDENHAIN TNC 415 Technical Manual

Hide thumbs Also See for TNC 415:
Table of Contents

Advertisement

3.9 Shift Commands

3.9.1 SHIFT LEFT (<<)
Abbreviation for PLC Editor:
Execution time [µs]
Number of bytes
Operands: B, W, D, K
Operation:
Since the sign bit (MSB) is included with this command, it is grouped in with arithmetic commands.
For this reason and out of time considerations, this command should not be used for the isolation of bits.
A SHIFT LEFT instruction causes the contents of the Word Accumulator to be multiplied by two. For this
purpose, the bits in the Accumulator are simply shifted by one place to the left. The result must lie in the
range of –2 147 483 648 to +2 147 483 647, otherwise the Accumulator contains an undefined value.
The number of shift events is defined by the operand. The Accumulator is filled on the right side
with nulls.
Initial state:
The Accumulator content is shown here in binary notation, and the operand content in hexadecimal
notation.
Line Instruction
xxxxxxxx
1
L D8
00000000
2
<< K+1
00000000
3
<< K+1
00000000
4
<< K+1
00000000
5
<< K+1
00000000
6
= D12
00000000
Line 1:
Load Doubleword D8 into the Accumulator.
Line 2 to 5:
The content of the Word Accumulator is shifted to the left by the number of bits
specified in the operand. The complete operation can also be undertaken with the
command << K+4.
Line 6:
The result is stored in the Doubleword D12.
01.98
TNC 407/TNC 415/TNC 425
<< (SHIFT LEFT)
Byte/Word/Double
Constant
0.7 to 1.0
0.5 to 0.6
6
Doubleword D8
= 3E 80 (hex)
Doubleword D12 = ?
Accumulator Content
xxxxxxxx
xxxxxxxxx
00000000 00111110
00000000 01111101
00000000 11111010
00000001 11110100
00000011 11101000
00000011 11101000
3 Commands
8
Operand Content
xxxxxxxxx
10000000
00
00000000
00000000
00000000
00000000
00000000
00
00
3E
80
03
E8
00
7-93

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 425eTnc 415fTnc 407Tnc 415bTnc 425

Table of Contents