Siemens SIMATIC S5-100U System Manual page 228

Simatic s5 series cpu 100/102/103
Hide thumbs Also See for SIMATIC S5-100U:
Table of Contents

Advertisement

STEP 5 Operations
Condition Code Generation for Digital Logic Operations
Digital logic operations set CC 0 and CC 1. They do not affect the overflow condition code (see
Table 8-32). The setting depends on the contents of the ACCU after the operation has been pro-
cessed.
Table 8-32. Condition Code Settings for Digital Logic Operations
Contents
of the
ACCU
Zero (KH = 0000)
Not zero
Condition Code Generation for Shift Operations
Execution of shift operations sets CC 0 and CC 1. It does not affect the overflow condition code
(see Table 8-33). Code setting depends on the state of the last bit shifted out.
Table 8-33. Condition Code Settings for Shift Operations
Value of
the Last Bit
Shifted Out
"0"
"1"
Condition Code Generation for Conversion Operations
The formation of the two's complement (CSW) sets all condition codes (see Table 8-34). The state
of the condition codes is based on the result of the conversion function.
Table 8-34. Condition Code Settings for Conversion Operations
Result after
Arithmetic Operation
is Executed
- 32768 *
- 32767 to - 1
0
+1 to +32767
*
This number is the result of the conversion of KH = 8000.
8-70
Condition Codes
CC 1
CC 0
0
0
1
0
Condition Codes
CC 1
CC 0
0
0
1
0
Condition Codes
CC 1
CC 0
0
1
0
1
0
0
1
0
Possible
Jump Operations
OV
JZ
JN, JP
Possible
Jump Operations
OV
JZ
JN, JP
Possible
Jump Operations
OV
1
JN, JM, JO
0
JN, JM
0
JZ
0
JN, JP
EWA 4NEB 812 6120-02b
S5-100U

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents