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 />

Examples<br />

Contents ACCU1-H ACCU1-L<br />

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

before execution of RLD 4 0101 1111 0110 0100 0101 1101 0011 1011<br />

after execution of RLD 4 1111 0110 0100 0101 1101 0011 1011 0101<br />

Example 1<br />

<strong>STL</strong> Explanation<br />

L MD2 //Load value into ACCU 1.<br />

RLD 4 //Rotate bits in ACCU 1 four places to the left.<br />

T MD8 //Transfer result to MD8.<br />

Example 2<br />

<strong>STL</strong> Explanation<br />

L +3 //Load value +3 into ACCU 1.<br />

L MD20 //Load contents of ACCU 1 into ACCU 2. Load value of MD20 into ACCU 1.<br />

RLD //Rotation number is value of ACCU 2- L- L => Rotate bits in ACCU 1 three places<br />

to the left.<br />

JP NEXT //Jump to NEXT jump label if the bit rotated out last (CC 1) = 1.<br />

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

11-16 A5E00706960-01

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

Saved successfully!

Ooh no, something went wrong!