Siemens S7-400 Service Manual Page 139

  • Download
  • Add to my manuals
  • Print
  • Page
    / 228
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 138
Shift and Rotate Instructions
Ladder Logic (LAD) for S7-300 and S7-400 Programming
A5E00706949-01
11-5
11.1.4 SHL_W Shift Left Word
Symbol
SHL_W
EN
OUT
N
ENO
IN
Parameter Data Type Memory Area Description
EN BOOL I, Q, M, L, D Enable input
ENO BOOL I, Q, M, L, D Enable output
IN WORD I, Q, M, L, D Value to shift
N WORD I, Q, M, L, D Number of bit positions to shift
OUT WORD I, Q, M, L, D Result of shift instruction
Description
SHL_W (Shift Left Word) is activated by a logic "1" at the Enable (EN) Input. The
SHL_W instruction is used to shift bits 0 to 15 of input IN bit by bit to the left. Bits
16 to 31 are not affected. The input N specifies the number of bits by which to shift.
If N is larger than 16, the command writes a "0" at output OUT and sets the bits
CC 0 and OV in the status word to "0". N zeros are also shifted in from the right to
fill vacated bit positions. The result of the shift instruction can be scanned at output
OUT. The CC 0 bit and the OV bit are set to "0" by SHL_W if N is not equal to 0.
ENO has the same signal state as EN.
IN
6
p
lacesN
OUT
The vacated places
are filled with zeros.
These six bits
are lost.
0000
15... ...8 7... ...0
1111 0101 0101
0101000011 0100 00001101
Status word
BR CC 1 CC 0 OV OS OR STA RLO /FC
writes: x x x x - x x x 1
Page view 138
1 2 ... 134 135 136 137 138 139 140 141 142 143 144 ... 227 228

Comments to this Manuals

No comments