User Manual Owner's manual
Table Of Contents
- 1772-6.5.8, Mini-PLC-2/02, -2/16, -2/17 Processor, User Manual
- Important User Information
- Summary of Changes
- Table of Contents
- 1 - Using This Manual
- 2 - Fundamentals of a Programmable Controller
- 3 - Hardware Features
- 4 - Installing Your Programmable Controller
- 5 - Starting Your Processor
- 6 - Maintaining and Troubleshooting Your Processor
- 7 - Memory Organization
- 8 - Scan Theory
- 9 - Relay-Like Instructions
- 10 - Program Control Instructions
- 11 - Timers and Counters
- 12 - Data Manipulation and Compare Instructions
- 13 - Three-Digit Math Instructions
- 14 - EAF Math Instructions
- 15 - EAF Log, Trig, and FIFO Instructions
- 16 - EAF Process Control Instructions
- 17 - Jump Instructions and Subroutines
- 18 - Block Transfer
- 19 - Data Transfer Instructions
- 20 - Bit Shift Registers
- 21 - Sequencers
- 22 - Selectable Timer Interrupts
- 23 - Report Generation
- 24 - Program Editing
- 25 - Programming Techniques
- 26 - Program Troubleshooting
- A - Specifications
- B - Processor Comparison Chart
- C - Number Systems
- D - Glossary
- E - Quick Reference
- Index
- Back Cover

EAF
Process Control Instructions
Chapter 16
16-42
Averaging
The averaging instruction determines the arithmetic average of a group of
six digit BCD values. The maximum number of values you can average is
999 or is limited by the data table area available. The Averaging
instruction uses the formula:
y +
ȍ
i+1
X
i
n
n
where:
X
i
= six digit signed BCD values
y = the average of the values
n = the number of values
Entry and Display of Input and Result Values
Figure 16.12 shows one method you can use to enter values and display
results of the six digit averaging. Although there are several techniques for
accomplishing this, we chose Get instructions.
Be careful not to select data and result addresses so that they overlap.
Figure 16.12
6Digit
A
veraging Ladder Diagram
EXECUTE AUX
FUNCTION NUMBER:
DATA ADDR:
RESULT ADDR:
06
0040
0160
00
0030
005
G
0031
005
G
FUNCTION
150
EN
FILE TO FILE MOVE
COUNTER ADDR:
POSITION:
FILE LENGTH:
0033
001
021
FILE A:
FILE R:
RATE PER SCAN
0040-0064
0160-0204
021
DN
0033
17
0033
15
000
0162
003
G
0163
000
G
0161
0164
000
G
010
00
G
Here is a description of the ladder diagram. This programming example
averages five values and stops.