Toshiba PROSEC T1-16S User Manual page 161

Programmable controller basic hardware and function
Hide thumbs Also See for PROSEC T1-16S:
Table of Contents

Advertisement

FUN 056
MAVE
Expression
Input
[ A MAVE (n) B
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
X
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
1000
2nd scan
1005
3rd scan
1009
4th scan
1012
5th scan
1007
6th scan
1004
7th scan
998
8th scan
994
Moving average
C ]
Output
Operation
Device
Y
R
S
T.
C. XW YW RW SW T
D0010
200 = (1000) / 5
401 = (1000 + 1005) / 5
603 = (1000 + 1005 + 1009) / 5
805 = (1000 + 1005 + 1009 + 1012) / 5
1006 = (1000 + 1005 + 1009 + 1012 + 1007) / 5
1007 = (1005 + 1009 + 1012 + 1007 + 1004) / 5
1006 = (1009 + 1012 + 1007 + 1004 + 998) / 5
1003 = (1012 + 1007 + 1004 + 998 + 994) / 5
7. Instructions
Output
OFF
ON
Register
C
D
I
J
Basic Hardware and Function
6F3B0253
Constant Index
K
1 - 64
159

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents