Siemens SIMATIC S5-95F Manual page 268

Table of Contents

Advertisement

Blocks and Their Functions
9.2
Integrated Function Blocks (FBs)
The S5-95F has integrated function blocks. Function blocks FB240 to FB243 and FB252 and FB
255 are failsafe, function blocks FB250 and FB251 are reaction-free. These blocks can be called in
the control program with the commands "JU FB x" or "JC FB x", with x standing for the block
number.
Overview:
Block No.
FB240
Block name
COD:B4
Call length
5
(in words)
Runtime
(in ms)
<0.6
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.
Table 9-6. Calling and Parameter Assignments of FB240
Parameter
BCD
SBCD
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
An eight-bit binary number must be transferred to a 16-bit word before conversion.
Table 9-7. Calling and Parameter Assignments of FB241
Parameter
DUAL
SBCD
Sign of the BCD number
BCD2
BCD no. 4th and 5th tetrads
BCD1
BCD number tetrads 0 to 3
9-14
FB241
FB242
COD:16
MUL:16
6
7
<1.0
<0.9
- FB240 -
Meaning
Type
BCD number
I W
Sign of the
I BI
BCD number
Q W
- FB 241-
.
Meaning
Type
Binary number
Q BY
Q W
FB243
FB250
DIV:16
RLG:AE
10
10
<2.1
2.4
Assignment
0 to 9999
-
"1" for "-"
"0" for "+"
16 bits "0"
or "1"
Assignment
I W
- 32768 to +32767
Q BI
"1" for "-"
"0" for "+"
2 tetrads
4 tetrads
FB251
FB252
FB255
RLG:AA
AGF:TEST AGF:DEPA
9
8
5
4.8
Tab. 9-11
5 to 20
STL
: JU FB 240
NAME
: COD:B4
BCD
:
SBCD
:
DUAL
:
STL
: JU FB 241
NAME
: COD:16
DUAL
:
SBCD
:
BCD2
:
BCD1
:
EWA 4NEB 812 6210-02
S5-95F

Advertisement

Table of Contents
loading

Table of Contents