LabelWriter 400 Series Technical Reference Manual
Page 8
Printer Commands and Control
The printers support two types of commands through the USB interface: data commands and
USB interface commands. As with all USB printers, data commands for imaging a page are
provided to the printer through the Bulk OUT endpoint. For information on USB interface
commands, refer to the
Universal Serial Bus Device Class Definition for Printing Devices
document.
Data commands for printing consist of print data and ESC commands. Print data is used to
define the dot pattern to print for each raster line. ESC commands (commands preceded by an
ASCII <esc> character, 0x1b) are commands that change printer parameters, such as margins
and raster line offsets. All printer parameters are set to specific default values by a power-on
reset or software reset command from the host computer. Parameters can be modified by the
host computer at any time and will take effect as soon as the modifications are sent.
Print Data
Print data is encoded in strings of 8-bit bytes, preceded by a single synchronization character.
Two print line commands specify whether the data format is uncompressed or compressed.
Uncompressed data is preceded by an ASCII <syn> character (0x16), and compressed data is
preceded by an ASCII <etb> character (0x17). Appendix A describes the compressed data
format.
The Bytes-per-Line variable controls the number of bytes required for each line of print data.
The default value for all 400 series printers is 84 bytes per line (84 * 8 = 672, the number of
dots in the print head). The host computer can send fewer bytes than the maximum by
preceding the print data with the Set Bytes per Line command (<esc> D n, where n is the
number of bytes). The control electronics do not check the validity of the new value. Therefore,
it is the responsibility of the host software to send only those values which are valid for the
width of the print head.
In addition to sending fewer bytes per line, the host computer also has the ability to adjust the
starting point on a line by using the Set Dot Tab command (<esc> B n, where n is the starting
byte number; valid values are 0-83). If the host computer modifies the starting byte, the number
of bytes per line must be adjusted downward by a corresponding amount. The control
electronics do not check the validity of the dot tab against the bytes per line. Therefore, it is the
responsibility of the host software to send correct combinations of these two variables.
Both the dot tab variable and the bytes-per-line variable are held by the control electronics until
they are changed by a new command sequence or are reset to default values by a power-on reset
or a software reset command.
Data Synchronization
After the printer receives a <syn> or <etb> character, it takes the following n value and puts it
into the RAM buffer. The value for n is determined by the number of bytes required to specify a
full line of data. This value is affected by the setting for Bytes per Line and, in the case of
<etb>, the data compression of the bit pattern. It is important to note that the n values which
follow <syn> or <etb> characters are interpreted only as graphical data. This means that
Содержание LabelWriter 400 Duo Guide
Страница 6: ...LabelWriter 400 Series Technical Reference Manual Page 6 ...
Страница 20: ...LabelWriter 400 Series Technical Reference Manual Page 20 ...
Страница 22: ...LabelWriter 400 Series Technical Reference Manual Page 22 ...
Страница 26: ...LabelWriter 400 Series Technical Reference Manual Page 26 ...