Toshiba PROSEC T1 User Manual page 179

Programmable controller
Hide thumbs Also See for PROSEC T1:
Table of Contents

Advertisement

FUN 056
MAVE
Expression
Input -[ A MAVE ( n ) B ® C ]- Output
Function
When the input is ON, this instruction calculates the average value of the latest n scan's register A
data, and stores it in C . The allowable range of n is 1 to 64.
This instruction is useful for filtering the analog input signal.
The latest n scan's data of A are stored in n registers starting with B , and C+1 are used as pointer.
Execution condition
Input
OFF
No execution
ON
Execution
Operand
Name
A Input data
n Data size
B Start of table
C Output data
Example
The latest 5 scan's data of XW04 is stored in D0900 to D0904 (5 registers), and the average value
of them is calculated and stored in D0010.
D0011 is used as internal work data.
XW04
1st scan
2nd scan
3rd scan
4th scan
5th scan
6th scan
7th scan
8th scan
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net
Moving average
Operation
Device
X
Y
R
S
T.
C. XW YW RW SW T
D0010
1000
200 = (1000) / 5
1005
401 = (1000 + 1005) / 5
1009
603 = (1000 + 1005 + 1009) / 5
1012
805 = (1000 + 1005 + 1009 + 1012) / 5
1007
1006 = (1000 + 1005 + 1009 + 1012 + 1007) / 5
1004
1007 = (1005 + 1009 + 1012 + 1007 + 1004) / 5
998
1006 = (1009 + 1012 + 1007 + 1004 + 998) / 5
994
1003 = (1012 + 1007 + 1004 + 998 + 994) / 5
Output
OFF
ON
Register
C
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Basic Hardware and Function
6F3B0250
7. Instructions
T1S only
Constant Index
D
I
J
K
Ö
Ö
Ö
Ö
Ö
1 - 64
Ö
Ö
Ö
Ö
177

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Prosec t1s

Table of Contents