5-16 Bcd Calculations - Omron SYSMAC C20P Operation Manual

Sysmac programmable controllers
Hide thumbs Also See for SYSMAC C20P:
Table of Contents

Advertisement

BCD Calculations
Flags
Example
5–16 BCD Calculations
Di : 0011
R
0
S
1
S + 1
2
3
Di : 0013
R
0
S
1
S + 1
2
3
ER:
Undefined digit designator, or S plus number of digits exceeds a data
area.
Content of a source word is 0000.
When 0000 is ON, the following diagram encodes IR words 10 and 11 to the
first two digits of HR 2 and then encodes DM 10 and 11 to the last two digits
of HR 2. Although the status of each source word bit is not shown, it is as-
sumed that the bit with status 1 (ON) shown is the highest bit that is ON in
the word.
0000
IR 010
1000
1100
:
1011
1
1109
1012
0
1110
:
:
1015
0
1115
DM 10
DM1000
DM1100
:
DM1001 1
DM1108 1
DM1002 0
DM1109 0
:
:
DM1015 0
DM1115 0
The BCD calculation instructions perform mathematic operations on BCD
data.
Di : 0030
S
S + 1
S + 2
S + 3
Di : 0032
S
S + 1
S + 2
S + 3
IR 011
:
1
0
:
:
HR 2
0
Digit 0
Digit 1
DM 11
Digit 2
Digit 3
:
:
:
Section 5–16
R
0
1
2
3
R
0
1
2
3
DMPX(77)
10
HR 2
#0010
DMPX(77)
DM10
HR 2
#0012
B
9
1
8
89

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac c28pSysmac c40pSysmac c60p

Table of Contents