Siemens SIMATIC S5 Manual page 166

Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

STEP 5 Operations
Condition code generation for comparison operations
Execution of comparison operations sets condition codes CC 0 and CC 1 ( Table 3-30). The
overflow condition code is not affected. However, comparison operations affect the RLO. When a
comparison is satisfied, the RLO is 1. Consequently, the conditional jump operation "JC" can also
be used after a comparison operation.
Table 3-30. Condition Code Settings for Comparison Operations
Contents of ACCUM 2 as
compared to contents
of ACCUM 1
Equal to
Less than
Greater than
Condition code generation for arithmetic operations
Execution of arithmetic operations sets all condition codes according to the result of the arith-
metic operation ( Table 3-31).
Table 3-31. Condition Code Settings for Fixed-Point Arithmetic Operations
Result after
arithmetic operation
is executed
< - 32768
- 32768 to - 1
0
+1 to +32767
> +32767
(-) 65536
*
* This number is the result of the calculation -32768 - 32768
Conditon code generation for digital logic operations
Digital logic operations set CC 0 and CC 1. They do not affect the overflow condition code
( Table 3-32). The setting depends on the contents of the ACCUM after the operation has been
processed.
Table 3-32. Condition Code Settings for Digital Logic Operations
Value of
the last bit
shifted out
Zero (KH = 0000)
Not zero
3-70
Condition codes
CC 1
CC 0
0
0
0
1
1
0
Condition codes
CC 1
CC 0
1
0
0
1
0
0
1
0
0
1
0
0
Condition codes
CC 1
CC 0
0
0
1
0
Possible
jump operations
OV
JZ
JN, JM
JN, JP
Possible
jump operations
OV
1
JN, JP, JO
0
JN, JM
0
JZ
0
JN, JP
1
JN, JM, JO
1
JZ, JO
Possible
jump operations
OV
JZ
JN, JP
EWA 4NEB 811 6149-02
S5-115F Manual

Advertisement

Table of Contents
loading

This manual is also suitable for:

S5-115f

Table of Contents