11 - 430 11 - 430
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
Reading the printer status
Control table format definition
Element position
Item
Description
%(0)
Processing code
Specify the processing code.
Processing Code 128
%(1)
Printer status
Read the printer status into the lower byte.
• It is possible to read the status (terminal error, out of paper, and terminal
connection status) of a printer connected to an open parallel interface using this
code.
• Specify 128 for the processing code.
• The printer status is expressed in the following manner using the lower 8 bits of
%(1).
1
2
3
0
Terminal error
1: Normal
0: Terminal error
4
5
6
7
(Bits marked with X are ignored.)
Out of paper
1: Out of paper
0: Paper supplied
Terminal
connection
status
1: Connected
0: Not connected
Lower byte
%(1)
Can be read by
RDSET(2, %(1)).
It is convenient to use the RDSET instruction to read the bit status since
only bits 0 to 2 of %(1) are used for the status of each signal.
Can be read by
RDSET(1, %(1)).
Can be read by
RDSET(0, %(1)).
The statuses of the following signals of the parallel interface are read into printer
status.
Terminal error
• • • •
ERROR
Out of paper
• • • •
PE
Terminal connection
• • • •
SLCT
How the ON/OFF status of each signal is controlled depends on the printer; see
the manual of the printer used.