Printing To The Printer - Mitsubishi QD51 Programming Manual

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

Advertisement

3 LET'S CREATE AND EXECUTE A PROGRAM

3.12 Printing to the Printer

3 - 39
The values of constants, variables, and arrays can all be printed to the printer, just as
they can be displayed on the screen. When sending data to a printer, the ZLDV
instruction checks to see where the printer is connected. The setting is as follows.
• To use a printer connected to the console
• To use a printer connected to CH1 (RS232C) interface
• To use a printer connected to CH2 (RS232C) interface
• To use a printer connected to CH3 (RS422) interface
• To use a printer connected to CH4 (PARALLEL) interface
Data to be sent to the printer is specified using the LPRINT instruction. The contents
that are written after the LPRINT instruction are exactly the same as when using the
PRINT instruction in Section 3.10. SPC and TAB functions can also be used. However,
the LOCATE instruction will produce no result to the printer.
Example
10 ZLDV 0
20 A=100:B=-50
30 LPRINT A;B;A+B
40 LPRINT " A" ;TAB(12); " B"
50 END
RUN
OK
REMARK
• Other than just printing character, a printer can be used to perform various
operations by sending data referred to as control codes. For details, refer to the
manual for the printer used.
• The ZCNTL instruction can be used to read the printer status or to send a reset
signal to the printer.
MELSEC-Q
• • • • • • • • • ZLDV 0
• • • • • • • • • ZLDV 1
• • • • • • • • • ZLDV 2
• • • • • • • • • ZLDV 3
• • • • • • • • • ZLDV 4
3 - 39

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents