2-91
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Comparison Instructions
2
EQascii
EQascii
The EQascii instruction determines if two or more text strings are all equivalent.
* 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 EQascii instruction determines if from two to five text strings In1 to InN are all equivalent. If the are
all equivalent, comparison result Out changes to TRUE. Otherwise, the value of Out is FALSE. “Equiva-
lent” means that both the lengths and contents of the text strings are the same.
The following example is for when In1 is “A”, In2 is “AB”, and In3 is “ABC”. The value of variable abc will
be FALSE.
Instruction Name FB/FUN Graphic expression ST expression
EQascii Text String Com-
parison Equal
FUN Out:=EQascii(In1, ··,
InN);
Variables
Name Meaning I/O Description Valid range Unit Default
In1 to InN Comparison
text strings
Input Text strings to compare, N =
2 to 5
Depends on data type.
--- '' *
Out Comparison
result
Output Comparison result 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
(@)EQascii
EN Out
In1
:
InN
:
abc:=EQascii(’A’, ‘AB’, ‘ABC’);
LD ST
‘A’
‘AB’
‘ABC’
abc
EQascii
EN
In1
In2
In3