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.

8 Floating-Point Math Instructions<br />

8.1 Overview of Floating-Point Math Instructions<br />

Description<br />

The math instructions 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 copied<br />

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

contents of accumulator 4 remains unchanged.<br />

The IEEE 32-bit floating-point numbers belong to the data type called REAL. You<br />

can use the floating-point math instructions to perform the following math<br />

instructions using two 32-bit IEEE floating-point numbers:<br />

• +R Add ACCU 1 and ACCU<br />

• -R Subtract ACCU 1 from ACCU 2<br />

• *R Multiply ACCU 1 and ACCU 2<br />

• /R Divide ACCU 2 by ACCU 1<br />

Using floating-point math, you can carry out the following operations with one 32-bit<br />

IEEE floating-point number:<br />

• ABS Absolute Value<br />

• SQR Generate the Square<br />

• SQRT Generate the Square Root<br />

• EXP Generate the Exponential Value<br />

• LN Generate the Natural Logarithm<br />

• SIN Generate the Sine of Angles<br />

• COS Generate the Cosine of Angles<br />

• TAN Generate the Tangent of Angles<br />

• ASIN Generate the Arc Sine<br />

• ACOS Generate the Arc Cosine<br />

• ATAN Generate the Arc Tangent<br />

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

A5E00706960-01 8-1

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

Saved successfully!

Ooh no, something went wrong!