VA Motion Controller Programming Manual
225
10.4.8 MAX_STRING ( take a larger string )
LD, FBD
programming language
Function: The MAX_STRING instruction is used to determine the larger of the two characters.
Usage
OUT:=MAX_
STRING ( IN1 , IN2 )
Note
: IL, ST
language programming needs to insert variables
IN1, IN2
and
OUT
or use
constants in the current
POU
variable worksheet
max_string
data processing instruction type
The first input character or string
The second input character or string
Output, the larger of two characters or a string
;
the size
of the character is calculateDAccording to
its
ASCII
code
;
when the string is input, only the first character
participates in the comparison, that is, if the first character of a
string is larger , then all the output of this string
Funtion and Action examples
Compare the largest string
When the contact is
O N
when the instruction is
executed, the address comparator
V 403
string
address
V 404
length of the string, there is a string of
the maximum output
V 405
of:
Implementation of the
results:
V Ector
company
- --- VECTOR
Output :
V Ector
company