![Omron CVM1D Operation Manual Download Page 243](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532243.webp)
238
5-18-1 SET CARRY: STC(078)
(078)
STC
Variations
j
STC(078)
Ladder Symbol
When the execution condition is OFF, STC(078) is not executed. When the
execution condition is ON, STC(078) turns ON CY (A50004).
5-18-2 CLEAR CARRY: CLC(079)
(079)
CLC
Variations
j
CLC(078)
Ladder Symbol
When the execution condition is OFF, CLC(079) is not executed. When the
execution condition is ON, CLC(079) turns OFF CY (A50004).
ADD(070), ADDL(074), ADB(080), ADBL(084), SUB(0710), SUBL(075),
SBB(081), and SBBL(085) all make use of the carry flag in their calculations.
When using any of these instructions, use CLC(079) to clear the carry flag in or-
der to avoid having the calculations affected by previous instructions.
ROL(062), ROLL(066), ROR(063), and RORL(067) make use of the carry flag in
their rotation shift operations. When using any of these instructions, use
STC(078) and CLC(079) to set and clear the carry flag.
CVM1D CPUs support add, subtract, and rotation shift instructions that do not
use the carry flag in their operations. These instructions do not require STC(078)
and CLC(079), and reduce the number of program steps that are needed.
5-18-3 BCD ADD: ADD(070)
Variations
j
ADD(070)
(070)
ADD
Au
Ad
R
Operand Data Areas
Ladder Symbol
Au: Augend word
CIO, G, A, T, C, #, DM, DR, IR
R: Result word
CIO, G, A, DM, DR, IR
Ad: Addend word
CIO, G, A, T, C, #, DM, DR, IR
When the execution condition is OFF, ADD(070) is not executed. When the
execution condition is ON, ADD(070) adds the contents of Au, Ad, and CY, and
places the result in R. CY will be set if the result is greater than 9999.
Au + Ad + CY
CY
R
Note An equivalent symbol math instruction (+BC(406)) is also available.
Au and Ad must be BCD.
Note Refer to page 101 for general precautions on operand data areas.
Flags
ER (A50003):
Content of Au or Ad is not BCD.
The content of a
*
DM word is not BCD when set for BCD.
CY (A50004):
There is a carry in the result.
EQ (A50006):
The result is 0.
Description
Precautions
BCD Calculation Instructions
Section 5-18
Summary of Contents for CVM1D
Page 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Page 463: ...iv...
Page 465: ...vi...