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.

7 Integer Math Instructions<br />

7.1 Overview of Integer Math Instructions<br />

Description<br />

The math operations combine the contents of accumulators 1 and 2. In the case of<br />

CPUs with two accumulators, the contents of accumulator 2 remains unchanged.<br />

In the case of CPUs with four accumulators, the contents of accumulator 3 is then<br />

copied into accumulator 2 and the contents of accumulator 4 into accumulator 3. The<br />

old contents of accumulator 4 remains unchanged.<br />

Using integer math, you can carry out the following operations with two integer<br />

numbers (16 and 32 bits):<br />

• +I Add ACCU 1 and ACCU 2 as Integer (16-Bit)<br />

• -I Subtract ACCU 1 from ACCU 2 as Integer (16-Bit)<br />

• *I Multiply ACCU 1 and ACCU 2 as Integer (16-Bit)<br />

• /I Divide ACCU 2 by ACCU 1 as Integer (16-Bit)<br />

• + Add Integer Constant (16, 32 Bit)<br />

• +D Add ACCU 1 and ACCU 2 as Double Integer (32-Bit)<br />

• -D Subtract ACCU 1 from ACCU 2 as Double Integer (32-Bit)<br />

• *D Multiply ACCU 1 and ACCU 2 as Double Integer (32-Bit)<br />

• /D Divide ACCU 2 by ACCU 1 as Double Integer (32-Bit)<br />

• MOD Division Remainder Double Integer (32-Bit)<br />

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

A5E00706960-01 7-1

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

Saved successfully!

Ooh no, something went wrong!