Mitsubishi QD51 Programming Manual page 516

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
[Format specification for a character string]
In order to display a character string using the PRINT USING instruction, it is necessary to
employ one of the following format characters to determine the format of the character
string.
Format character
"!"
Displays the starting character of a given character
string.
"& n spaces &"
• Displays 2 + n characters from the beginning of a
• Displays 2 characters if no space is specified
• If a given character string is longer than the length
• A given character string is displayed left-justified
[Format specification for a numeric value]
In order to display a numeric value using the PRINT USING instruction, it is necessary to
employ one of the following special characters to determine the format of the numeric value.
Format character
"#"
• Indicates the place of each digit of a numeric value.
• A number or a space must be placed at the place
• If the number of digits of a value to be displayed is
• If a numeric value has more digits than the number
11 - 346
Function
given character string.
between the two & characters.
specified in the format, the extra characters are not
displayed.
and blank spaces are placed for any remaining
character spaces of the format.
Function
of the digit where this character is specified.
less than the specified number of digits, the
numeric value is displayed right-justified according
to the format and blank spaces are placed for any
remaining digit spaces to the left.
of # characters, a "%" character is displayed at the
beginning.
MELSEC-Q
Example
PRINT USING "!" ;" ABC"
A
OK
PRINT USING "& &" ;" ABCD"
ABCD
OD
PRINT USING "& &" ;" ABCD" ;" EFGH"
ABCDEFGH
OK
PRINT USING "& &" ;" AB" ;" CD"
AB CD
OK
Example
PRINT USING " ####" ;123
123
OK
PRINT USING " ##" ;123
%123
OK
(Continued on the next page)
11 - 346

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents