EasyManuals Logo

Omron NJ501-1500 User Manual

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #144 background imageLoading...
Page #144 background image
2 Instruction Descriptions
2-96
NJ-series Instructions Reference Manual (W502)
These instructions compare the sizes of from two to five text strings in In1 to InN (N = 2 to 5). The out-
put value Out is shown below for each instruction.
The sizes of the character codes are compared. The comparison procedure is as follows:
First, the first character codes in all of the text strings are compared. If the character codes are different,
the result of the size comparison for the text strings is determined by the size relationship between
those character codes. If the character codes are the same, comparison continues in order to the other
characters until a different character code is found. If the lengths of the text strings are different, NULL
characters (16#00) are added to the shorter text string to complete the comparison.
The relationships between various text strings are as follows:
'AD'(16#414400) < 'BC'(16#424400)
'ADC' (16#41444300)< 'B'(16#42000000)
'ABC' (16#41424300)< 'ABD'(16#41424400)
'ABC' (16#41424300)> 'AB'(16#41420000)
'AB' (16#414200)= 'AB'(16#414200)
If the text string contains multi-byte characters, the characters are separated into individual bytes before
comparison. For example, the two-byte character 16#C281 is handled as 16#C2 and 16#81.
The following example for the LEascii instruction is for when In1 is “AB”, In2 is “AC”, and In3 is “AC”.
The value of variable abc will be TRUE.
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
Instruction Value of Out
LTascii If In1 < In2 <...< InN, Out is TRUE. Otherwise, it is FALSE.
LEascii If In1 In2 ... InN, Out is TRUE. Otherwise, it is FALSE.
GTascii If In1 > In2 >...> InN, Out is TRUE. Otherwise, it is FALSE.
GEascii If In1 In2 ... InN, Out is TRUE. Otherwise, it is FALSE.
abc:=LEascii(’AB’, ‘AC’, ‘AC’);
LD ST
‘AB’
‘AC’
‘AC’
abc
LEascii
EN
In1
In2
In3

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ501-1500 and is the answer not in the manual?

Omron NJ501-1500 Specifications

General IconGeneral
BrandOmron
ModelNJ501-1500
CategoryController
LanguageEnglish

Related product manuals