Arithmetic Blocks - Siemens SIMATIC S5 Manual

Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

S5-115F Manual
6.1.2

Arithmetic Blocks

Use function blocks FB 242 and FB 243 to multiply and divide.
Multiplier: 16
-FB 242-
Use function block FB 242 to multiply one fixed-point binary number (16 bits) by another. The
product is represented by two fixed-point binary numbers (16 bits). The result is also scanned for
zero. An eight-bit number must be changed to a 16-bit word before multiplication.
Call and Parameter Assignment
Parameter
Type
Z1
I
Z2
I
Z3=0
Q
Z32
Q
Z31
Q
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 changed to a 16-bit
word before division.
EWA 4NEB 811 6149-02
Data
Assignment
Type
W
-32768 to +32767
W
-32768 to +32767
Bi
"1" if the product
is zero
W
16 bits
W
16 bits
Meaning
Multiplier
Multiplicand
Name : MUL : 16
Z1
Scan for
zero
Z2
Z3=0
Product
high word
Z32
Z31
Product
low word
Blocks
STL
: JU FB 242
:
:
:
:
:
6-3

Advertisement

Table of Contents
loading

This manual is also suitable for:

S5-115f

Table of Contents