26.10.2012 Views

Statement List (STL) - DCE FEL ČVUT v Praze

Statement List (STL) - DCE FEL ČVUT v Praze

Statement List (STL) - DCE FEL ČVUT v Praze

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.

Shift and Rotate Instructions<br />

11.1.2 SSI Shift Sign Integer (16-Bit)<br />

Formate<br />

Description<br />

Status word<br />

Examples<br />

SSI<br />

SSI <br />

Address Data type Description<br />

integer, unsigned number of bit positions to be shifted, range<br />

from 0 to 15<br />

SSI (shift right with sign integer) shifts only the contents of ACCU 1- L to the right bit<br />

by bit. The bit places that are vacated by the shift instruction are filled with the signal<br />

state of the sign bit (bit 15). The bit that is shifted out last is loaded into the status<br />

word bit CC 1. The number of bit positions to be shifted is specified either by the<br />

address or by a value in ACCU 2-L-L.<br />

SSI : The number of shifts is specified by the address . The<br />

permissible value range is from 0 to 15. The CC 0 and OV status word bits are reset<br />

to 0 if is greater than zero. If is equal to zero, the shift<br />

instruction is regarded as a NOP operation.<br />

SSI: The number of shifts is specified by the value in ACCU 2- L- L. The possible<br />

value range is from 0 to 255. A shift number >16 always produces the same result<br />

(ACCU 1 = 16#0000, CC 1 = 0, or ACCU 1 = 16#FFFF, CC 1 = 1). If the shift number<br />

is greater than 0, the status word bits CC 0 and OV are reset to 0. If the shift number<br />

is zero, then the shift instruction is regarded as a NOP operation.<br />

BR CC 1 CC 0 OV OS OR STA RLO /FC<br />

writes: - x x x - - - - -<br />

Contents ACCU1-H ACCU1-L<br />

Bit 31 . . . . . . . . . . 16 15 . . . . . . . . . . 0<br />

before execution of SSI 6 0101 1111 0110 0100 1001 1101 0011 1011<br />

after execution of SSI 6 0101 1111 0110 0100 1111 1110 0111 0100<br />

<strong>Statement</strong> <strong>List</strong> (<strong>STL</strong>) for S7-300 and S7-400 Programming<br />

11-2 A5E00706960-01

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

Saved successfully!

Ooh no, something went wrong!