Controlling the printer, The control panel, Control codes – Brother HL-2170W User Manual
Page 296: Escape sequence
CHAPTER 6 EPSON - 8
5.
CONTROLLING THE PRINTER
Commands are invoked using either control codes or escape sequences. You can send them to the
printer as part of a program using the same command that you would use to print a string on the printer.
For example in BASIC you would use the LPRINT command.
The printer's control panel can also be used to set various operating parameters. Try to ensure that the
control panel settings and computer generated settings do not conflict with one another, or you may not
get the results you require.
5.1.
The Control Panel
Refer to the printer User's Guide for a description of how to use the printer's control panel switches. You
should be aware, however, that the following can be set using the control panel: automatic line feed (a
line feed is performed with every carriage return), auto mask (two-line top and bottom margins are
automatically used on every page), paper size, top, bottom, left and right margins, the number of lines of
text per page, orientation (portrait or landscape), the current font and the emulation mode. Conflict
between control panel settings and the settings you establish with software commands (or from
applications software) is by far the most likely cause of unexpected printing results. Use this manual in
conjunction with the printer User's guide to resolve these conflicts.
5.2.
Control codes
Control codes are ASCII codes that instruct the printer to perform a particular operation, such as a line
feed. You can send a control code to the printer by sending the same type of instruction you would use
to print a character using its ASCII code number. For example, the ASCII code for a form feed is 12, so
to make the printer perform a form feed use the following BASIC statement:
LPRINT CHR$(12);
The CHR$ operator is normally used to convert an ASCII code into its corresponding character.
5.3.
Escape sequence
Escape sequences tell the printer what Epson FX-850 mode function to perform. An escape sequence
consists of the Esc character followed by one or more characters which define the operation to be
performed. Send an escape sequence to the printer by sending the same type of instruction you would
use to print characters using their ASCII codes. Some escape sequences require parameter values or data
following them, for example, commands which turn a particular feature on and off, or commands for
printing graphic images. Numerical parameter data, too, is sent to the printer as if it were a character
code to be printed. For example, to move the print position to the third column position on the page the
required escape sequence is Esc HT 3. In BASIC this would be:
LPRINT CHR$(27); CHR$(9); CHR$(3);
In some instances where a numerical parameter can only take the values 0 or 1, you have a choice
between sending the number or the character code itself as the numerical parameter. Hence you can use
CHR$(0) or CHR$(48) to represent 0, and use CHR$(1) or CHR$(49) to represent 1. The practice of
using character code numbers CHR$(48) and CHR$(49) is not recommended, however, as it is not
conducive to clear programming and, in any case, is not universally available on commands whose
parameters can only be either 0 or 1.
- HL-1670N HL-6050D HL 5250DN HL-5070N HL-2460 HL-6050DN HL-2150N HL 2700CN HL-2130 HL-S7000DN HL-3040CN HL 1650 HL-6050 HL-5240 HL-5240L HL-1470N HL 3070CW HL 5170DN HL-3450CN HL-3140CW HL 5470DW HL-5140 HL-5440D HL-7050 HL-2240 HL-5040 HL-4070CDW HL-1870N HL-1110 HL-1850 HL 4150CDN HL-8050N HL 5450DN HL 5370DW HL-5050 HL-2140 HL 1270N HL-2600CN HL-6180DW HL-5350DN HL-4050CDN HL-2070N HL-3260N HL-5150D HL-5280DW HL-3170CDW HL-4570CDW HL-3150CDW HL 4040CN HL-4140CN HL 2240D HL 2270DW HL-1250 HL-7050N HL 5340D HL-2250DN HL-1450 HL-L9200CDWT HL-1112 HL-5270DN HL-5450DNT HL-L8250CDN HL 4570CDWT HL-5380DN HL-6180DWT HL-L8350CDW HL-4040CDN HL-L8350CDWT HL-2230 HL-5470DWT HL 2220 HL-1110E HL-1112E