Arymean - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

AryMean

The AryMean instruction calculates the average of the elements of an array.
Instruction
AryMean
Array Mean
Variables
Name
Meaning
In[] (array)
Array to
process
Size
Number of
elements to
process
Out
Calculation
result
* If you omit the input parameter, the default value is not applied. A building error will occur.
Bit strings
In[] (array)
Size
Out
Function
The AryMean instruction calculates the average of Size elements of array to process In[] starting
from In[0].
The following example is for when Size is UINT#5.
LD
abc[1]
UINT#5
Size=UINT#5
NY-series Instructions Reference Manual (W560)
Name
FB/FUN
FUN
I/O
Description
Array to process
Input
Number of In[] elements
Output
Calculation result
OK OK OK OK OK OK OK OK OK OK OK
OK
OK OK OK OK OK OK OK OK OK OK OK
AryMean
EN
ENO
In
def
Size
In[0]=abc[1]
1234
In[1]=abc[2]
2345
Average calculated.
In[2]=abc[3]
3456
In[3]=abc[4]
4567
In[4]=abc[5]
5678
Graphic expression
(@)AryMean
EN
ENO
In
Out
Size
Valid range
Depends on data type.
Depends on data type.
Integers
ST
def:=AryMean(abc[1], UINT#5);
3456
Out=def
2 Instruction Descriptions
ST expression
Out := AryMean(In, Size);
Unit
Default
*
---
1
---
---
Times, durations, dates,
and text strings
2
2-229

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents