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.

Floating-Point Math Instructions<br />

8.4.5 SIN Generate the Sine of Angles as Floating-Point Numbers<br />

(32-Bit)<br />

Format<br />

SIN<br />

Description of instruction<br />

Result<br />

Example<br />

SIN (generate the sine of angles as floating-point numbers, 32-bit, IEEE-FP)<br />

calculates the sine of an angle specified as a radian measure. The angle must be<br />

present as a floating-point number in ACCU 1. The result is stored in accumulator 1.<br />

The instruction influences the CC 1, CC 0, OV, and OS status word bits.<br />

The contents of accumulator 2 (and the contents of accumulator 3 and accumulator<br />

4 for CPUs with four ACCUs) remain unchanged.<br />

The result in ACCU 1 is CC 1 CC 0 OV OS Note<br />

+qNaN 1 1 1 1<br />

+normalized 1 0 0 -<br />

+denormalized 0 0 1 1 Overflow<br />

+zero 0 0 0 -<br />

-zero 0 0 0 -<br />

-denormalized 0 0 1 1 Underflow<br />

-normalized 0 1 0 -<br />

-qNaN 1 1 1 1<br />

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

L MD10 //The value from memory double word MD10 is loaded into ACCU 1. (This value<br />

must be in the floating-point format.)<br />

SIN //Calculate the sine of the floating-point number (32-bit, IEEE-FP) in ACCU<br />

1. Store the result in ACCU 1.<br />

T MD20 //Transfer the result from ACCU 1 to the memory double word MD20.<br />

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

8-14 A5E00706960-01

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

Saved successfully!

Ooh no, something went wrong!