Siemens SIMATIC S5 Manual page 127

Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

S5-115F Manual
Processing an arithmetic operation
Before an arithmetic operation is executed, both operands must be loaded into the accumulators.
Note
When using arithmetic operations, make sure the operands have the same number
format.
Arithmetic operations are executed independently of the RLO. The result is available in ACCUM 1
for further processing. The contents of ACCUM 2 are not changed. These operations do not affect
the RLO. The condition codes are set according to the results.
STL
L
C 3
L
C 1
+ F
T
QW 12
876
+
668
=
1544
EWA 4NEB 811 6149-02
The value of counter 3 is loaded into ACCUM 1.
The value of counter 1 is loaded into ACCUM 1. The previous contents of
ACCUM 1 are shifted to ACCUM 2.
The contents of the two accumulators are interpreted as 16-bit fixed-point
numbers and added.
The result, contents of ACCUM 1, is transferred to output word QW 12.
Numeric Example
15
0 0 0 0 0 0 1 1 0 1 1 0 1 1 0 0
0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0
0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0
Explanation
0
ACCUM 2
+ F
ACCUM 1
ACCUM 1
STEP 5 Operations
3-31

Advertisement

Table of Contents
loading

This manual is also suitable for:

S5-115f

Table of Contents