Omron SYSMAC C20K Operation Manual page 134

K-type programmable controllers
Hide thumbs Also See for SYSMAC C20K:
Table of Contents

Advertisement

BCD Calculations
TR 0
0002
1904
1904
HR 300
5-16-3
BCD MULTIPLY – MUL(32)
Limitations
If CY is not set by executing SUB(31), the result is positive, the second sub-
traction is not performed and HR 300 is not turned ON. HR 300 is pro-
grammed as a self-maintaining bit so that a change in the status of CY will
not turn it OFF when the program is recycled.
CLC(41)
SUB(31)
DM 01
HR 2
CLC(41)
SUB(31)
#0000
HR 2
HR 2
Turned ON to indicate
negative result.
Ladder Symbol
MUL(32)
Md
Mr
R
R and R + 1 must be in the same data area.
First
subtraction
10
Second
subtraction
Address Instruction
0000
LD
HR 300
0001
OUT
0002
CLC(41)
0003
@SUB(31)
0004
AND
0005
CLC(41)
0006
@SUB(31)
0007
LD
0008
AND
0009
OR
0010
OUT
Operand Data Areas
Md : Multiplicand word (BCD)
IR, DM, HR, TC, #
Mr : Multiplier word (BCD)
IR, DM, HR, TC, #
R : First result word (BCD)
Section 5-16
Operands
0002
TR
0
10
DM
01
HR
2
1904
#
0000
HR
2
HR
2
TR
0
1904
HR
300
HR
300
IR, DM, HR
123

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac c40kSysmac c60kSysmac c28k

Table of Contents