EasyManuals Logo
Home>Omron>Controller>SYSMAC C200HS

Omron SYSMAC C200HS User Manual

Omron SYSMAC C200HS
503 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #217 background imageLoading...
Page #217 background image
207
Flags 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.
Example When
00000 is ON, the following program adds
two 12-digit numbers, the first
contained in LR 20 through LR 22 and the second in DM 0012. The result is
placed in LR 10 through HR 13. In the second addition (using ADD(30)), any
carry from the first addition is included. The carry from the second addition is
placed
in HR 13 by using @ADB(50) (see
5-20-1 BINAR
Y ADD
– ADB(50)
) with
two all-zero constants to indirectly place the content of CY into HR 13.
@ADDL(54)
LR 20
DM 0010
HR 10
CLC(41)
00000
@ADD(30)
LR 22
DM 0012
HR 12
@ADB(50)
#0000
#0000
HR 13
Address Instruction Operands
00000 LD 00000
00001 CLC(41)
00002 @ADDL(54)
LR 20
DM 0010
HR 10
00003 @ADD(30)
LR 22
DM 0012
HR 12
00004 @ADB(50)
# 0000
# 0000
HR 13
5-19-7 BCD SUBTRACT – SUB(31)
Mi: Minuend word (BCD)
IR, SR, AR, DM, HR, TC, LR, #
Su: Subtrahend word (BCD)
IR, SR, AR, DM, HR, TC, LR, #
Ladder Symbols
Operand Data Areas
R: Result word
IR, SR, AR, DM, HR, LR
SUB(31)
Mi
Su
R
@SUB(31)
Mi
Su
R
Description When
the execution condition is OFF
, SUB(31) is not executed. When the exe
-
cution condition is ON, SUB(31) subtracts the contents of Su and CY from Mi,
and
places the
result in R. If the result is negative, CY is set and the 10’
s comple
-
ment
of the actual result is placed in R. T
o convert the 10’
s complement to the
true result, subtract the content of R from zero (see example below).
Mi – Su – CY CY R
Note The 2’s COMPLEMENT – NEG(––) instruction can be used to convert binary
data only, it cannot be used with BCD data.
BCD Calculations Section 5-19

Table of Contents

Other manuals for Omron SYSMAC C200HS

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron SYSMAC C200HS and is the answer not in the manual?

Omron SYSMAC C200HS Specifications

General IconGeneral
BrandOmron
ModelSYSMAC C200HS
CategoryController
LanguageEnglish

Related product manuals