C h a p t e r 5 A p p l i e d I n s t r u c t i o n s
5 - 5 9
API
Instruction code
Operand
Function
41
DECO
P
S, D, n
Decoder
Device
X
Y
M
S
K
16#
F
KnM KnS
D
W
T
C
V
Z
S
D
n
Pulse instruction 16-bit instruction (7 steps) 32-bit instruction
–
E xp la nat io n
The
low
n
bits in
S
are decoded as the low 2
n
bits in
D
.
S
: Source device;
D
: Device in which a decoding result is stored
n
:
Number of bits which are decoded
Generally, the pulse instruction DECOP is used.
D
is in the range of 1 to 8.
E xamp le 1
If
n
is 8, the maximum number of bits which can be decoded is 2
8
=256.
When
D
is a bit device,
n
is in the range of 1 to 8. If
n
is 0, or greater
than 8, an error will occur.
When X2.0 is turned from OFF to ON, the instruction DECOP decodes
X0.0~X0.2 as M100~M107.
If the value in
S
is 3, M103 will be ON.
After the instruciton is executed, X2.0 will be OFF, and the states of
M100~M107 will remain unchanged.
DECOP
X0.0
K3
M100
X2.0
X0.2 X0.1 X0.0
M107 M106 M105 M104 M103 M102 M101 M100
0
1
1
1
0
0
0
0
0
0
0
3
7
6
5
4
2
1
0
4
1
2
3
E xamp le 2
If
n
is 8, the maximum number of bits which can be decoded is 2
8
=256.
When
S
is a word device,
n
is in the range of 1 to 8. If
n
is 0, or greater
than 8, an error will occur.
When X2.0 is turned from OFF to ON, the instruction DECOP decodes
b2~b0 in D10 as b7~b0 in D20, and b15~b8 in D10 become 0.
The low 3 bits in D10 are decoded as the low 8 bits in D20. The high 8
bits in D20 are 0.
After the instruciton is executed, X2.0 will be OFF, and the value in D20
remain unchanged.
DECOP
D10
K3
D20
X2.0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
4
2
1
3
b15
b0
Bit 15~ bi t 8
in D10 bec ome 0.
b15
b0
D 10
D 20
7
6
5
4
2
1
0
Содержание AH500
Страница 9: ...viii...
Страница 52: ...Chapter 2 Hardware Specifications and Wiring Wiring AH10PM 5A and a Panasonic CN5 series servo drive 2 31...
Страница 53: ...AH500 Motion Control Module Manual Wiring AH10PM 5A and a Yaskawa servo drive 2 32...
Страница 54: ...Chapter 2 Hardware Specifications and Wiring Wiring AH10PM 5A and a Mitsubishi MJR2 series servo drive 2 33...
Страница 55: ...AH500 Motion Control Module Manual Wiring AH10PM 5A and a Fuji servo drive 2 34...
Страница 115: ...AH500 Motion Control Module Manual 4 16 MEMO...
Страница 375: ...AH500 Motion Control Module Manual 5 260 MEMO...
Страница 376: ...Chapter 6 Data Transmission Table of Contents 6 1 Functions 6 2 6 2 Parameters 6 2 6 3 Usage 6 5 6 1...
Страница 383: ...AH500 Motion Control Module Manual 6 8 MEMO...
Страница 419: ...AH500 Motion Control Module Manual 7 36 MEMO...
Страница 436: ...Chapter 8 Electronic Cam 8 17...
Страница 482: ...Chapter 10 High speed Counters and High speed Timers 3 The cyclic mode is used to measure a frequency 10 7...
Страница 483: ...AH500 Motion Control Module Manual 10 8 MEMO...
Страница 505: ...AH500 Motion Control Module Manual 12 8 MEMO...
Страница 515: ...AH500 Motion Control Module Manual 13 10 MEMO...
Страница 544: ...Appendix A Error Code Table Table of Contents A 1 Error Code Table A 2 A 1...
Страница 547: ...AH500 Motion Control Module Manual A 4 MEMO...