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.

Accumulator Instructions<br />

14.9 INC Increment ACCU 1-L-L<br />

Format<br />

Description<br />

Status word<br />

Example<br />

INC <br />

Parameter Data Type Description<br />

8-bit integer<br />

constant<br />

Constant added to ACCU 1-L-L; range from 0 to<br />

255<br />

INC (increment ACCU 1-L-L) adds the 8-bit integer to the contents<br />

of ACCU 1-L-L and stores the result in ACCU 1-L-L. ACCU 1-L-H, ACCU 1-H, and<br />

ACCU 2 remain unchanged. The instruction is executed without regard to, and<br />

without affecting, the status bits.<br />

Note<br />

These instructions are not suitable for 16-bit or 32-bit math because no carry is made<br />

from the low byte of the low word of accumulator 1 to the high byte of the low word of<br />

accumulator 1. For 16-bit or 32-bit math, use the +I or +D. instruction, respectively.<br />

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

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

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

L MB22 //Load the value of MB22<br />

INC 1 //Instruction "Increment ACCU 1 (MB22) by 1"; store result in ACCU 1-L-L<br />

T MB22 //Transfer the contents of ACCU 1-L-L (result) back to MB22<br />

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

14-8 A5E00706960-01

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

Saved successfully!

Ooh no, something went wrong!