Code Converter : B4 - Fb240 - - Siemens SIMATIC S5-100U System Manual

Simatic s5 series cpu 100/102/103
Hide thumbs Also See for SIMATIC S5-100U:
Table of Contents

Advertisement

Integrated Blocks and Their Functions

9.2.1 Code Converter : B4 - FB240 -

Use function block FB240 to convert a number in BCD (4 tetrads) with sign to a fixed-point binary
number (16 bits).
You must change a two-tetrad number to a four-tetrad number before you convert it.
If a tetrad is not in the BCD defined range, then FB240 displays the value "0". An error bit
message does not follow.
Table 9-2. Call and Parameter Assignments of FB240
Parameter
BCD
BCD number
SBCD
Sign of the
BCD number
DUAL
Fixed-point
number (KF)
9.2.2
Code Converter : 16
Use function block FB 241 to convert a fixed-point binary number (16 bits) to a number in BCD code
with additional consideration of the sign
word before conversion.
Table 9-3. Call and Parameter Assignments of FB241
Parameter
DUAL
Binary number
SBCD
Sign of the BCD
BCD2
BCD number 4th and
5th tetrads
BCD1
BCD number tetrads
9-12
Meaning
Type
I W
I BI
Q W
- FB241-
.
An eight-bit binary number must be transferred to a 16-bit
Meaning
Type
W
I
I BI
number
Q BY
Q W
0 to 3
Assignment
0 to 9999
-
"1" for "-"
NAME
"0" for "+"
BCD
SBCD
16 bits "0"
DUAL
or "1"
Assignment
-32768 to+32767
"1" for "-"
NAME
"0" for "+"
DUAL
SBCD
2 tetrads
BCD2
BCD1
4 tetrads
S5-100U
STL
: JU FB240
: COD:B4
:
:
:
STL
: JU FB241
: COD:16
:
:
:
:
EWA 4NEB 812 6120-02b

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents