EasyManuals Logo

Siemens Simatic S7 Series System Manual

Siemens Simatic S7 Series
726 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #198 background imageLoading...
Page #198 background image
Program instructions
7.5 Convert
S7-200 SMART
198 System Manual, 09/2015, A5E03822230-AC
7.5
Convert
7.5.1
Standard conversion instructions
These instructions convert an input value IN to the assigned format and store the output
value in the memory location assigned by OUT. For example, you can convert a double
integer value to a real number. You can also convert between integer and BCD formats.
Standard conversions
LAD / FBD
STL
Description
BTI IN, OUT
Byte to integer
:
Convert the byte value IN to an integer value and place the result at the ad-
dress assigned to OUT. The byte is unsigned; therefore, there is no sign exten-
sion.
ITB IN, OUT
Integer to byte
:
Convert the word value IN to a byte value and place the result at the address
assigned to OUT. Values 0 to 255 are converted. All other values result in over-
flow and the output is not affected.
Note:
To change an integer to a real number, execute the Integer to Double
Integer instruction and then the Double Integer to Real instruction.
ITD IN, OUT
Integer to double integer
:
Convert the integer value IN to a double integer value and place the result at
the address assigned to OUT. The sign is extended.
DTI IN, OUT
Double Integer to integer
:
Convert the double integer value IN to an integer value and place the result at
the address assigned to OUT. If the value that you convert is too large to be
represented in the output, then the overflow bit is set and the output is not af-
fected.
DTR IN, OUT
Double integer to real
:
Convert a 32-bit, signed integer IN into a 32-bit real number and place the result
at the address assigned to OUT.
BCDI OUT
IBCD OUT
BCD to Integer
:
Convert the binary-coded decimal WORD data type value IN to an integer
WORD data type value and load the result in the address assigned to OUT. The
valid range for IN is 0 to 9999 BCD.
Integer to BCD
:
Convert the input integer WORD data type value IN to a binary-coded decimal
WORD data type and load the result at the address assigned to OUT. The valid
range for IN is 0 to 9999 integer.
For STL, the IN and OUT parameters use the same address.

Table of Contents

Other manuals for Siemens Simatic S7 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens Simatic S7 Series and is the answer not in the manual?

Siemens Simatic S7 Series Specifications

General IconGeneral
CPUVaries by model (e.g., S7-300, S7-400, S7-1200, S7-1500)
Communication InterfacesPROFIBUS, PROFINET, Ethernet, MPI
ProgrammingTIA Portal, STEP 7
Programming LanguagesLAD, FBD, STL, SCL, GRAPH
I/O ModulesDigital, Analog, Specialty modules available
Operating Temperature0°C to 60°C (standard models)
MountingDIN rail mounting
Operating Voltage24V DC or 120/230V AC (varies by model)
Protection ClassIP20 (standard models)
MemoryVaries depending on the S7 model. Includes work memory (RAM) for program execution, load memory (EEPROM or Flash) for program storage, and system memory for operating system functions. Memory sizes range from kilobytes to megabytes.

Related product manuals