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 Conversion Instructions<br />

3.1 Overview of Conversion Instructions<br />

Description<br />

You can use the following instructions to convert binary coded decimal numbers and<br />

integers to other types of numbers:<br />

• BTI BCD to Integer (16-Bit)<br />

• ITB Integer (16-Bit) to BCD<br />

• BTD BCD to Integer (32-Bit)<br />

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

• DTB Double Integer (32-Bit) to BCD<br />

• DTR Double Integer (32-Bit) to Floating-Point (32-Bit IEEE-FP)<br />

You can use one of the following instructions to form the complement of an integer or<br />

to invert the sign of a floating-point number:<br />

• INVI Ones Complement Integer (16-Bit)<br />

• INVD Ones Complement Double Integer (32-Bit)<br />

• NEGI Twos Complement Integer (16-Bit)<br />

• NEGD Twos Complement Double Integer (32-Bit)<br />

• NEGR Negate Floating-Point Number (32-Bit, IEEE-FP)<br />

You can use the following Change Bit Sequence in Accumulator 1 instructions to<br />

reverse the order of bytes in the low word of accumulator 1 or in the entire<br />

accumulator:<br />

• CAW Change Byte Sequence in ACCU 1-L (16-Bit)<br />

• CAD Change Byte Sequence in ACCU 1 (32-Bit)<br />

You can use any of the following instructions to convert a 32-bit IEEE floating-point<br />

number in accumulator 1 to a 32-bit integer (double integer). The individual<br />

instructions differ in their method of rounding:<br />

• RND Round<br />

• TRUNC Truncate<br />

• RND+ Round to Upper Double Integer<br />

• RND- Round to Lower Double Integer<br />

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

A5E00706960-01 3-1

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

Saved successfully!

Ooh no, something went wrong!