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