Delta AH500 Programming Manual page 432

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

AH 5 00 Pr ogr am m ing Ma n ua l
API
Instruction code
1202
DECO
Device X
Y
M
S
D
n
Symbol:
Explanation:
1.
The values of the lower n bits in the source device specified by S are decoded as the values of
n
the lower 2
bits in D.
2.
When D is a bit device, n is within the range between 1 and 8. When n is 8, the values of the 8
bits is decoded as the values of the 256 bits. (Please note that the devices in which the
decoded values are stored can not be used repeatedly.)
3.
When D is a word device, n is within the range between 1 and 4. When n is 4, the values of the
4 bits is decoded as the values of the 16 bits.
4.
Generally, the pulse instruction DECOP is used.
Example 1:
1.
When Y0.0 is switched from OFF to ON, the instruction DECO decodes the values of the 3 bits
in X0.0~X0.2 as the values of the 8 bits in M100~M107.
2.
After the values of the 3 bits in X0.0~X0.2 are added up, the value 3 is gotten. The third bit in
M10~M1007, that is, the bit in M103, is set to 1.
3.
After the instruction DECO is executed and Y0.0 is switched OFF, the values of the 8 bits in
M100~M107 are unchanged.
6 - 2 6 4
Operand
S, D, n
P
S
T
C
HC
D
Pulse instruction 16-bit instruction (7 steps) 32-bit instruction
AH500
S : Source device
Device in which the decoded values are
D :
stored
n : Number of bits whose values are decoded
X0.2 X0.1
0
1
4
2
7
6
5
4
0
0
0
0
M107 M106 M105 M104 M103 M102 M101 M100
L
SM SR
E
PR
AH500
1
1
3
2
1
0
3
0
0
0
1
Function
Decoder
K
16# "$"
DF
-
Bit/Word
Bit/Word
Word

Advertisement

Table of Contents
loading

Table of Contents