EasyManuals Logo

IDEC MICROSmart FC6A Series Ladder Programming Manual

IDEC MICROSmart FC6A Series
604 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #207 background imageLoading...
Page #207 background image
FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726 10-15
10: D
ATA
C
ONVERSION
I
NSTRUCTIONS
ENCO (Encode)
Valid Devices
For valid device address ranges, see "Device Addresses" on page 2-1.
Special internal relays cannot be designated as D1.
Make sure that the search area designated by S1 plus Bits is within the valid value range. If the source data exceeds the valid range, a user program
execution error will result, turning on special internal relay M8004 and the ERR LED on the FC6A Series MICROSmart.
When a user program execution error occurs, the execution of the instruction is canceled. The value of D1 is left unchanged and the next instruction
is executed. For user program execution errors, see "User Program Execution Errors" on page 3-10.
Since the ENCO instruction is executed in each scan while input is on, a pulse input from a SOTU or SOTD instruction should be used.
Examples: ENCO
When input is on, a search begins for the first bit that is set to on. The search begins at S1 until
the first set (on) point is located. The number of points from S1 to the first set point (offset) is
stored to the destination assigned by device D1.
If no point is on in the searched area, 65,535 is stored to D1.
ENCO
Bits
S1
*****
D1
*****
Device Function I Q M R T C D P Constant Repeat
S1 (Source 1) First bit to start search X X X X — — X — — —
D1 (Destination 1) Destination to store search results — X X — — X — — —
Bits Quantity of bits searched — — — — — — — — 1-256 —
When input I0 is on, a search begins for a bit that is set on in an array of 64 bits starting at
internal relay M4 assigned by device S1.
Since internal relay M30 is the first point that is on, the offset from the first search point is 20,
and 20 is stored to data register D100 assigned by device D1.
D1
D100
S1
M4
I0
ENCO
64
M17 M0
M37
M20
M57
M40
M77
M60 ON
M97
M80
M117 M100
Searched area
20
D100
When input I1 is on, a search begins for a bit that is set on in an array of 64 bits starting at bit
0 of data register D10 assigned by device S1.
Since bit 8 of data register D11 is the first point that is on, the offset from the first search point
is 24, and 24 is stored to data register D100 assigned by device D1.
D1
D100
S1
D10
I1
ENCO
64
Bit 1514131211109876543210
D10
D11
D12
D13 ON
D14
D15
Searched area
24
D100

Table of Contents

Other manuals for IDEC MICROSmart FC6A Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IDEC MICROSmart FC6A Series and is the answer not in the manual?

IDEC MICROSmart FC6A Series Specifications

General IconGeneral
BrandIDEC
ModelMICROSmart FC6A Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals