Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 423

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

3. Instructions
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.
0.00
S
100
C
R
D100
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.
0.00
MLPX
S
100
C
#1011
R
D100
386
C: #
Digits
S: 100
R: D100
D101
D102
15
12 11
8
7
C: #
1
0
Byte 1
S: 100
2
D
15 14 13 12 11
10
9
8
7
R: D100
D101
D102
1
D103
D115
D116
D117
1
D118
D131
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.
4
3
0
Bits 0 to 3: Starting byte (Byte 1)
1
1
Bits 4 to 7: Number of bytes (2 bytes)
Byte 0
1
A
6
5
4
3
2
1
0
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.
CS/CJ/NSJ Series Instructions Reference Manual (W474)

Advertisement

Table of Contents
loading

Table of Contents