18: A
VERAGE
I
NSTRUCTIONS
18-2
FT1A S
MART
A
XIS
U
SER
’
S
M
ANUAL
FT9Y-B1382
Valid Data Types
Example: AVRG
The following example demonstrates a program to calculate average values of the data register D100 and store the result to data
register D200 in 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 in 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 designated as the
source, 16 points (word or integer data type) or 32 points (double-word or long data type) are used.
When a word device such as T (timer), C (counter), or D (data register) is designated as the source, 1 point
(word or integer data type) or 2 points (double-word, long, or float data type) 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 pentra
Page 1: ...FT1A SERIES FC9Y B1382 Ladder Programming Manual ...
Page 6: ...Preface 5 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 104: ...7 DATA COMPARISON INSTRUCTIONS 7 10 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 122: ...8 BINARY ARITHMETIC INSTRUCTIONS 8 18 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 138: ...10 SHIFT ROTATE INSTRUCTIONS 10 12 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 162: ...11 DATA CONVERSION INSTRUCTIONS 11 24 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 188: ...12 CALENDAR COMPARISON INSTRUCTIONS 12 26 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 198: ...15 REFRESH INSTRUCTIONS 15 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 202: ...16 INTERRUPT CONTROL INSTRUCTIONS 16 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 266: ...20 DUAL TEACHING TIMER INSTRUCTIONS 20 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Page 318: ...25 USER COMMUNICATION INSTRUCTIONS 25 22 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...