Graphics. Epson LQ-510
advertisement
Assistant Bot
Need help? Our chatbot has already read the manual and is ready to assist you. Feel free to ask any questions about the device, but providing details will make the conversation more productive.
Graphics
The dot graphics mode allows your printer to produce pictures, graphs, charts, or almost any other pictorial image you can create.
Because many commercial software programs use graphics, you may be able to print pictures and graphs like the ones on this page and the next by simply giving your software a few instructions.
The quickest and easiest way to print graphics on your printer is to use a commercial graphics program. With such programs you usually create an image on your monitor then give a command to send the image to the printer.
If you use commercial software that produces graphics, all you need to know about dot graphics is how to use the software. The application program will take care of the printer. (Some programs call this bit image printing.) On the other hand, if you wish to do your own programming or merely wish to understand how this printer prints graphics, read on.
Software and Graphics 4-9
Graphics
I n c o m e B r e a k d o w n
The Print Head
To understand dot graphics you need to know a little about how your printer’s print head works.
The print head has 24 pins. As the print head moves across the page, electrical impulses cause the pins to fire. Each time a pin fires, it strikes the inked ribbon and presses it against the paper producing a small dot. As the print head moves along, the pins fire time after time in different patterns forming letters, numbers, and symbols.
Because the dots overlap each other both horizontally and vertically in Letter Quality mode, it is difficult to see the individual dots.
Instead, the letters and symbols seem to be made up of unbroken lines.
In order for the dots to overlap vertically, the pins in the print head are in more than one column, but the intelligence of the printer handles the timing of pin firings so that the effect is that of 24 pins arranged in a single vertical column.
Dot patterns
The print head is able to print graphics, as well as text because graphic images are formed on the printer in about the same way that pictures in newspapers and magazines are printed. If you look
4-10 Software and Graphics
Graphics closely at a newspaper photograph, you will find that it is made up of thousands of small dots. Your printer also forms its images with patterns of dots, as many as 360 dots per inch, horizontally and 360 dots per inch, vertically. The images printed by this printer can, therefore, be as finely detailed as the ones at the beginning of this section.
Twenty-four-pin graphics
The graphics mode that takes full advantage of this printer’s print head is 24-pin graphics. This mode has five densities, but for simplicity this explanation deals with only one of them, tripledensity.
Triple-density prints up to 180 dots per inch, horizontally. As the print head moves across the paper, every 1/180th of an inch it must receive instructions about which of its 24 pins to fire. At each position it can fire any number of pins, from none to 24. This means that the printer must receive 24 bits of information for each column it prints. Since the printer uses B-bit bytes of information in communicating with the computer, it needs three bytes of information for each position.
Pin labels
To tell the printer which pins to fire in each column, you first divide each of the vertical columns into three sections of eight pins each and consider each section separately. Since there are 256 possible combinations of the eight pins in each section, you need a numbering system that allows you to use a single number to specify which of the 256 possible patterns you want. This numbering system is shown below:
1 2 8
6 4
3 2
1 6
8
4
2
1
Software and Graphics 4-11
Graphics
To fire any one pin, you send its number to the printer. To fire more than one pin at the same time, add up the numbers of the pins and send the total. Using these labels for the pins, you fire the top pin by sending 128. To fire the bottom pin, you send 1. If you want to fire only the top and bottom pins, you simply add 128 and 1, and send
129.
By adding the appropriate label numbers together, you can fire any combination of pins. Below are three examples of how to calculate the number that will fire a particular pattern of pins.
With this numbering system, any combination of the eight pins adds up to a decimal number between 0 and 255, and no numbers are duplicated.
Since there are 24 pins in each column, you must make a calculation for each of the three sections in each column. As you can see, this method of planning and printing dot graphics requires considerable calculation. Because triple-density uses 180 columns per inch, printing a single line of triple-density graphics only one inch long requires 540 numbers. Fortunately, commercial graphics software is available to do these calculations for you.
Before you can put these numbers into a graphics program, however, you need to know the format of the graphics command.
4-12 Software and Graphics
Graphics
The Graphics Command
The graphics mode command is quite different from the other commands used by the printer. For most of the other printer modes, such as emphasized and double-wide, one ESC code turns the mode on and another turns it off. For graphics, the command is more complicated because the code that turns on a graphics mode also specifies how many columns it will use. After the printer receives this code, it interprets the numbers that follow as pin patterns and prints them on the paper.
Your printer has one command that allows you to use any of the 11 graphics options. The format of the command is:
ESC * m n1 n2 data
In this command, m selects the graphics option and n1 and n2 specify the number of columns to reserve for graphics. The available graphics options are listed below:
Option Pins
Single-density
Double-density
High-speed double-density*
Quadruple-density*
CRT I
CRT II
Single-density
Double-density
CRT III
Triple-density
Hex-density*
l
Adjacent dots cannot be printed in this mode.
8
8
8
8
8
8
24
24
24
24
24 m
0
1
2
3
4
4
31
3 3
38
39
40
Horiz. density dots/in.
60
120
120
240
80
90
60
120
9 0
180
360
Software and Graphics 4-13
Graphics
Column Reservation Numbers
The graphics command requires more than one number to specify how many columns to reserve because one line can use thousands of columns, but the printer does not use numbers larger than 255 in decimal. Therefore the graphics mode command uses two numbers, n1 and n2, for reserving columns.
To find n1 and n2, divide the total number of columns by 256. The result is n2; the remainder is n1. Since the command is set up for two numbers, you must supply two even if you need only one. When you need fewer than 256 columns, just make n1 the number of columns you are reserving and make n2 a zero.
For example, if you wish to send 1632 columns of graphics data, n1 should be 96 and n2 should be 6 because 1632 = 96 + (6 x 256).
The printer interprets the number of bytes specified by n1 and n2
as
graphics data, no matter what codes they are. This means that you must be sure to supply enough bytes of graphics data or the printer will stop and wait for more data and will seem to be locked. If, on the other hand, you supply too much graphics data, the excess will be interpreted and printed as regular text.
A Simple Graphics Program
This first program is just a simple example to show you how the graphics command, column reservation numbers, and data can be used in a BASIC program.
4-14
Software and Graphics
Graphics
Type in and run the following program. Be especially careful to include both semicolons. The program produces the printout you see below:
10 WIDTH "LPT1:",255
20 LPRINT CHR$(27)"*"CHR$(32)CHR$(40)CHR$(0);
30
FOR X=1 TO 120
40 LPRINT CHR$(170);
50 NEXT X
Line 20 selects single-density 24-pin graphics mode (mode 32) and also reserves 40 columns for graphics. Since 24-pin graphics requires three bytes of data for each column, line 30 begins a loop to supply
120 bytes of data. Line 40 contains the number 170, which produces the first pin pattern shown in the section on pin labels, and line 50 ends the loop.
Designing Your Own Graphics
With what you know now, you can use the simplest application of graphics-calculating by hand the data to print the graphic image.
While this method is the most tedious, it helps you understand dot graphics. It is also useful for small graphic elements that are used many times.
Software and Graphics 4-15
Graphics
The illustration below shows how you can use a grid on paper to plan where you want dots to be printed. This grid is for a single line of graphics 42 columns long. Since each line of 24-pin graphics is approximately 1/8th of an inch high and since triple-density graphics prints 180 dots per inch, horizontally, a design planned on this grid will be about 1/8th of an inch high and less than 1/4th of an inch wide.
The actual pattern that the printer prints on the paper is, of course, made up of dots that overlap each other both vertically and horizontally. The reason the planning grid uses an x for each dot is that using an accurate representation of the dots makes calculating the data numbers difficult because they cover each other. Therefore, remember that each x represents the center of a dot, and the dots actually overlap.
Write the assigned values of the pins next to your design, then total the values for each column of dots. These totals are the values that you send to the printer as graphics data to print the design.
4-16 Software and Graphics
Graphics
Below is the same grid divided into three sections to make the data calculation easier. At the bottom of each section of each column is the total of the pin numbers for that section. This gives you the total of 126 data numbers necessary to print this small figure.
Software and Graphics 4-17
Graphics
Below is the BASIC program that prints the design shown on the previous pages. Note that the data numbers in lines 80 through 140 are the same numbers that are at the bottom of each section in the last illustration. The WIDTH statement in line 10 is for IBM PC
BASIC; the WIDTH statement format may be different for your system.
10 WIDTH "LPT1:",255
20 LPRINT CHR$(27)"*"CHR$(39)CHR$(42)CHR$(0);
30 FOR X=1 TO 126
40 READ N
50 SPRINT CHR$(N);
60 NEXT X
70 LPRINT
80 DATA 0,0,63,0,0,127,0,0,255,0,3,255,0,15,255,0,31,255
90 DATA 0,127,255,0,255,255,1,255,255,3,255,255,7,255,255,15,
255,255
100 DATA 31,255,254,31,255,252,31,255,248,31,255,240,31,255,
224,31,255,192
110 DATA 31,255,0,31,252,0,31,240,0,31,224,0,31,128,0,31,240,0
120 DATA 31,255,192,28,255,224,28,127,240,28,15,248,30,0,252,
31,0,126
130
DATA
15,128,15,7,192,7,3,240,7,1,254,7,0,255,7,0,127,135
140 DATA 0,31,199,0,7,231,0,1,247,0,0,255,0,0,127,0,0,63
In this program, line 20 assigns the graphics option (24-pin tripledensity) with code 39. Code 42 sets the number of pin columns at 42.
Lines 80 through 140 contain 126 bytes of data (42-pin columns x 3 bytes) for each pin column. Lines 30 through 60 print the design that you see below:
4-18 Software and Graphics
Graphics
Notice that the dots overlap quite a bit. This design was printed using the triple-density, 24-pin graphics option because the density is the same (180 dots per inch) in both directions.
Adding the following lines to the preceding program causes the pattern to print 10 times in a row as shown below:
15 FOR C=l TO 10: RESTORE
65 NEXT C
Software and Graphics 4-19
advertisement
Related manuals
advertisement
Table of contents
- 1 FRONT MATTER
- 4 TABLE OF CONTENTS
- 8 INTRODUCTION
- 8 Features
- 9 Options
- 11 About This Manual
- 12 Application Notes
- 13 Where to Get Help
- 14 CHAP 1-SETTING UP THE PRINTER
- 15 Unpacking the Printer
- 15 Checking the Parts
- 17 Choosing a Place for the Printer
- 19 Assembling the Printer
- 19 Installing the Platen Knob
- 20 Installing the Ribbon Cartridge
- 23 Attaching the Paper Guide
- 26 Testing the Printer
- 26 Plugging in the Printer
- 27 Running the Self Test
- 34 Checking the Operation
- 35 Connecting the Printer to Your Computer
- 35 The Parallel Interface
- 38 Setting Up Your Application Software
- 38 Choosing From a Menu
- 40 CHAP 2-PAPER HANDLING
- 41 Using Single Sheets
- 41 Loading Paper
- 44 Reloading During Printing
- 45 Using Continuous Paper
- 45 Positioning Your Continuous Paper Supply
- 46 Loading Continuous Paper
- 52 Switching Between Continuous and Single Sheets
- 52 Switching to Single Sheets
- 56 Switching Back to Continuous Paper
- 59 Printing on Special Paper
- 59 The Paper Thickness Lever
- 62 Multi-part Forms
- 63 Labels
- 65 Envelopes
- 67 CHAP 3-USING THE PRINTER
- 68 Operating the Control Panel
- 72 Setting the DIP Switches
- 72 Changing a DIP Switch Setting
- 73 The DIP Switch Tables
- 75 The DIP Switch Functions
- 76 Page Length
- 77 Skip Over Perforation
- 78 Adjusting the Loading Position
- 78 The Loading Position
- 79 Using Micro-adjustment
- 80 Using Short Tear-Off
- 81 Adjusting the Tear-off Position
- 83 Selecting Typestyles
- 84 Character Fonts
- 85 Condensed Mode
- 86 Selecting an International Character Set
- 88 Choosing a Character Table
- 90 Using the Data Dump Mode
- 93 CHAP 4-SOFTWARE AND GRAPHICS
- 94 Enhancing Your Printing
- 94 Character Spacing
- 95 Character Size
- 96 Special Effects and Emphasis
- 98 Selecting Typestyles With Master Select
- 101 Graphics
- 102 The Print Head
- 105 The Graphics Command
- 106 Column Reservation Numbers
- 106 A Simple Graphics Program
- 107 Designing Your Own Graphics
- 112 User-defined Characters
- 112 Designing Your Characters
- 114 Defining Your Characters
- 116 Sending Information to Your Printer
- 119 Printing User-defined Characters
- 120 Copying ROM Characters to RAM
- 121 Letter Quality Characters
- 122 Mixing Print Styles
- 125 CHAP 5-USING THE PRINTER OPTIONS
- 126 The Cut Sheet Feeder
- 126 Installation
- 129 Paper Handling
- 133 Testing the Printer in the Cut Sheet Feeder Mode
- 135 Operating the Cut Sheet Feeder
- 135 Single-sheet Insertion
- 139 Removing the Cut Sheet Feeder
- 141 The Pull Tractor
- 141 Installation
- 143 Paper Handling
- 148 Removing the Pull Tractor
- 152 The Multi-Font Module
- 154 Installation
- 157 Selecting a Font
- 158 The Interface Boards
- 158 Choosing an Interface
- 159 Compatible Interfaces
- 159 Installation
- 165 #8143 New Serial Interface
- 167 CHAP 6-MAINTENANCE
- 168 Cleaning the Printer
- 170 Replacing the Ribbon
- 176 Transporting the Printer
- 177 CHAP 7-TROUBLESHOOTING
- 178 Problems and Solutions
- 180 Power Supply
- 181 Printing
- 190 Paper Handling
- 200 Options
- 211 CHAP 8-TECHNICAL SPECIFICATIONS
- 212 Printer Specifications
- 212 Printing
- 214 Paper
- 217 Mechanical
- 218 Electrical
- 218 Environment
- 219 Interface Specifications
- 219 Pin Assignments for the Parallel Interface
- 221 Interface Timing
- 222 Printing Enabled/Disabled Signals and Control Conditions
- 223 Option Specifications
- 223 Single-bin Cut Sheet Feeder
- 225 Initialization
- 225 Default Settings
- 227 CHAP 9-COMMAND SUMMARY
- 228 Using the Command Summary
- 230 Control Key Chart
- 231 Commands in Numerical Order
- 234 Commands Arranged by Topic
- 234 Printer Operation
- 237 MSB Control
- 238 Data Control
- 239 Vertical Motion
- 245 Horizontal Motion
- 248 Overall Printing Style
- 250 Print Size and Character Width
- 254 Print Enhancement
- 259 Word Processing
- 260 Character Tables
- 262 User-defined Characters
- 264 Graphics
- 267 APPENDIX
- 268 Proportional Width Table
- 272 Character Tables
- 275 GLOSSARY
- 283 INDEX