Siemens SIMATIC S5-95F Manual page 269

Table of Contents

Advertisement

S5-95F
9.2.3
Multiplier : 16
Use function block FB 242 to multiply one fixed-point binary number (16 bits) by another
The product is represented by a fixed-point binary number (32 bits)
The result is also scanned for zero. An eight-bit number must be transferred to a 16-bit word prior to
multiplication.
Table 9-8. Calling and Parameter Assignments of FB242
Parameter
Z1
Z2
Z3=0
Z32
Z31
9.2.4
Divider : 16
Use function block FB 243 to divide one fixed-point binary number (16 bits) by another
(quotient and remainder) is represented by two fixed-point binary numbers (16 bits each).
The divisor and the result are also scanned for zero
16-bit word prior to division.
Table 9-9. Calling and Parameter Assignments of FB243
Parameter
Z1
Z2
OV
FEH
Z3=0
Z4=0
Z3
Z4
EWA 4NEB 812 6210-02
- FB242 -
Meaning
Type
Multiplier
Multiplicand
Scan for zero
Product high-word
Product low-word
- FB243 -
Meaning
Type
Dividend
Divisor
Overflow bit
Scan for zero
Scan for zero
Quotient
Remainder
Assignment
I W
- 32768 to+32767
I W
- 32768 to+32767
Q BI
"1" if the product is zero
Q W
16 bits
Q W
16 bits
.
An eight-bit number must be transferred to a
Assignment
I W
- 32768 to+32767
I W
- 32768 to+32767
Q BI
"1" if overflow
Q BI
"1" for division by zero
Q BI
"1" : quotient is zero
Q BI
"1" : remainder is zero
Q W
16 bits
Q W
16 bits
Blocks and Their Functions
.
.
STL
: JU FB 242
NAME
: MUL:16
Z1
:
Z2
:
Z3=0
:
Z32
:
Z31
:
STL
: JU FB 243
NAME
: DIV:16
Z1
:
Z2
:
OV
:
FEH
:
Z3=0
:
Z4=0
:
Z3
:
Z4
:
.
The result
9-15

Advertisement

Table of Contents
loading

Table of Contents