Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 380

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

Flags
Name
Error Flag
ER
Equals Flag
=
Carry Flag
CY
Overflow Flag
OF
Underflow Flag
UF
Negative Flag
N
Function
+
+(400) adds the binary values in Au and Ad and outputs the result to R.
+L
+L(401) adds the binary values in Au and Au+1 and Ad and Ad+1 and outputs the result to R.
Sample program
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Label
OFF
• ON when the result is 0.
• OFF in all other cases.
• ON when the addition results in a carry.
• OFF in all other cases.
• ON when the result of adding two positive num-
bers is in the range 8000 to FFFF hex.
• OFF in all other cases.
• ON when the result of adding two negative num-
bers 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 in this example, D100 and D110 will be
added as 4-digit signed binary values and the result will be output
D100
to D120.
D110
D120
0.00
+L
When CIO 0.00 is ON, D101 and D100 and D111 and D110 will
be added as 8-digit signed binary values and the result will be
D100
output to D121 and D120.
D110
D120
Operation
+
OFF
• ON when the result is 0.
• OFF in all other cases.
• ON when the addition results in a carry.
• OFF in all other cases.
• ON when the result of adding two positive num-
bers is in the range 80000000 to FFFFFFFF hex.
• OFF in all other cases.
• ON when the result of adding two negative num-
bers 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)
(Signed binary)
(Signed binary)
Au
(Signed binary)
Ad
(Signed binary)
R
3. Instructions
+L
3
343

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?

Questions and answers

Table of Contents