Multiplier : 16 - Fb242 - - Siemens SIMATIC S5-100U System Manual

Simatic s5 series cpu 100/102/103
Hide thumbs Also See for SIMATIC 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
Multiplicand
Z3=0
Scan for zero
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
Explanation
Z1
Z2
OV
Overflow bit
FEH
Z3=0
Scan for zero
Z4=0
Scan for zero
Z3
Z4
Remainder
EWA 4NEB 812 6120-02b
Meaning
Type
Multiplier
W
I
W
I
Q BI
Q W
Q W
- FB243 -
Type
Dividend
I W
Divisor
I W
Q BI
Q BI
Q BI
Q BI
Quotient
Q W
Q W
Integrated Blocks and Their Functions
.
The result is also scanned for
Assignment
-32768 to+32767
-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-
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

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents