Guardian Programmer's Guide

Table Of Contents
Communicating With Printers
Guardian Programmer’s Guide 421922-014
11 - 29
Resetting the Printer to Default Values
The following example shows the use of the backspace control code to overstrike one
character:
SBUFFER ':=' ["Denote blanks by b",%10,"/. "] -> @S^PTR;
CALL WRITEX(PRINTER^NUMBER,
SBUFFER,
@S^PTR '-' @SBUFFER);
IF <> THEN ...
Again, the “/” character overstrikes the “b.”
Resetting the Printer to Default Values
You can reset the printer to its default values (those configured at the control panel) by
sending an escape sequence in the following format to the printer:
The following example shows how to do this in an application program.
STRING .RESET^PRINTER[0:1] := [%33,"E"];
.
.
CALL WRITEX(PRINTER^NUM,
RESET^PRINTER,
$LEN(RESET^PRINTER));
IF <> THEN ...
This escape sequence resets printer characteristics such as symbol set, pitch, and
underlining. For the 5515/5516/5518 printers, a new default VFC table is calculated.
Recovering From Errors
The following errors require special consideration for all line printers:
When dealing with these errors, you should also consider whether your program is
using nowait I/O and if so, whether multiple I/O operations are allowed concurrently. If
your program does permit multiple concurrent I/O operations, lines may be missing or
appear printed out of order.
Escape sequence to restore configured values:
escE
100 Device not ready
102 Device out of paper
200-
255
Path errors