Delta AS Series Programming Manual page 640

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

API
Instruction code
1203
ENCO
Device
X
Y
M
S
D
n
Data
type
S
D
n
Symbol
Explanation
1.
When S is a word device, this instruction encodes the values of the lower 2
S as the values of the lower n bits in D.
2.
When S is a bit device, the instruction processes the higher bit with the value S+(n-1) from the lower 2
stores the result in D.
3.
When the source device specified by S is a timer or counter, the instruction treats the device as a word device.
4.
When S is a bit device, n is between 1–8. When n is 8, the instruction encodes the values of the 256 bits as the
values of the eight bits.
5.
When S is a word device, n is between 1–4. When n is 4, the instruction encodes the values of the 16 bits as the
values of the four bits.
6.
In general, the ENCOP pulse instruction is used.
Example 1
1.
When X0.0 switches from OFF to ON, the ENCO instruction encodes the values of the 8 bits in M0–M7 as the
Operand
P
S, D, n
S
T
C
HC
Pulse instruction
S : Source device
D : Device where the encoded values are stored
n : Number of bits whose values are encoded
Ch ap te r 6 Ap pl ie d Instruc ti ons
D
FR
SM
SR
16-bit instruction
AS
AS
n
bits in the source device specified by
Function
Encoding bits
E
K
16#
"$"
F
32-bit instruction
-
n
bits and
6 - 3 6 1
6_

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents