Omron CP1E-N@@D@-@ Computer Hardware User Manual


 
2 Instructions
2-194
CP1E CPU Unit Instructions Reference Manual(W483)
Sample program
4-to-16 bit Conversion
When CIO 0.00 is ON in the following example, MLPX(076) will convert 3 digits in S beginning with digit
1 (the second digit), as indicated by C (#0021). The corresponding bits in D100, D101, and D102 will be
turned ON.
8-to-256 bit Conversion
When CIO 0.00 is ON in the following example, MLPX(076) will convert the 2 bytes in S beginning with
byte 1 (the leftmost byte), as indicated by C (#1011). The corresponding bits in D100 to D115 and D116
to D131 will be turned ON.
1
1
1
MLPX
100
#0021
D100
0.00
S
C
R
01234567891514 131211
0347815 12 11
10
0123
6AF
1200
C: #
S: 100
Digits
R: D100
D101
D102
Bits 0 to 3: Starting digit (Digit 1)
Bits 4 to 7: Number of digits (3 digits)
Digit 1 contains 6, so bit 6 is turned ON.
Digit 2 contains A, so bit 10 is turned ON.
Digit 3 contains F, so bit 15 is turned ON.
Byte 1 contains 2D, so bit 13 (D)
of R+2 is turned ON.
Byte 0 contains 1A, so bit 10 (A)
of R+1 is turned ON.
Bits 0 to 3: Starting byte (Byte 1)
Bits 4 to 7: Number of bytes (2 bytes)
MLPX
100
#1011
D100
0.00
S
C
R
1
R: D100
D101
D102
D103
D115
D116
D117
D118
D131
01234567891514131211
0347815 1211
10
S: 100
Byte 0Byte 1
A1D2
C: #
1101
1