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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example 1<br />

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

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

SRW 6 //Shift bits with sign in ACCU 1 six places to the right.<br />

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

Example 2<br />

Shift and Rotate Instructions<br />

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

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

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

SRW //Shift number is value of ACCU 2- L- L => Shift bits with sign in ACCU 1-L<br />

three places to the right; fill free places with state of sign bit.<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-3

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

Saved successfully!

Ooh no, something went wrong!