11 - 402 11 - 402
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
WIDTH
Instruction
WIDTH
• Sets the width of data to be output to the printer.
WIDTH LPRINT <output width>
Syntax
output width
• • • •
Specify the output width of one line using a value
from 30 to 255.
Examples
WIDTH LPRINT 100
• • • •
Sets the width of data to be output to the printer to
100 characters per line.
Description
• The WIDTH instruction sets the output width (the maximum number of characters per line)
when printing data output to the printer specified by the ZLDV instruction.
• If a character string longer than <output width> is specified to be printed in one line after
executing the WIDTH instruction, the number of characters specified by <output width> is
printed and then the remaining characters in the string is printed in the new line.
• If the value specified in <output value> is 255, it is interpreted as if the output width is
infinite; the CR (carriage return) code is not sent to the printer.
• The output width is set to 80 characters as default when BASIC is started up.
Program Example
10 ' This program specifies the output width of data output to the printer and prints a character string
20 A$="MitsubishiPLCAD51H.ABCDEFGHIJKLMNOPQRSTUVWXYZ,1234567890,@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
:
' Defines a character string
30 WIDTH LPRINT 50
:
' Sets the output width to 50 characters
40 LPRINT A$
:
' Outputs the character string to the printer
50 WIDTH LPRINT 80
:
' Sets the output width to 80 characters
60 LPRINT A$
:
' Outputs the character string to the printer
70 END
MitsubishiPLCAD51H.ABCDEFGHIJKLMNOPQRSTUVWXYZ,1234567
890,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@
MitsubishiPLCAD51H.ABCDEFGHIJKLMNOPQRSTUVWXYZ,1234567890,
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@
REMARK
See the LFILES, LLIST, LPRINT, LPRINT USING, PRINT#, PRINT# USING, and
ZLDV instructions.
Содержание 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...