Set Carry: Stc(078); Clear Carry: Clc(079); Bcd Add: Add(070) - Omron SYSMAC CV Series Operation Manual

Ladder diagrams
Hide thumbs Also See for SYSMAC CV Series:
Table of Contents

Advertisement

BCD Calculation Instructions

5-18-1 SET CARRY: STC(078)

Ladder Symbol

5-18-2 CLEAR CARRY: CLC(079)

Ladder Symbol

5-18-3 BCD ADD: ADD(070)

Ladder Symbol
(070)
ADD
Au
Variations
j ADD(070)
Description
Precautions
Flags
250
(078)
STC
When the execution condition is OFF, STC(078) is not executed. When the
execution condition is ON, STC(078) turns ON CY (A50004).
(079)
CLC
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.
Version-2 CVM1 CPUs supports add, subtract, and rotation shift instructions
that do not use the carry flag in their operations. These instructions do not re-
quire STC(078) and CLC(079), and reduce the number of program steps that
are needed.
Ad
R
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
Note With version-2 CVM1 CPUs, mathematics instructions can use symbols. The
instructions corresponding to ADD(070) and ADDL(074) are +BC(406) and
+BCL(407).
Au and Ad must be BCD.
Note Refer to page 115 for general precautions on operand data areas.
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.
Variations
j STC(078)
Variations
j CLC(078)
Operand Data Areas
Au: Augend word
CIO, G, A, T, C, #, DM, DR, IR
Ad: Addend word
CIO, G, A, T, C, #, DM, DR, IR
R: Result word
CIO, G, A, DM, DR, IR
CY
R
Section 5-18

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cv2000Cvm1Cv500Cv1000

Table of Contents