Siemens SIMATIC S7-200 System Manual page 114

Programmable controller
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

S7-200 Programmable Controller System Manual
Operation of the BCD to Integer and Integer to BCD Instructions
The BCD to Integer instruction (BCDI) converts the
binary-coded decimal value IN to an integer value and loads
the result into the variable specified by OUT. The valid range
for IN is 0 to 9999 BCD.
The Integer to BCD instruction (IBCD) converts the input
integer value IN to a binary-coded decimal and loads the
result into the variable specified by OUT. The valid range for
IN is 0 to 9999 integer.
Operation of the Double Integer to Real Instruction
The Double Integer to Real instruction (DTR) converts a
32-bit, signed integer IN into a 32-bit real number and places
the result into the variable specified by OUT.
Operation of the Double Integer to Integer Instruction
The Double Integer to Integer instruction (DTI) converts the
double integer value IN to an integer value and places the
result into the variable specified by OUT.
If the value that you are converting is too large to be
represented in the output, then the overflow bit is set and the
output is not affected.
Operation of the Integer to Double Integer Instruction
The Integer to Double Integer instruction (ITD) converts the
integer value IN to a double integer value and places the
result into the variable specified by OUT. The sign is
extended.
Operation of the Byte to Integer Instruction
The Byte to Integer instruction (BTI) converts the byte value
IN to an integer value and places the result into the variable
specified by OUT. The byte is unsigned, therefore there is
no sign extension.
Operation of the Integer to Byte Instruction
The Integer to Byte instruction (ITB) converts the word value
IN to a byte value and places the result into the variable
specified by OUT. Values 0 to 255 are converted. All other
values result in overflow and the output is not affected.
values result in overflow and the output is not affected
Tip
To change an integer to a real number, use the Integer to Double Integer instruction and then
use the Double Integer to Real instruction.
100
Error conditions that set ENO = 0
H SM1.6 (invalid BCD)
H 0006 (indirect address)
SM bits affected:
H SM1.6 (invalid BCD)
Error conditions that set ENO = 0
H 0006 (indirect address)
Error conditions that set ENO = 0
H SM1.1 (overflow)
H 0006 (indirect address)
SM bits affected:
H SM1.1 (overflow)
Error conditions that set ENO = 0
H 0006 (indirect address)
Error conditions that set ENO = 0
H 0006 (indirect address)
Error conditions that set ENO = 0
H SM1.1 (overflow)
H 0006 (indirect address)
SM bits affected:
H SM1.1 (overflow)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents