2-227
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
BCD Conversion Instructions
2
AryToBCD
AryToBCD
The AryToBCD instruction converts the elements of an unsigned integer array to BCD bit strings.
*1 The valid ranges depend on the data types of the elements of In[] and AryOut[]. Refer to Function for details.
*2 If you omit an input parameter, the default value is not applied. A building error will occur.
Instruction Name FB/FUN Graphic expression ST expression
AryToBCD Array BCD
Conversion
FUN AryToBCD(In, Size, Ary-
Out);
Variables
Name Meaning I/O Description Valid range Unit Default
In[] (array) Unsigned
integer
array
Input
Unsigned integer array
*1
---
*2
Size Number of
elements
Number of elements of In[]
for conversion
Depends on data type. 1
AryOut[]
(array)
BCD array In-out BCD array
*1
--- ---
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
In[] (array) OK OK OK OK
Size OK
AryOut[]
(array)
Must be a bit string array. The data type must be the same size as the elements of In[].
Out OK
(@)AryToBCD
EN ENO
In Out
Size
AryOut