2-203
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Math Instructions
2
ArySD
ArySD
The ArySD instruction calculates standard deviation of the elements of an array.
* If you omit an input parameter, the default value is not applied. A building error will occur.
The ArySD instruction calculates the standard deviation of Size elements of array to process In[]
starting from In[0].
Instruction Name FB/FUN Graphic expression ST expression
ArySD Array Element
Standard Deviation
FUN Out:=ArySD(In, Size);
Variables
Name Meaning I/O Description Valid range Unit Default
In[] (array) Array to
process
Input
Array to process
Depends on data type.
---
*
Size Number of
elements
Number of elements of In[]
for conversion
2
Out Standard
deviation
Output Standard deviation Depends on data type.
--- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In[] (array) OK OK
Size OK
Out OK OK
Function
(@)ArySD
EN ENO
In Out
Size
2
i
Σ(In[i]-InM)
Size−1
Standard deviation =
i: Subscript of In[], 0 to Size − 1
InM: Average value of In[0] to In[Size - 1