2 Instruction Descriptions
2-520
NJ-series Instructions Reference Manual (W502)
CONCAT
The CONCAT instruction joins two to five text strings.
* If you omit the input parameter that connects to InN, the default value is not applied, and a building error will occur. For
example, if N is 3 and the input parameters that connect to In1 and In2 are omitted, the default values are applied, but if the
input parameter that connects to In3 is omitted, a building error will occur.
The CONCAT instruction joins 2 to 5 text strings in strings to join In1 to InN in that order. It adds a NULL
character to the end.
The following example is for when In1 is ‘AB’, In2 is ‘C’ and In3 is ‘DEF’. The value of variable abc will
be ‘ABCDEF’.
Instruction Name FB/FUN Graphic expression ST expression
CONCAT Concatenate String FUN Out:=CONCAT(In1,···, InN);
Variables
Name Meaning I/O Description Valid range Unit Default
In1 to InN Strings to
join
Input Text strings to join, where N
is 2 to 5
Depends on data type. --- ''*
Out Result of
joining
Output Text string that resulted from
joining
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
In1 to InN OK
Out OK
Function
(@)CONCAT
EN ENO
In1 Out
:
InN
abc:=CONCAT(’AB’, ‘C’, ‘DEF’);
LD ST
abc
‘AB’
‘C’
‘DEF’
CONCAT
EN ENO
In1
In2
In3