Siemens Simatic S7-300 Service Manual Page 170

  • Download
  • Add to my manuals
  • Print
  • Page
    / 272
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 169
Shift and Rotate Instructions
Statement List (STL) for S7-300 and S7-400 Programming
11-2
A5E00706960-01
11.1.2 SSI Shift Sign Integer (16-Bit)
Formate
SSI
SSI <number>
Address Data type Description
<number> integer, unsigned number of bit positions to be shifted, range
from 0 to 15
Description
SSI (shift right with sign integer) shifts only the contents of ACCU 1- L to the right bit
by bit. The bit places that are vacated by the shift instruction are filled with the signal
state of the sign bit (bit 15). The bit that is shifted out last is loaded into the status
word bit CC 1. The number of bit positions to be shifted is specified either by the
address <number> or by a value in ACCU 2-L-L.
SSI <number>: The number of shifts is specified by the address <number>. The
permissible value range is from 0 to 15. The CC 0 and OV status word bits are reset
to 0 if <number> is greater than zero. If <number> is equal to zero, the shift
instruction is regarded as a NOP operation.
SSI:
The number of shifts is specified by the value in ACCU 2- L- L. The possible
value range is from 0 to 255. A shift number >16 always produces the same result
(ACCU 1 = 16#0000, CC 1 = 0, or ACCU 1 = 16#FFFF, CC 1 = 1). If the shift number
is greater than 0, the status word bits CC 0 and OV are reset to 0. If the shift number
is zero, then the shift instruction is regarded as a NOP operation.
Status word
BR CC 1 CC 0 OV OS OR STA RLO /FC
writes: - x x x - - - - -
Examples
Contents ACCU1-H ACCU1-L
Bit 31 . . . . . . . . . . 16 15 . . . . . . . . . . 0
before execution of SSI 6
0101 1111 0110 0100 1001 1101 0011 1011
after execution of SSI 6
0101 1111 0110 0100 1111 1110 0111 0100
Page view 169
1 2 ... 165 166 167 168 169 170 171 172 173 174 175 ... 271 272

Comments to this Manuals

No comments