17: A
VERAGE
I
NSTRUCTIONS
17-2
FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726
Valid Data Types
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.
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.
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.
W (word)
X
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.
I (integer)
X
D (double word)
X
L (long)
X
F (float)
X
M8125 is the in-operation output special internal relay.
M8125
S1
D100
S2
I10
AVRG(W)
D2
M100
S3
500
D1
D200
512
1st scan
497
2nd scan
521
500th scan
499
1st scan
478
2nd scan
In-operation Special IR M8125
ON
OFF
Sampling End Input I10
ON
OFF
Sampling Completion Output M100
ON
OFF
Sampling Data D100
Average Value D200
500
Maximum Value D201
530
Minimum Value D202
480
Values are set every 500 scans.
489
151st scan
510
152nd scan
509
153rd scan
504
XXXth scan
493
1st scan
In-operation Special IR M8125
ON
OFF
Sampling End Input I10
ON
OFF
Sampling Completion Output M100
ON
OFF
Sampling Data D100
Average Value D200
502
Maximum Value D201
513
Minimum Value D202
485
Values are set when I10 is turned on.
Summary of Contents for MICROSmart FC6A Series
Page 1: ...B 1726 7 FC6A SERIES Ladder Programming Manual ...
Page 8: ...Preface 7 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 32: ...1 OPERATION BASICS 1 20 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 96: ...3 INSTRUCTIONS REFERENCE 3 18 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 130: ...4 BASIC INSTRUCTIONS 4 34 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 192: ...9 SHIFT ROTATE INSTRUCTIONS 9 12 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 272: ...12 DISPLAY INSTRUCTIONS 12 24 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 284: ...14 REFRESH INSTRUCTIONS 14 6 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 502: ...25 DATA LOG INSTRUCTIONS 25 22 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 546: ...26 SCRIPT 26 44 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 598: ...APPENDIX A 14 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...