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.

Counter Instructions<br />

4.4 LC Load Current Counter Value into ACCU 1 as BCD<br />

Format<br />

Description<br />

Status word<br />

Example<br />

LC <br />

Address Data type Memory area Description<br />

COUNTER C Counter, range<br />

depends on CPU.<br />

LC loads the count of the addressed counter as a BCD number into<br />

ACCU 1 after the old contents of ACCU 1 have been saved into ACCU 2.<br />

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

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

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

LC C3 //Load ACCU 1-L with the count value of counter C3 in binary coded decimal<br />

format.<br />

Counter word<br />

for counter C3<br />

in memory<br />

Contents of<br />

ACCU1-L after<br />

Load instruction<br />

LC C3<br />

2 15<br />

0<br />

2 15<br />

2 14<br />

0<br />

2 14<br />

2 13<br />

0<br />

2 13<br />

2 12<br />

0<br />

2 12<br />

2 11<br />

2 11<br />

2 10<br />

2 10<br />

2 9<br />

2 9<br />

Counter value (0 to 999) in binary coding<br />

codiert<br />

LC Z3<br />

Counter value in BCD<br />

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

4-4 A5E00706960-01<br />

2 8<br />

2 8<br />

10 2 Hundreds<br />

2 7<br />

2 7<br />

2 6<br />

2 6<br />

2 5<br />

2 5<br />

2 4<br />

2 4<br />

2 3<br />

2 3<br />

2 2<br />

2 2<br />

2 1<br />

2 1<br />

10 1 Tens 10 0 Ones<br />

2 0<br />

2 0

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

Saved successfully!

Ooh no, something went wrong!