4-To-16 Decoder - Mlpx(76) - Omron CPM1 Programming Manual

Hide thumbs Also See for CPM1:
Table of Contents

Advertisement

Conversion Instructions
Description
Flags
5-19-5 4-TO-16 DECODER – MLPX(76)
Limitations
Description
BCDL(59) converts the 32-bit binary content of S and S+1 into eight digits of
BCD data, and outputs the converted data to R and R+1.
ER:
Content of R and R+1 exceeds 99999999.
Indirectly addressed DM word is non-existent. (Content of *DM word
is not BCD, or the DM area boundary has been exceeded.)
EQ:
ON when the result is zero.
Ladder Symbols
MLPX(76)
@MLPX(76)
S
Di
R
The rightmost two digits of Di must each be between 0 and 3.
All result words must be in the same data area.
DM 6144 to DM 6655 cannot be used for R.
When the execution condition is OFF, MLPX(76) is not executed. When the
execution condition is ON, MLPX(76) converts up to four, four-bit hexadecimal
digits from S into decimal values from 0 to 15, each of which is used to indi-
cate a bit position. The bit whose number corresponds to each converted
value is then turned ON in a result word. If more than one digit is specified,
then one bit will be turned ON in each of consecutive words beginning with R.
(See examples, below.)
The following is an example of a one-digit decode operation from digit number
1 of S, i.e., here Di would be 0001.
Source word
0
0
0
The first digit and the number of digits to be converted are designated in Di. If
more digits are designated than remain in S (counting from the designated
S + 1
S
Binary
R + 1
R
BCD
IR, SR, AR, DM, HR, TC, LR
S
IR, SR, AR, DM, HR, TC, LR, #
Di
R
C
Bit C (i.e., bit number 12) turned ON.
First result word
1
0
0
0
0
0
0
0
Section 5-19
Operand Data Areas
S: Source word
Di: Digit designator
R: First result word
IR, SR, AR, DM, HR, LR
0
0 0
0
0
261

Advertisement

Table of Contents
loading

Table of Contents