Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

Bit strings
In1 to InN
Out
OK
Function
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.
Instruction
LTascii
LEascii
GTascii
GEascii
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.
LD
EN
'AB'
In1
'AC'
In2
'AC'
In3

NY-series Instructions Reference Manual (W560)

If In1 < In2 <...< InN, Out is TRUE. Otherwise, it is FALSE.
If In1 ≤ In2 ≤...≤ InN, Out is TRUE. Otherwise, it is FALSE.
If In1 > In2 >...> InN, Out is TRUE. Otherwise, it is FALSE.
If In1 ≥ In2 ≥...≥ InN, Out is TRUE. Otherwise, it is FALSE.
abc
LEascii
Integers
Value of Out
ST
abc:=LEascii('AB', 'AC', 'AC');
2 Instruction Descriptions
Times, durations,
dates, and text strings
OK
2
2-105

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents