Mitsubishi QD51 Programming Manual page 86

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

3 LET'S CREATE AND EXECUTE A PROGRAM
3 - 45
(3) Converting full-byte characters to code equivalents
Each full-byte character has a corresponding JIS code. JIS$ and KNJ$ are used
for conversion between full-byte character and JIS codes. Please note that the
character codes for these functions use character strings.
Example
OK
PRINT JIS$("@")
2422
OK
PRINT KNJ$( "2424" )
@
OK
(4) Converting full-byte characters (Kanji characters) and half-byte
characters
There are characters among full-byte characters that are the same type of
characters as half-byte characters (alphabets, numbers, English symbols, and
Katakana). These characters can be converted between full-byte characters and
half-byte characters.
AKCNV$ function is used for converting half-byte characters to full-byte
characters (Kanji characters).
KACNV$ function is used for converting full-byte characters (Kanji characters) to
half-byte characters.
Example
10 A$= " ABC"
20 PRINT AKCNV $(A$)
30 B$= "@ @ @ @ @"
40 PRINT K ACNV$ (B$)
50 END
RUN
ABC
@ @ @ @ @
OK
JIS$
("@")
1 character
KNJ$
Remember that the
character code is a
character string,
not a numeric value.
An Illegal Function Call error will be
generated if anything other than
alphabets, numbers, English symbols,
Katakana, or Hiragana characters are
contained in the character string that is
to be converted by the KACNV$ function.
MELSEC-Q
"2422"
Character
3 - 45

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents