Multiplier : 16 - Fb242 - - Siemens S5-100U User Manual

Simatic s5 programmable controller
Hide thumbs Also See for S5-100U:
Table of Contents

Advertisement

S5-100U
9.2.3

Multiplier : 16 - FB242 -

Use function block FB 242 to multiply one fixed-point binary number (16 bits) by another
duct is represented by two fixed-point binary numbers (16 bits each)
zero. An eight-bit number must be transferred to a 16-bit word prior to multiplication.
Table 9-4. Call and Parameter Assignments of FB242
Parameter
Z1
Z2
Z3=0
Z32
Product high-word
Z31
Product low-word
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-5. Call and Parameter Assignments of FB243
Parameter
Z1
Z2
OV
FEH
Z3=0
Z4=0
Z3
Z4
EWA 4NEB 812 6120-02
Meaning
Type
Multiplier
I
Multiplicand
I
Scan for zero
Q BI
Q W
Q W
- FB243 -
Explanation
Type
Dividend
I W
Divisor
I W
Overflow bit
Q BI
Q BI
Scan for zero
Q BI
Scan for zero
Q BI
Quotient
Q W
Remainder
Q W
Integrated Blocks and Their Functions
.
Assignment
W
-32768 to+32767
W
-32768 to+32767
"0" : product is zero
16 Bits
16 Bits
.
An eight-bit number must be transferred to a
Assignment
-32768 to+32767
-32768 to+32767
"1" : overflow
"1" : division by zero
"0": quotient is zero
"0": remainder is zero
16 bits
16 bits
.
The pro-
The result is also scanned for
STL
: JU FB242
NAME
: MUL:16
Z1
:
Z2
:
Z3=0
:
Z32
:
Z31
:
.
The result
STL
: JU FB243
NAME
: DIV:16
Z1
:
Z2
:
OV
:
FEH
:
Z3=0
:
Z4=0
:
Z3
:
Z4
:
9-13

Advertisement

Table of Contents
loading

Table of Contents