EasyManuals Logo

Siemens SIMATIC S7 System Manual

Siemens SIMATIC S7
866 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 #239 background imageLoading...
Page #239 background image
Program instructions
7.5 Convert
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
239
Examples: I_DI, DI_R, and BCD_I
LAD
STL
Convert inches to centimeters:
1. Load a counter value (inches) into
AC1 (ex. C10=101).
2. Convert the value to a real number
(ex. VD0=101.0).
3. Multiply by 2.54 to convert to centi-
meters
(ex. VD4=2.54, VD8=256.54).
4. Convert the value back to an integer
(ex. VD12=257).
Network 1
LD I0.0
ITD C10, AC1
DTR AC1, VD0
MOVR VD0, VD8
*R VD4, VD8
ROUND VD8, VD12
Convert a BCD value to an integer (ex.
AC0=1234, execute BCD_I, then
AC0=04D2).
Network 2
LD I0.3
BCDI AC0
See also
Assigning a constant value for instructions
See also
Assigning a constant value for instructions (Page 83)

Table of Contents

Other manuals for Siemens SIMATIC S7

Questions and Answers:

Question and Answer IconNeed help?

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

Siemens SIMATIC S7 Specifications

General IconGeneral
BrandSiemens
ModelSIMATIC S7
CategoryController
LanguageEnglish

Related product manuals