Integrated Function Blocks (Fbs); Code Converter - Siemens SIMATIC S5-90U System Manual

Table of Contents

Advertisement

Integrated Blocks and Their Functions
9.2

Integrated Function Blocks (FBs)

The function blocks listed in Table 9.5 are integrated in the PLC. They can be called up from the
control program using the "JU FB x" or "JC FB x" instruction (x stands for the block number). The
integrated FBs cannot be deleted.
Table 9-5. Overview of Integrated Function Blocks
FB
Function
No.

Code converter

FB240
BCD Fixed-point
Code converter
FB241
Fixed-point BCD
Multiplication of
FB242
two fixed-point
numbers
Division of two
FB243
fixed-point nos.
Read analog
FB250
value
Output analog
FB251
value
Note
If OB3 or OB13 interrupts an integrated FB and an integrated FB is called up in the
interrupt-driven program included in OB3/OB13, the PLC enters the "STOP" mode
and enters the "SUF" error ID in the ISTACK. To avoid this, write the following in the
interruptable program:
Insert the "IA" operation before the call of the integrated FB;
Insert the "RA" operation after the call of the integrated FB.
9.2.1
Code Converter : B4
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.
Parameter
BCD
SBCD
DUAL
Fixed-point number (KF)
9-20
Call Length
Runtime
in ms
in Words
< 0.6
5
< 1.0
6
< 0.9
7
< 2.1
10
2.4
10
4.8
9
- FB240 -
Table 9-6. Parameter Assignments of FB240
Meaning
BCD number
Sign of the
BCD number
Integrated
Integrated
in S5-90U
in S5-95U
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
Type
Assignment
I W
0 to 9999
"1" for "-"
I BI
"0" for "+"
16 bits "0"
Q W
or "1"
EWA 4NEB 812 6115-02b
S5-90U/S5-95U
Described in
Section
9.2.1
9.2.2
9.2.3
9.2.4
9.2.5
9.2.6
-

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s5-95u

Table of Contents