Arithmetic Operations - Siemens SIMATIC S5-115U User Manual

Simatic s5 series cpu 941-7ub11 cpu 942-7ub11 cpu 943-7ub11 and cpu 943-7ub21 cpu 944-7ub11 and cpu 944-7ub21
Table of Contents

Advertisement

S5-115U Manual
Example: The values of input bytes IB 19 and IB 20 are compared. If they are equal, output Q 3.0
is set.
Circuit Diagram
IB 19
IB 20
C 1
C 2
=
Q 3.0
8.1.7

Arithmetic Operations

Arithmetic operations interpret the contents of the accumulators as fixed-point numbers and
manipulate them. The result is stored in ACCUM 1. Table 8-7 provides an overview of the
arithmetic operations. An example follows the table. The S5-115U has integrated function blocks
for multiplication and division.
Operation
Operand
+ F
- F
The S5-115U has integrated function blocks for multiplication and division.
EWA 4NEB 811 6130-02b
STL
L
IB
19
L
IB
20
!=F
=
Q
3.0
Table 8-7. Overview of Arithmetic Operations
Addition
The contents of both accumulators are added.
Subtraction
The contents of ACCUM 1 are subtracted from the contents of
ACCUM 2.
STEP 5 Operations
CSF/LAD
C 1
F
IB 19
!=
C 2
Q
IB 20
Meaning
Q 3.0
8-31

Advertisement

Table of Contents
loading

Table of Contents