Mitsubishi QD51 Programming Manual page 572

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
WIDTH
Instruction
• Sets the width of data to be output to the printer.
WIDTH LPRINT <output width>
Syntax
output width
WIDTH LPRINT 100
Examples
• The WIDTH instruction sets the output width (the maximum number of characters per line)
Description
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,@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
30 WIDTH LPRINT 50
40 LPRINT A$
50 WIDTH LPRINT 80
60 LPRINT A$
70 END
MitsubishiPLCAD51H.ABCDEFGHIJKLMNOPQRSTUVWXYZ,1234567
890,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@
MitsubishiPLCAD51H.ABCDEFGHIJKLMNOPQRSTUVWXYZ,1234567890,
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@
11 - 402
WIDTH
• • • •
• • • •
REMARK
See the LFILES, LLIST, LPRINT, LPRINT USING, PRINT#, PRINT# USING, and
ZLDV instructions.
Specify the output width of one line using a value
from 30 to 255.
Sets the width of data to be output to the printer to
100 characters per line.
:
' Defines a character string
:
' Sets the output width to 50 characters
:
' Outputs the character string to the printer
:
' Sets the output width to 80 characters
:
' Outputs the character string to the printer
MELSEC-Q
11 - 402

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents