12:
C
OORDINATE
C
ONVERSION
I
NSTRUCTIONS
FC5A
M
ICRO
S
MART
U
SER
’
S
M
ANUAL
FC9Y
‐
B1273
12
‐
7
AVRG
(Average)
The
AVRG
instruction
is
effective
for
data
processing
of
analog
input
values.
A
maximum
of
32
AVRG
instructions
can
be
programmed
in
a
user
program.
Applicable
CPU
Modules
Valid
Devices
For
the
valid
device
address
range,
see
pages
and
(
Basic
Vol.).
Internal
relays
M0
through
M2557
can
be
designated
as
D2.
Special
internal
relays
cannot
be
designated
as
D2.
When
T
(timer)
or
C
(counter)
is
used
as
S1
or
S3,
the
timer/counter
current
value
(TC
or
CC)
is
read
out.
When
F
(float)
data
type
is
selected,
only
data
registers
can
be
designated
as
S1
and
D1.
While
input
is
on,
the
AVRG
instruction
is
executed
in
each
scan.
When
the
quantity
of
sampling
cycles
(scan
times)
designated
by
device
S3
is
1
through
65535,
sampling
data
designated
by
device
S1
is
processed
in
each
scan.
When
the
designated
sampling
cycles
have
been
completed,
the
average
value
of
the
sampling
data
is
set
to
device
designated
by
D1
(data
type
W
or
I)
or
D1
∙
D1+1
(data
type
D,
L,
or
F).
The
maximum
value
of
the
sampling
data
is
set
to
the
next
device,
D1+1
(data
type
W
or
I)
or
D1+2
∙
D1+3
(data
type
D,
L,
or
F).
The
minimum
value
of
the
sampling
data
is
set
to
the
next
device,
D1+2
(data
type
W
or
I)
or
D1+4
∙
D1+5
(data
type
D,
L,
or
F).
The
sampling
completion
output
designated
by
device
D2
is
turned
on.
When
the
quantity
of
sampling
cycles
designated
by
device
S3
is
0,
sampling
is
started
when
the
input
to
the
AVRG
instruction
is
turned
on,
and
stopped
when
the
sampling
end
input
designated
by
device
S2
is
turned
on.
Then,
the
average,
maximum,
and
minimum
val
‐
ues
are
set
to
3
devices
starting
with
device
designated
by
D1.
When
the
sampling
exceeds
65535
cycles,
the
average,
maximum,
and
minimum
values
at
this
point
are
set
to
3
devices
starting
with
device
designated
by
D1,
and
sampling
continues.
When
the
sampling
end
input
is
turned
on
before
the
sampling
cycles
designated
by
device
S3
have
been
completed,
sampling
is
stopped
and
the
results
at
this
point
are
set
to
3
devices
starting
with
device
designated
by
D1.
The
average
value
is
calculated
to
units,
rounding
the
fractions
of
one
decimal
place.
When
the
sampling
end
input
is
not
used,
designate
an
internal
relay
or
another
valid
device
as
a
dummy
for
source
device
S2.
When
F
(float)
data
type
is
selected
and
S1
does
not
comply
with
the
normal
floating
‐
point
format,
a
user
program
execution
error
will
result,
turning
on
special
internal
relay
M8004
and
ERR
LED
on
the
CPU
module.
When
an
error
occurs,
incorrect
S1
data
are
skipped.
Average,
maximum,
and
minimum
values
are
calculated
from
correct
S1
data,
and
set
to
3
devices
starting
with
device
designated
by
D1.
FC5A
‐
C10R2/C/D
FC5A
‐
C16R2/C/D
FC5A
‐
C24R2/C/D
FC5A
‐
D16RK1/RS1
FC5A
‐
D32K3/S3
FC5A
‐
D12K1E/S1E
X
X
X
X
X
X
Device
Function
I
Q
M
R
T
C
D
Constant
Repeat
S1
(Source
1)
Sampling
data
X
X
X
X
X
X
X
—
—
S2
(Source
2)
Sampling
end
input
X
X
X
X
— — —
—
—
S3
(Source
3)
Sampling
cycles
(scan
times)
X
X
X
X
X
X
X
0
‐
65535
—
D1
(Destination
1)
First
device
address
to
store
results
— — — — — —
X
—
—
D2
(Destination
2)
Sampling
completion
output
—
X
— — — —
—
—
When
input
is
on,
sampling
data
designated
by
device
S1
is
processed
according
to
sampling
conditions
designated
by
devices
S2
and
S3.
When
sampling
is
complete,
average,
maximum,
and
mini
‐
mum
values
are
stored
to
3
consecutive
devices
starting
with
device
designated
by
D1,
then
sampling
completion
output
designated
by
device
D2
is
turned
on.
Data
Type
W,
I
D,
L,
F
Average
D1
D1
∙
D1+1
Maximum
value
D1+1
D1+2
∙
D1+3
Minimum
value
D1+2
D1+4
∙
D1+5
AVRG(*)
S1
*****
S3
*****
D1
*****
S2
*****
D2
*****
Summary of Contents for MICROSmart FC5A Series
Page 1: ...FC5A SERIES FC9Y B1273 1 User s Manual Advanced Volume ...
Page 2: ......
Page 8: ...Preface 6 FC5A MicroSmart User s Manual FC9Y B1273 ...
Page 14: ...TABLE OF CONTENTS vi FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Page 52: ...4 DATA COMPARISON INSTRUCTIONS 4 10 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Page 72: ...5 Binary Arithmetic Instructions 5 20 FC5A MicroSmart User s Manual FC9Y B1273 ...
Page 88: ...7 SHIFT ROTATE INSTRUCTIONS 7 12 FC5A MicroSmart User s Manual FC9Y B1273 ...
Page 112: ...8 DATA CONVERSION INSTRUCTIONS 8 24 FC5A MicroSmart User s Manual FC9Y B1273 ...
Page 138: ...11 PROGRAM BRANCHING INSTRUCTIONS 11 14 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Page 178: ...13 PULSE INSTRUCTIONS 13 32 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Page 202: ...14 PID INSTRUCTION 14 24 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Page 206: ...15 DUAL TEACHING TIMER INSTRUCTIONS 15 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Page 214: ...16 INTELLIGENT MODULE ACCESS INSTRUCTIONS 16 8 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Page 248: ...21 COMPUTER LINK COMMUNICATION 21 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Page 272: ...23 MODBUS TCP COMMUNICATION 23 10 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Page 332: ...25 EXPANSION RS232C RS485 COMMUNICATION 25 16 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Page 341: ...NOTE FC5A MICROSMART USER S MANUAL FC9Y B1273 1 ...
Page 342: ...NOTE 2 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...