Omron SYSMAC CS Series Instruction & Reference Manual page 303

Hide thumbs Also See for SYSMAC CS Series:
Table of Contents

Advertisement

Flags
Name
Error Flag
ER
Equals Flag
=
Carry Flag
CY
Overflow Flag
OF
Underflow Flag
UF
Negative Flag
N
Function
 +C
+C(402) adds the binary values in Au, Ad, and CY and outputs the result to R.
 +CL
+CL(403) adds the binary values in Au and Au+1, Ad and Ad+1, and CY and outputs the result to R.
Hint
• To clear the Carry Flag (CY), execute the Clear Carry (CLC(041)) instruction.
Example Programming
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Label
OFF
• ON when the addition result is 0.
• OFF in all other cases.
• ON when the addition results in a carry.
• OFF in all other cases.
• ON when the addition result of adding two positive
numbers and CY is in the range 8000 to FFFF
hex.
• OFF in all other cases.
• ON when the addition result of adding two nega-
tive numbers and CY is in the range 0000 to 7FFF
hex.
• OFF in all other cases.
• ON when the leftmost bit of the result is 1.
• OFF in all other cases.
Au
Ad
+
CY will turn ON
CY
R
when there is a
carry.
Au+1
Ad+1
+
CY will turn ON
CY
R+1
when there is a
carry.
0.00
When CIO 0.00 is ON, D200, D210, and CY will be added as
+C
4-digit signed binary values and the result will be output to
D200
D220.
D210
D220
0.00
When CIO 0.00 is ON, D201, D200, D211, D210, and CY will
+CL
be added as 8-digit signed binary values, and the result will
D200
be output to D221 and D220.
D210
D220
Operation
+C
OFF
• ON when the result is 0.
• OFF in all other cases.
• ON when the results in a carry.
• OFF in all other cases.
• ON when the result of adding two positive num-
bers and CY is in the range 80000000 to
FFFFFFFF hex.
• OFF in all other cases.
• ON when the result of adding two negative num-
bers and CY is in the range 00000000 to
7FFFFFFF hex.
• OFF in all other cases.
• ON when the leftmost bit of the result is 1.
• OFF in all other cases.
(Signed binary)
(Signed binary)
CY
(Signed binary)
Au
(Signed binary)
(Signed binary)
Ad
CY
R
(Signed binary)
3. Instructions
+CL
3
269

Advertisement

Table of Contents
loading

Table of Contents