Code Converter : B4 - Fb240 - - Siemens S5-100U User Manual

Simatic s5 programmable controller
Hide thumbs Also See for 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
SBCD
DUAL
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
SBCD
Sign of the BCD
BCD2
BCD number 4th and
BCD1
BCD number tetrads
9-12
Meaning
Type
BCD number
Sign of the
BCD number
Fixed-point
Q W
number (KF)
- FB241-
.
An eight-bit binary number must be transferred to a 16-bit
Meaning
Type
Binary number
number
Q BY
5th tetrads
Q W
0 to 3
Assignment
I W
0 to 9999
-
I BI
"1" for "-"
"0" for "+"
16 bits "0"
or "1"
Assignment
W
-32768 to+32767
I
I BI
"1" for "-"
"0" for "+"
2 tetrads
4 tetrads
S5-100U
STL
: JU FB240
NAME
: COD:B4
BCD
:
SBCD
:
DUAL
:
STL
: JU FB241
NAME
: COD:16
DUAL
:
SBCD
:
BCD2
:
BCD1
:
EWA 4NEB 812 6120-02

Advertisement

Table of Contents
loading

Table of Contents