Omron C200HG Manuel D’Utilisation

Page de 564
214
256-bit to 8-bit Encoder
DMPX(77) operates as a 256-bit to 8-bit encoder when the leftmost digit of C is
set to 1.
When the execution condition is OFF, DMPX(77) is not executed. When the
execution condition is ON, DMPX(77) determines the position of the highest
(leftmost) ON bit in the group of 16 source words from S to S+15 or S+16 to
S+31, encodes it into a two-digit hexadecimal value corresponding to the loca-
tion of the bit among the 256 bits in the group, then transfers the hexadecimal
value to the specified byte in R. The byte to receive the result is specified in C,
which also specifies the number of bytes to be encoded.
Control Word
The digits of C are set as shown below. Set the leftmost digit of C to 1 to specify
256-bit to 8-bit decoding.
Specifies the first byte in R to receive converted data (0 or 1).
0: Rightmost byte
1: Leftmost byte
Number of bytes to be encoded (0 or 1).
0: 1 byte
1: 2 bytes
Not used. Set to 0.
A value of 1 specifies 256-bit to 8-bit encoding.
Digit number:
3 2 1 0
Three possible C values and the conversions that they produce are shown be-
low. (In R, 0 indicates the rightmost byte and 1 indicates the leftmost byte.)
0
1
R
C: 1000
C: 1010
C: 1011
S to S+15
S+16 to S+31
0
1
R
S to S+15
S+16 to S+31
0
1
R
S to S+15
S+16 to S+31
The following is an example of a one-byte encode operation to the rightmost byte
of R (C would be 1000 in this case).
    .     .     .
S+14
Bit 
15
Bit 
00
0 1 0
0 1 1
S+15
Bit 
15
Bit 
00
0 0
1 1 0
1 1 1
0 1 1
0 0 0
Result word
F
B
1
    .     .     .
    .     .     .
S
Bit 
15
Bit 
00
0 0 0
1 1
1 1
Bit FB (bit 251 of 0 to 255) is the highest ON bit of the
16-word group, so FB is written to the rightmost bit of R.
Flags
ER:
Undefined control word.
The source words are not all in the same data area.
Content of the source words is zero. (There isn’t an ON bit in the source
words.)
Indirectly addressed DM word is non-existent. (Content of 
DM word is
not BCD, or the DM area boundary has been exceeded.)
Data Conversion
Section 5-18