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.

Examples<br />

Shift and Rotate Instructions<br />

Contents ACCU1-H ACCU1-L<br />

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

before execution of SLD 5 0101 1111 0110 0100 0101 1101 0011 1011<br />

after execution of SLD 5 1110 1100 1000 1011 1010 0111 0110 0000<br />

Example 1<br />

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

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

SLD 5 //Shift bits in ACCU 1 five 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 the contents of ACCU 1 into ACCU 2. Load value of MD20 into ACCU 1.<br />

SLD //Shift number is value of ACCU 2- L- L => Shift bits in ACCU 1 three places<br />

to the left.<br />

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

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

A5E00706960-01 11-11

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

Saved successfully!

Ooh no, something went wrong!