11 - 346 11 - 346
MELSEC-Q
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
Function
Example
“!”
Displays the starting character of a given character
string.
PRINT USING “!” ;” ABC”
A
OK
“& n spaces &”
• Displays 2 + n characters from the beginning of a
given character string.
• Displays 2 characters if no space is specified
between the two & characters.
• If a given character string is longer than the length
specified in the format, the extra characters are not
displayed.
• A given character string is displayed left-justified
and blank spaces are placed for any remaining
character spaces of the format.
PRINT USING “& &” ;” ABCD”
ABCD
OD
PRINT USING “& &” ;” ABCD” ;” EFGH”
ABCDEFGH
OK
PRINT USING “& &” ;” AB” ;” CD”
AB CD
OK
[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
Function
Example
“#”
• Indicates the place of each digit of a numeric value.
• A number or a space must be placed at the place
of the digit where this character is specified.
• If the number of digits of a value to be displayed is
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.
• If a numeric value has more digits than the number
of # characters, a "%" character is displayed at the
beginning.
PRINT USING “ ####” ;123
123
OK
PRINT USING “ ##” ;123
%123
OK
(Continued on the next page)
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...