Omron CPM1 - PROGRAMING MANUAL 02-2001 Programming Manual page 461

Hide thumbs Also See for CPM1 - PROGRAMING MANUAL 02-2001:
Table of Contents

Advertisement

Conversion Instructions
Flags
Example
00000
S: DM 0020
DM 0020
00
DM 0020
01
DM 0020
02
DM 0020
03
DM 0020
04
1
DM 0020
05
1
DM 0020
06
1
DM 0020
07
1
DM 0020
08
0
DM 0020
09
1
DM 0020
10
1
DM 0020
11
0
DM 0020
12
0
DM 0020
13
0
DM 0020
14
0
DM 0020
15
0
Some example Di values and the digit-to-word conversions that they produce
are shown below.
Di: 0010
S
0
1
2
3
Di: 0031
S
0
1
2
3
ER:
Undefined digit designator, or R plus number of digits exceeds a data
area.
Indirectly addressed DM word is non-existent. (Content of *DM word is
not BCD or the DM area boundary has been exceeded.)
The following program converts digits 1 to 3 of data from DM 0020 to bit positions
and turns ON the corresponding bits in three consecutive words starting with HR
10. Digit 0 is not converted.
R: HR 10
HR 1000
Not
HR 1001
Converted
HR 1002
HR 1003
HR 1004
15
HR 1005
HR 1006
HR 1007
HR 1008
6
HR 1009
HR 1010
HR 1011
HR 1012
0
HR 1013
HR 1014
HR 1015
R
R + 1
R
R + 1
R + 2
R + 3
Address
MLPX(76)
00000
DM 0020
00001
#0021
HR 10
R+1: HR 11
0
HR 1100
0
HR 1101
0
HR 1102
0
HR 1103
0
HR 1104
0
HR 1105
0
HR 1106
0
HR 1107
0
HR 1108
0
HR 1109
0
HR 1110
0
HR 1111
0
HR 1112
0
HR 1113
0
HR 1114
1
HR 1115
Section
Di: 0030
S
R
0
R + 1
1
R + 2
2
R + 3
3
Di: 0023
S
R
0
R + 1
1
R + 2
2
3
Instruction
Operands
LD
MLPX(76)
DM
#
HR
R+2: HR 12
0
HR 1200
0
HR 1201
0
HR 1202
0
HR 1203
0
HR 1204
0
HR 1205
1
HR 1206
0
HR 1207
0
HR 1208
0
HR 1209
0
HR 1210
0
HR 1211
0
HR 1212
0
HR 1213
0
HR 1214
0
HR 1215
7-20
00000
0020
0021
10
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
443

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CPM1 - PROGRAMING MANUAL 02-2001 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents