IDEC MICROSmart FC6A Series Ladder Programming Manual page 296

Automation organizer windldr
Hide thumbs Also See for MICROSmart FC6A Series:
Table of Contents

Advertisement

17: A
I
VERAGE
NSTRUCTIONS
Valid Data Types
W (word)
X
I (integer)
X
D (double word)
X
L (long)
X
F (float)
X
Example: AVRG
The following example demonstrates a program that calculates the average values of data register D100 and store the result to
data register D200 every 500 scans.
AVRG(W)
D100
M8125
When the sampling end input does not turn on
While sampling end input I10 is off, the average, maximum, and minimum values are calculated every 500 scans and stored to
data registers D200, D201, and D202, respectively. Sampling completion output M100 is set every 500 scans.
In-operation Special IR M8125
Sampling End Input I10
Sampling Completion Output M100
When the sampling end input turns on
When sampling end input I10 turns on, the average, maximum, and minimum values at this point are stored to data registers
D200, D201, and D202, respectively. Sampling completion output M100 is also set. When sampling end input I10 turns off,
sampling resumes starting at the first scan.
In-operation Special IR M8125
Sampling End Input I10
Sampling Completion Output M100
Maximum Value D201
17-2
When a bit device such as I (input), Q (output), M (internal relay), or R (shift register) is assigned as the source,
16 points (word or integer data) or 32 points (double-word or long data) are used.
When a word device such as T (timer), C (counter), or D (data register) is assigned as the source, 1 point (word
or integer data) or 2 points (double-word, long, or float data) are used.
S1
S2
S3
I10
500
Sampling Data D100
ON
OFF
ON
OFF
ON
OFF
Average Value D200
Maximum Value D201
Minimum Value D202
Sampling Data D100
ON
OFF
ON
OFF
ON
OFF
Average Value D200
Minimum Value D202
FC6A S
MICROS
ERIES
M8125 is the in-operation output special internal relay.
D1
D2
D200
M100
1st scan
2nd scan
512
497
Values are set every 500 scans.
151st scan
152nd scan
489
510
502
513
485
L
P
MART
ADDER
ROGRAMMING
500th scan
521
500
530
480
153rd scan
XXXth scan
509
Values are set when I10 is turned on.
M
FC9Y-B1726
ANUAL
1st scan
2nd scan
499
478
1st scan
504
493

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents