2-199
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Math Instructions
2
ArySubV
ArySubV
The ArySubV instruction subtracts the same value from specified elements of an array.
* If you omit the input parameter, the default value is not applied. A building error will occur.
The ArySubV instruction subtracts subtrahend In2 from Size elements of minuend array In1[] start-
ing from In1[0]. It outputs the results to subtraction results array AryOut[].
Instruction Name FB/FUN Graphic expression ST expression
ArySubV Array Value
Subtraction
FUN ArySubV(In1, In2, Size, Ary-
Out);
Variables
Name Meaning I/O Description Valid range Unit Default
In1[] (array) Minuend
array
Input
Minuend array
Depends on data type.
---
*
In2 Subtrahend Subtrahend
Size Number of
elements
Number of elements of In1[]
for subtraction
1
AryOut[]
(array)
Subtrac-
tion results
array
In-out Subtraction results array Depends on data type.
--- ---
Out Return
value
Output Always TRUE TRUE only --- ---
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
In1[] (array) OK OK OK OK OK OK OK OK OK OK
In2 Must be same data type as the elements of In1[].
Size OK
AryOut[]
(array)
Must be same data type as In1[].
Out OK
Function
(@)ArySubV
EN ENO
In1 Out
In2
Size
AryOut