2-443
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Conversion Instructions
2
AryToString
AryToString
The AryToString instruction converts a BYTE array to a text string.
* If you omit the input parameter, the default value is not applied. A building error will occur.
The AryToString instruction takes the elements of a BYTE array, In[], from In[0] as character codes and
stores them in text string Out. A NULL character is placed at the end of Out. Size specifies the number
of elements of In[] to convert. If there is a NULL character between In[0] and In[Size−1], no character
codes past it are stored in Out.
Instruction Name FB/FUN Graphic expression ST expression
AryToString Array-to-Text String
Conversion
FUN Out:=AryToString(In, Size);
Variables
Name Meaning I/O Description Valid range Unit Default
In[] (array) BYTE array
Input
BYTE array
Maximum number of
elements: 1985
Depends on data type.
---
*
Size Number of
elements to
convert
Number of elements of In[]
for conversion
0 to 1985 1
Out Text string Output Text string 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
Size OK
Out OK
Function
(@)AryToString
EN ENO
In Out
Size