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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.5 ITD Integer (16 Bit) to Double Integer (32-Bit)<br />

Format<br />

Description<br />

Status word<br />

Example<br />

ITD<br />

Conversion Instructions<br />

ITD (conversion of a 16-bit integer number to a 32-bit integer number) interprets the<br />

contents of ACCU 1-L as a 16-bit integer and converts it to a 32-bit double integer.<br />

The result is stored in accumulator 1. Accumulator 2 remains unchanged.<br />

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

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

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

L MW12 //Load the integer number into ACCU 1.<br />

ITD //Convert from integer (16-bit) to double integer (32-bit); store result in<br />

ACCU 1.<br />

T MD20 //Transfer result (double integer) to MD20.<br />

Example: MW12 = "-10" (Integer, 16-bit)<br />

Contents ACCU1-H ACCU1-L<br />

Bit 31 . . . . . . . . . . 16 15 . . . . . . . . . . 0<br />

before execution of ITD XXXX XXX XXX XXX 1111 1111 1111 0110<br />

X X X<br />

after execution of ITD 1111 1111 1111 1111 1111 1111 1111 0110<br />

(X = 0 or 1, bits are not used for conversion)<br />

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

A5E00706960-01 3-5

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

Saved successfully!

Ooh no, something went wrong!