Delta AH500 Programming Manual page 434

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
1203
ENCO
Device X
Y
M
S
D
n
Symbol:
Explanation:
1.
The values of the lower 2
of the lower n bits in D.
2.
If there are many bits whose values are 1 in the source device specified by S, the first bit with
the value 1 from the left is processed.
3.
When S is a bit device, n is within the range between 1 and 8. When n is 8, the values of the
256 bits is encoded as the values of the 8 bits.
4.
When S is a word device, n is within the range between 1 and 4. When n is 4, the values of the
16 bits is encoded as the values of the 4 bits.
5.
Generally, the pulse instruction ENCOP is used.
Example 1:
1.
When X0.0 is switched from OFF to ON, the instruction ENCO encodes the values of the 8 bits
in M0~M7 as the values of the lower 3 bits in D0, and the values of b15~b3 in D0 become 0.
2.
After the instruction ENCO is executed and X0.0 is switched OFF, the data in D is unchanged.
b15
0
6 - 2 6 6
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 encoded values
D :
are stored
Number of bits whose values are
n :
encoded
n
bits in the source device specified by S are encoded as the values
M7
M6
M5
M4
0
0
0
0
7
6
5
4
D0
0
0
0
0
0
0
0
T he values of b15~b3 in D0 become 0.
L
SM SR
E
PR
AH500
M3
M2
M1
M0
1
0
0
0
3
2
1
0
4
2
0
0
0
0
0
0
1
Function
Encoder
K
16# "$"
DF
-
Bit/Word
Word
Word
1
1
b0

Advertisement

Table of Contents
loading

Table of Contents