Arithmetic Operations - Siemens SIMATIC S5-95F Manual

Table of Contents

Advertisement

STEP 5 Operations
Example:
The values of input bytes IB19 and IB20 are compared. If they are equal, output
Q 1.0 is set
Circuit Diagram
IB 19
IB 20
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
Integral function blocks are available for multiplication and division (see section 9.2).
8-30
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
IB 19
1.0
IB 20
Meaning
S5-95F
CSF/LAD
C 1
F
!=
C 2
Q
Q 1.0
EWA 4NEB 812 6210-02

Advertisement

Table of Contents
loading

Table of Contents