3. Instructions
396
CS/CJ/NSJ Series Instructions Reference Manual (W474)
DMPX
Applicable Program Areas
Operands
z 16-to-4 bit conversion
C: Control Word
Instruction Mnemonic Variations
Function
code
Function
DATA ENCODER DMPX @DMPX 077
Finds the location of the first or last ON bit within
the source word with 16-to-4 conversion (or 256-
to-8 conversion), and writes that value to the spec-
ified digit (or byte) in the result word.
Symbol
DMPX
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or
transition programs
Usage OK OK OK OK OK OK
Operand Description Data type Size
S First source word UINT Variable
R Result word UINT 1
C Control word UINT 1
S: First Source Word
S: 1st digit of digits to be encoded
S+1: 2nd digit of digits to be encoded
S+2: 3rd digit of digits to be encoded
S+3: 4th digit of digits to be encoded
R: Result Word
Note The source words must be in the same data
area.
S: First source word
R: Result word
C: Control word
DMPX(077)
S
R
C
R Digit 3 Digit 2
8
111215
Digit 1 Digit 0
03
47
The results of encoding of S to S+3 are
stored from the starting digit going left
(returns to digit 0 after digit 3).
C0
Specifies the first digit/byte to receive converted data.
0 to 3 (digit 0 to 3)
Number of digits/bytes to be converted
0 to 3 (1 to 4 digits)
8
111215
ln
03
47
Bit to encode
0: Leftmost bit (highest bit address)
1: Rightmost bit (lowest bit address)
Conversion process
0: 16-to-4 bits (word to digit)