16 Decode/Encode; Decode/Encode - Mitsubishi Electric MELSEC-KOJIU Instruction Manual

Table of Contents

Advertisement

rn
5 . EXPLANATION OF PROGRAM
5.4.12 4 -1
6 Decode/encode
Decode means that 4-bit binary numerals are converted into 16-bit pattern. On the contrary,
encode means that 16-bit pattern is converted into 4-bit binary numerals.
The decode function includes transference of converted 16-bit pattern to M, thereby M is used
as control means. With this function, 1-bit in 16 bits is identified, and converted into binary
numerals, thereby significant bit position is found.
The encode function may be used to identify step No. of counter, or shift position in 1-bit shift
register.
5.4.1 2.1 Functions
Function No.: F108
Data to be decoded or encoded:
D110
Decode/encode designation:
D l l l
Decodelencode result:
D112
- 1
Decode
Lower 4 bits are effective and upper 12 bits are ignored
in decoding.
[-1O . ..o]
Encode
Only one "1
"
(H)
bit exists in 16 bits in the case of en-
coding.
T
I
Decode
[
0 0 0 1 1
Encode
1 - 1
Decode
Only one "1" bit exists in 16 bits in the case of decoding.
In encoding, bit ,position i s specified in lower four bits.
Upper digits are filled all with "0".
(1
)
The data to be decoded or encoded is stored in D110.
a) In decoding, only lower four bits
(0
-
15 in decimal notation) are effective, and con-
verted into bit pattern to be stored in D112.
D l l O
Upper 12 bits are ignored. Y - L o w e r
4 bits (0
-
15)
b) In encoding, data having only one "1
"
(H) bit in 16 bits is handled. This single "1
"
bit
is converted into 4-bit binary numerals, and stored in D112.
The data handled in encoding should have only one "1
"
bit in 16 bits.
(2) Discrimination between decode and encode is specified in D11 1.
D l l l
a) Decode
piii7-J
b) Encode
- 1
75
~
Lower 4-bit
(3)
Decoded
Or
encoded result is stored in
D~~ to be decoded ~ 1 1 1
n
f--
binary numeral
D112.
Decode
a) Decode
Decoded result
D112
0-0 1 O-*---O
Bits pattern

Advertisement

Table of Contents
loading

Table of Contents