Arithmetic Operations - Siemens SIMATIC S5 Manual

Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

STEP 5 Operations
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
3.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 3-7 provides an overview of the arith-
metic operations. An example follows the table.
Operation
Operand
+ F
- F
The S5-115F has integrated function blocks for multiplication and division.
3-30
STL
L
IB
L
IB
!=F
=
Q
Table 3-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.
Method of representation: only STL possible
19
20
IB 19
3.0
IB 20
Meaning
S5-115F Manual
CSF/LAD
C 1
F
!=
C 2
Q
Q 3.0
EWA 4NEB 811 6149-02

Advertisement

Table of Contents
loading

This manual is also suitable for:

S5-115f

Table of Contents