Set Carry - Stc(40); Clear Carry - Clc(41); Bcd Add - Add(30); Bcd Calculations - Omron SYSMAC C200HS Operation Manual

Programmable controllers
Hide thumbs Also See for SYSMAC C200HS:
Table of Contents

Advertisement

BCD Calculations

5-19-3 SET CARRY – STC(40)
5-19-4 CLEAR CARRY – CLC(41)
5-19-5 BCD ADD – ADD(30)
Description
Flags
When the execution condition is OFF, STC(40) is not executed.When the execu-
tion condition is ON, STC(40) turns ON CY (SR 25504).
Note Refer to Appendix C Error and Arithmetic Flag Operation for a table listing the
instructions that affect CY.
When the execution condition is OFF, CLC(41) is not executed.When the execu-
tion condition is ON, CLC(41) turns OFF CY (SR 25504).
CLEAR CARRY is used to reset (turn OFF) CY (SR 25504) to "0".
CY is automatically reset to "0" when END(01) is executed at the end of each
cycle.
Note Refer to Appendix C Error and Arithmetic Flag Operation for a table listing the
instructions that affect CY.
Ladder Symbols
ADD(30)
Au
Ad
R
When the execution condition is OFF, ADD(30) is not executed. When the exe-
cution condition is ON, ADD(30) 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
ER:
Au and/or Ad is not BCD.
Indirectly addressed DM word is non-existent. (Content of ∗DM word is
not BCD, or the DM area boundary has been exceeded.)
CY:
ON when there is a carry in the result.
EQ:
ON when the result is 0.
Ladder Symbols
STC(40)
Ladder Symbols
CLC(41)
@ADD(30)
Au
Ad
R
CY
Section 5-19
@STC(40)
@CLC(41)
Operand Data Areas
Au: Augend word (BCD)
IR, SR, AR, DM, HR, TC, LR, #
Ad: Addend word (BCD)
IR, SR, AR, DM, HR, TC, LR, #
R: Result word
IR, SR, AR, DM, HR, LR
R
205

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents