![background image](http://html.mh-extra.com/html/omron/sysmac-c20k/sysmac-c20k_operation-manual_1633423190.webp)
Appendix B
Programming Instructions and Execution Times
179
Name
Mnemonic
Operands
Function
Symbol
BINARY-TO-BCD
BCD(24)
BCD(24)
S
R
Converts binary data in source word (S)
into BCD, and outputs converted data to
result word (R).
x16
0
x16
1
x16
2
x16
3
x10
1
x10
2
x10
3
S R
(
BIN) (BCD
)
x10
0
S:
IR
SR
HR
DM
R:
IR
HR
DM
BCD ADD
ADD(30)
ADD(30)
Au
Ad
R
CY CY
Adds two four-digit BCD values (Au
and Ad) and content of CY, and out-
puts result to specified result word (R).
Au + Ad +
R
Au/Ad
IR
SR
HR
TC
DM
#
R:
IR
HR
DM
BCD SUBTRACT
SUB(31)
SUB(31)
Mi
Su
R
Subtracts both four-digit BCD subtra-
hend (Su) and content of CY from
four-digit BCD minuend (Mi) and out-
puts result to specified result word (R).
CY CY
Mi - Su
R
Mi/Su:
IR
SR
HR
TC
DM
#
R:
IR
HR
DM
BCD MULTIPLY
MUL(32)
MUL(32)
Md
Mr
R
Multiplies a words data or a four-digit
BCD value(Md) and another words
data (Mr) and outputs the result to a
specified result word (R).
Md X Mr
R
R + 1
Md/Mr
IR
SR
HR
TC
DM
#
R:
IR
HR
DM
BCD DIVIDE
DIV(33)
DIV(33)
Dd
Dr
R
Divides a words data or a four-digit
BCD dividend (Dd) and another words
data (Dr) and outputs result to speci-
fied result word (R).
R
R + 1
Dd/Dr:
IR
SR
HR
TC
DM
#
R:
IR
HR
DM
SET CARRY
STC(40)
STC(40)
Sets carry flag (i.e., turns CY ON).
None
CLEAR CARRY
CLC(41)
CLC(41)
CLC clears carry flag (i.e, turns CY
OFF).
None
REVERSIBLE
DRUM COUNTER
RDM(60)
RDM(60)
D
High-speed UP-DOWN counter opera-
tion.
D:
IR
HR
DM
HIGH-SPEED
DRUM COUNTER
HDM(61)
HDM(61)
D
A 2-kHz counter with both software
and hardware resets.
D:
IR
HR
DM
Refer to table at beginning of Appendix B for page references.
Summary of Contents for SYSMAC C20K
Page 1: ...Cat No W146 E1 5 Programmable Controllers SYSMAC C20K C28K C40K C60K ...
Page 2: ...K type Programmable Controllers OPERATION MANUAL Revised July 1999 ...
Page 3: ...iv ...
Page 5: ...vi ...
Page 19: ...7 SECTION 2 Hardware Considerations 2 1 Introduction 2 2 Indicators 2 3 PC Configuration ...