Siemens SIMATIC S5-100U System Manual page 190

Simatic s5 series cpu 100/102/103
Hide thumbs Also See for SIMATIC 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
The value of counter 3 is loaded into ACCU 1.
L
C 3
The value of counter 1 is loaded into ACCU 1. The previous contents of
L
C 1
ACCU 1 are shifted to ACCU 2.
The contents of the two accumulators are interpreted as 16-bit fixed-point
+ F
numbers and added.
The result, contents of ACCU 1, is transferred to output word QW12.
T
QW12
876
+
668
=
1544
8-32
Explanation
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
0
ACCU 2
+ F
ACCU 1
ACCU 1
EWA 4NEB 812 6120-02b
S5-100U

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents