EasyManua.ls Logo

Siemens SIMATIC S7-200 - IEC Conversion Instructions; Truncate; Binary Coded Decimal 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...
IEC 1131-3 Instructions
10-30
S7-200 Programmable Controller System Manual
A5E00066097-02
10.10 IEC Conversion Instructions
Table 10-8 gives page references for the non-standard IEC Conversion
instructions.
Table 10-8 Non-Standard IEC Conversion Instructions
Description
Page
Decode Instruction 9-135
Encode Instruction 9-135
Segment Instruction 9-137
ASCII to Hex, Hex to ASCII Instruction 9-139
Integer to ASCII Instruction 9-140
Double Integer to ASCII Instruction 9-142
Real to ASCII Instruction 9-143
Truncate
The Truncate function converts a real number (IN) into a
double integer value and places the result in OUT. No
rounding is performed.
Error conditions that set ENO = 0: SM1.1 (overflow),
SM4.3 (run-time), 0006 (indirect address)
This function affects the following Special Memory bits:
SM1.1 (overflow)
Inputs/Outputs Operands Data Types
IN VD, ID, QD, MD, SD, SMD, LD, AC, Constant, *VD, *AC,* LD REAL
OUT VD, ID, QD, MD, SD, SMD, LD, AC, *VD, *AC, *LD DINT
Binary Coded Decimal to Integer, Integer to BCD
The BCD to Integer function converts the input
Binary-Coded Decimal value (IN) to an integer value and
loads the result into the variable specified by OUT.
The Integer to BCD function converts the input integer
value to a Binary-Coded Decimal value and loads the
result in OUT.
Error conditions that set ENO = 0: SM1.6 (BCD),
SM4.3 (run-time), 0006 (indirect address)
These functions affect the following Special Memory bits:
SM1.6 (invalid BCD)
L
A
D
TRUNC
EN
IN OUT
ENO
F
B
D
222 224
221 226
L
A
D
BCD_TO_I
EN
IN OUT
F
B
D
EN
IN OUT
I_TO_BCD
222 224
221
ENO
ENO
226

Table of Contents

Other manuals for Siemens SIMATIC S7-200

Related product manuals