EasyManua.ls Logo

Siemens SIMATIC S7-200 - Simatic Conversion Instructions; BCD to Integer, Integer to BCD

Siemens SIMATIC S7-200
606 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
Loading...
SIMATIC Instructions
9-130
S7-200 Programmable Controller System Manual
A5E00066097-02
9.13 SIMATIC Conversion Instructions
BCD to Integer, Integer to BCD
The BCD to Integer instruction converts the input
Binary-Coded Decimal (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 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.
Error conditions that set ENO = 0: SM1.6 (BCD error),
SM4.3 (run-time), 0006 (indirect address)
These instructions affect the following Special Memory
bits: SM1.6 (invalid BCD)
Inputs/Outputs Operands Data Types
IN VW, T, C, IW, QW, MW, SMW, LW, AC, AIW, Constant, *VD, *AC,
SW, *LD
WORD
OUT VW, T, C, IW, QW, MW, SMW, LW, AC, *VD, *AC, SW, *LD WORD
Double Integer to Real
The Double Integer to Real instruction converts a
32-bit, signed integer (IN) into a 32-bit real number and
places the result into the variable specified by OUT.
Error conditions that set ENO = 0: SM4.3 (run-time),
0006 (indirect address)
Inputs/Outputs Operands Data Types
IN VD, ID, QD, MD, SMD, AC, LD, HC, Constant, *VD, *AC, SD, *LD DINT
OUT VD, ID, QD, MD, SMD, LD, AC, *VD, *AC, SD, *LD REAL
L
A
D
S
T
L
BCDI OUT
IBCD OUT
BCD_I
EN
IN OUT
I_BCD
EN
IN OUT
F
B
D
ENO
ENO
222 224
✓✓
221 226
L
A
D
S
T
L
DTR IN, OUT
DI_R
EN
IN OUT
F
B
D
ENO
222 224
✓✓
221 226

Table of Contents

Other manuals for Siemens SIMATIC S7-200

Related product manuals