399
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Conversion Instructions
3
DMPX
Example Programming
z 16-to-4 bit Conversion
When CIO 0.00 is ON in the following example, DMPX(077) will find the leftmost ON bits in CIO 100,
CIO 101, and CIO 102 and write those locations to 3 digits in R beginning with digit 1 (the second digit),
as indicated by C (#0021).
z Example of multi-digit decoding
• Example of 16-to-4 bit decoding
C: #
R: D100
S
R
C
Digits
DMPX(077) finds the
leftmost ON bits.
Starting digit
(Digit 1)
S: 100
100
D100
0.00
101
102
C: #0032
C: #0011 C: #0030 C: #0013
R
R
R
R
Digit 1Digit 3
Digit 1Digit 3
Digit 1Digit 3
Digit 1Digit 3
Digit 2 Digit 0
Digit 2 Digit 0
Digit 2 Digit 0
Digit 2 Digit 0