Siemens S5-100U User Manual page 187

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

Advertisement

STEP 5 Operations
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 ACCU 1 for
further processing. The contents of ACCU 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
QW12
876
+
668
=
1544
8-32
The value of counter 3 is loaded into ACCU 1.
The value of counter 1 is loaded into ACCU 1. The previous contents of
ACCU 1 are shifted to ACCU 2.
The contents of the two accumulators are interpreted as 16-bit fixed-point
numbers and added.
The result, contents of ACCU 1, is transferred to output word QW12.
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
ACCU 2
+ F
ACCU 1
ACCU 1
S5-100U
EWA 4NEB 812 6120-02

Advertisement

Table of Contents
loading

Table of Contents