2-93
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Comparison Instructions
2
NEascii
NEascii
The NEascii instruction determines if two text strings are not equivalent.
* If you omit an input parameter, the default value is not applied. A building error will occur.
The NEascii instruction determines if two text strings In1 and In2 are not equivalent. If they are different,
comparison result Out will be TRUE. If they are the same, comparison result Out will be FALSE. “Equiv-
alent” means that both the lengths and contents of the text strings are the same.
The following example is for when In1 is “A” and In2 is “AB”. The value of variable abc will be TRUE.
Instruction Name FB/FUN Graphic expression ST expression
NEascii Text String Com-
parison Not
Equal
FUN Out:=NEascii(In1, In2);
Variables
Name Meaning I/O Description Valid range Unit Default
In1 and In2 Comparison
text strings
Input Text strings to compare 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 and In2 OK
Out OK
Function
(@)NEascii
EN Out
In1
In2
abc:=NEascii(’A’, ‘AB’);
LD ST
‘A’
‘AB’
abc
NEascii
EN
In1
In2