Arithmetic Operations - Siemens S5-100U User Manual

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

Advertisement

S5-100U
Example:
The values of input bytes IB19 and IB20 are compared. If they are equal, output
Q 1.0 is set.
Circuit Diagram
IB19
IB20
C 1
C 2
=
Q 1.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 ACCU 1. Table 8-7 provides an overview of the arithmetic
operations. An example follows the table.
Operation
Operand
+ F
- F
CPU 102 and higher have integral function blocks for multiplication and division (see section 9.2).
EWA 4NEB 812 6120-02
STL
L
IB
L
IB
!=F
=
Q
Table 8-7. Overview of Arithmetic Operations
Addition
The contents of both accumulators are added.
Subtraction
The contents of ACCU 1 are subtracted from the contents of
ACCU 2.
19
20
IB19
1.0
IB20
Meaning
STEP 5 Operations
CSF/LAD
C 1
F
!=
C 2
Q
Q 1.0
8-31

Advertisement

Table of Contents
loading

Table of Contents