Technical data
Table Of Contents
- 0. i Cover B
- 0. i Copyright B
- 0. i TOC B
- 1. i Introduction B
- 2. i Programming Concepts B
- 3. i Code Quick Reference B.backup
- 4. i Standard Command Codes B
- 5. i Optional Command Codes B
- 6. i Bi-Directional Communications B
- 7. i Appendix B
- 7
- appendix
- custom graphics
- CUSTOM GRAPHICS EXAMPLE
- 1. Determine the matrix size for the graphic. It must be in 8 dot by 8 dot blocks. The example here has six blocks horizontally and six blocks vertically (48 x 48).
- 2. Lay out a grid and draw the image on the grid.
- 3. Transfer the image into a bit map representation and then into hexadecimal format:
- 4. Using the hexadecimal data, send the following code to print the graphic image as designed.
- 5. To send the data in binary format, the software must convert the data into binary format before transmitting it to the printer. Using the BASIC programming language for example, this is done by notation “CHR$ (&HC0)” which sends the hexidecima...
- PCX GRAPHICS EXAMPLE
- CUSTOM GRAPHICS EXAMPLE
- printer configuration commands
- reference tables

Unit 2: Programming Concepts
i Programming Reference
2-3 PN: 9001158B
SELECTING PROTOCOL CODES
Protocol codes are the special control characters that prepare the printer to receive instructions. For example, the
<ESC> character tells the printer that a command code will follow and the <ENQ> character asks for the printer
status.
There are two pre-defined different sets of Protocol Control codes to choose from. Each set is made up of six
special characters. The Standard Protocol Control codes are non-printable characters, and the Non-Standard
Protocol Control codes are printable characters. The Non-Standard set may be useful on host computers using
protocol converters or in an application where non-printable ASCII characters cannot be sent from the host.
This manual uses the Standard Protocol Control codes for all of the
examples. Alternately, the user may define and download a set of custom
Protocol Control Codes (see Appendix D).
PROTOCOL CODES
CONTROL
CHARACTER
STANDARD
DSW2-7 OFF
NON-STANDARD
DSW2-7 ON
DESCRIPTION
STX 02 Hex 7B Hex = { Data start
ETX 03 Hex 7D Hex = } Data end
ESC 1B Hex 5E Hex = ^ Command Code to follow
ENQ 05 Hex 40 Hex = @ Get printer status, Bi-Com Mode
CAN 18 Hex 21 Hex = ! Cancel print job, Bi-Com mode
Off-Line 40 Hex 5D Hex = ] Take printer Off-Line