2 Instruction Descriptions
2-538
NJ-series Instructions Reference Manual (W502)
ToUCase and ToLCase
z ToUCase
The ToUCase instruction converts all single-byte letters in data to convert In to uppercase.
z ToLCase
The ToLCase instruction converts all single-byte letters in data to convert In to lowercase.
Both instructions output a NULL character at the end of the text string. Only single-byte characters are
changed.
ToUCase: Converts all single-byte letters in a text string to uppercase.
ToLCase: Converts all single-byte letters in a text string to lowercase.
Instruction Name FB/FUN Graphic expression ST expression
ToUCase Convert to Upper-
case
FUN Out:=ToUCase(In);
ToLCase Convert to Lower-
case
FUN Out:=ToLCase(In);
Variables
Name Meaning I/O Description Valid range Unit Default
In Data to
convert
Input Text string to convert Depends on data type.
--- ''
Out Conver-
sion result
Output Converted text string 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
In OK
Out OK
Function
(@)ToUCase
EN ENO
In Out
(@)ToLCase
EN ENO
In Out