Siemens Simatic S7 Series System Manual page 201

Hide thumbs Also See for Simatic S7 Series:
Table of Contents

Advertisement

Examples: I_DI, DI_R, and BCD_I
LAD
See also
Assigning a constant value for instructions
See also
Assigning a constant value for instructions (Page 69)
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
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).
Convert a BCD value to an integer (ex.
AC0=1234, execute BCD_I, then
AC0=04D2).
Program instructions
STL
Network 1
LD I0.0
ITD C10, AC1
DTR AC1, VD0
MOVR VD0, VD8
*R VD4, VD8
ROUND VD8, VD12
Network 2
LD I0.3
BCDI AC0
7.5 Convert
201

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart series

Table of Contents