Benutzeranleitung / Produktwartung NX-10 des Produzenten Star Micronics
Zur Seite of 129
NX-10 USER’S MANUAL NOT INTENDED FOR SALE PN 80820128.
Federal Communications Commission Radio Frequency Interference Statement Thw rquipment generates and uses radio frequency energy and if not installed and used properly. that is. in strl~“l accordance Lvith the manufacturer’s instructions, may cause in- terference to radio and [etexxion reception.
I Table of Contents Chapter 1 Setting Up Your Printer Where shall we put it? What have we here? Removing the printer cover Removing the packing tube Installing the ribbon cartridge Chapter 2 Getting t.
23 Chapter 3 Basic Printing Some basics of BASIC A new language! First steps ASCII codes and the CHR$ function Control codes The escape codes A note on command syntax Some special kinds of text Near L.
Chapter 5 Special Features of the Printer Now hear this 61 Resetting the printer Putting your printer to sleep Printing the bottom of the sheet Backspace, delete, and cancel text Printing zeroes Immed.
., .,. . Chapter 7 Dot Graphics Comparing dot graphics with download 101 characters Using the dot graphics commands Specifying the number of columns of dots Specifying the graphics data Combining text.
- ..” Appendix D Function Codes Commands to control print style Font style controls Font pitch controls 165 Special print modes Controlling the vertical print position Line feed and reverse line fee.
CHAPTER 1 SETTING UP YOUR PRINTER Subjects we’ll cover in Chapter 1 include- . Choosing a suitable place for your printer; l Unpacking your new printer; l Setting it up. WHERE SHALL WE PUT IT? Before you do anything else, give some thought to where you’ll be using your printer.
2 WHAT HAVE WE HERE? Now let’s take a look at what’s in the carton. Open it up and check each item in the box against Figure l-l. There should be four items. . . -- -_ _ F ‘igure l- 1. Check to make sure you have all four items: 1) printer, - 2) paper guide, 3) ribbon cartridge, and 4) user’s manual.
lj 3 Removing the printer cover is easy. Lift up the back of the cover to disengage the two tabs at the front and then lift it off the rest of the way. To replace it, just slide the tabs in at the front and lower it into place. Figure 1-2 shows the proper posi- tion and movement for both removing and replacing the cover.
Figure 1-3. Remove the protective tube from the carriage rail. Up to this point, we’ve been clearing the decks for action, so to speak. Only one more thing left to do before we can start printing - install the ribbon cartridge.
c_ / . 5 Warning: The print head gets hot during operation, so let it cool off before you touch it. Figure 1-4. Press the cartridge into place until the holdmg springs snap into place.
6 Print head Figure 1-5. All you have to do is to slide the print head carriage manually to your right or left, then the ribbon slips down by itself into its proper position.
., CHAPTER 2 GETTING TO KNOW YOUR PRINTER Subjects we’ll cover in Chapter 2 include - l Parts of the printer - what they’re for and how to use them; l Paper selection and loading; l Adjustment; l Connecting your printer to the computer; l Extra functions with the control panel.
r ’ I Tractor feed unit nterf Power cord ’ Power switch Figure 2- 1. Front and rear views of the printer TRACTOR FEED UNIT - The drive gear and sprockets of the tractor feed unit move sprocket-feed paper through the printer.
I . _ . w. L-. . . w.. . . . LI dI 9 I. PLATEN - This is the rubber cylinder that carries paper to the print head. INTERFACE CONNECTOR - On the back of the printer, this connector is used to connect your computer to the printer. n Controls and indicators Now let’s take a tour around the controls, starting with the control panel on the right.
10 n Extra functions There are eleven more functions that are not directly specified on the control panel. You can use six of them by press- ing a key (or keys) when you turnon the power; five others are activated by pressing two control keys at once.
11 you’ll be using often. This lever controls the pressure of the paper against the platen. It has four settings: g - The top setting is used when you want to load paper in the printer. c - The second setting is for normal single sheets. fi - The third is for sprocket-feed paper.
19 OK? Let’s start. 1. Move the sprockets on the tractor feed unit all the way to the ends. 2. Slide the sheet guide all the way to the right. 3. With the ribs of the paper guide toward you and the sliding adjuster at the bottom left, insert the guide into the slot at the back of the printer cover.
L Figure 2-5. . . . . . . . . *. l’rop up the paper guide by inserting me guise stana in the notches provided for it. 1 1 ‘igure 2-6. You can insert a sheet of paper by using the release lever.
14 9. Now set the release lever to the auto-feed setting-the top position. The printer will advance the paper automatically. 10. When the paper stops, set the release lever for single sheets again. To align paper that is not in straight- . Set the release lever to the adjustment setting.
I I . ‘,,, ,’ 15 5. Flip the clamp levers backward. This allows the two sprocket units to move freely right and left so you can align them with the holes in the paper.
ADJUSTING THE PRINT HEAD The distance between the print head and the platen must-be adjusted to accommodate papers of different thicknesses. To make this adjustment, move the adjustment lever, which is under the printer cover and immediately in front of the release lever (Figure 2-9).
*_ . 17 1. Make sure both your computer and printer are turned off. 2. Connect one end of the interface cable to the connector socket at the right rear of the printer as shown in Figure 2-10. 3. Connect the other end of the cable to your computer as described in the computer manual.
18 n Self-tests Your printer has two built-in programs that print out sample lines of letters, numbers, and other characters-to show you that everything’s in good working order.
n Hex dump Can you guess what a “hex dump” is? No, it’s not where witches throw away useless spells. A hex dump is an advanced ability of your printer that you can use, in certain cases, to find a problem with your system. Fortunately, such problems rarely arise but the hex dump is available if one does.
1. Plug in the printer (don’t turn it on yet). 2. While holding both the Mode and Bold keys, turn on the power switch. Right margin set **: Hold down L- Left margin set ~---____ Figure 2-13. You can set many functions by the combinations o the control panel keys while in the Off Line mode.
Mode key - Left margin set Paper Feed key - Right margin set 3. While holding the two keys, the print head moves across the page step-by-step. 4. When the print head goes to the position where you want to set margin, release the two keys. So the printer acknowledges the margin with the sound of beep.
22 MEMO.
CHAPTER 3 BASIC PRINTING Subjects we’ll cover in Chapter 3 include- * Listing BASIC programs on the printer; l How a program prints things; l Control codes, escape codes, and command syn- tax; l Nea.
; 24 language, perhaps recalling the rigors of high-school Latin. Others are unnerved by anything having to do with computers. Well don’t be! In the first place, BASIC may well be the easiest langua.
25 output to the screen. Other computers, notably the Commodore C-64, require you to open the printer as a numbered device then to direct output to that device. For example, you might type the following to print “Hello!” or to list a program in the C-64’s memory.
would enter LPRINT CHR$(65). To make the printer’s bell sound, we would LPRINT CHR$(7). In general, we print a character by entering LPRINT CHR$(ASCII code) to the printer. We can also use hex ASCII codes. Although we use only decimal ASCII codes in this manual, you should understand at least what a hex code is.
27 line feed -the name of the code UJ’) -its abbreviation ASCII 10 -its decimal value ASCII &HOA -its hexadecimal value (the &H signifies CHR$(lO) CTRL- J hex) -the way it’s used in BASIC -the way you send it from a keyboard Of course, most of the time we don’t need to bother with these.
28 This command that turns on expanded printing. (ESC), as we mentioned earlier, is the escape code (which is ASCII code 27). A letter or number in quotes (such as the “W” above) means that the character should be sent to the printer (without the quotes).
29 But for the final printout, try NLQ. The program below shows how. 10 1 Demo 20 LPRINT 30 LPRINT 40 LPRINT 50 LPRINT of NLQ character set CHR$(27);"xl"; "This line shows NEAR LETTER QUALITY! CHR$(27);"xO"; "This line shows standard print.
f Demo of italic and :; LPRINT CHR$(27)*"4"* 30 LPRINT "This li;e ii 40 LPRINT CHR$( 27);"5y 50 LPRINT "This line is Here is what you should get: roman in ITALIC characters." in ROMAN characters." In this program, line 20 turns italic on with (ESC) “4”, and line 40 turns italic off with (ESC) “5”.
31 In this program underline is turned on in line 20 with (ESC) “ -“l, and then off in line 40 with (ESC) “-“O. There’s a new little wrinkle in this program, though. The semicolons at the end of the first three lines told BASIC that those lines were to be continued.
32 Here line 30 turns on superscripts with (ESC) “SO. It’s turn- ed off in line 50 with (ESC) “T”. Then between printing text, subscripts are turned on in line 70 with (ESC) “S’l, and finally off in line 90. Again, everything prints on one line because of the semicolons.
33 Line 20 turns on elite pitch with (ESC) “M”. Line 30 prints a line at 12 characters per inch. The (ESC) “P” in line 40 resets the printer to pica pitch and line 50 prints a line in pica pitch. W Expanded print Each of the print pitches can be enlarged to twice its normal width.
34 Now the results look like this: When you turn on expanded print with (ESC) “W”l it stays on until you turn it off with (ESC) “W”0. Table 3-6 Table 3-6 Expanded print commands Expanded print commands n Condensed print Each of the print pitches also can be condensed to its normal width.
Table 3-7 Condensed print commands Function Control code Condensed ON CHR$(15) 01 (ESC) CHR$(15) Condensed OFF CHR$(18) By combining expanded print and condensed print with the two pitches, this printer has eight different character widths available.
This line is CONDENSED ELITE pitch, This line is CONDENSED PICA pitch. This line is NORMRL ELITE pitch. l-l-1 :i, vii :I. :i n e :i, 5; 111 IX? Pi u I,,., P 1: c:: (4 fl:, i t c3 t-l n This line is EXPANDED CONDENSED ELITE. This line is EXPANDED CONDENSED PICA.
When you run this program you should get this: This line is NORMAL ELITE printing. This line is F’ROF’ORTIONAL ELITE. “r1.7j.:~ :/.j.I-e j.!ii; r~~I::;(:)~::~(::)~~1-~Ollnj... p:I:C::A. T l-1 i 5; 1. :i. r1 e i 5 NC:) R PI Ci L.. F’ I: CA 1:) r i n .
38 - Try them now with this little program: f boldface and emphasized 2': ~PEE EHR$(~~) ;"G"; 30 LPRINT "This iine is BOLDFACE printing." 40 LPRINT CHR$(27);"E"; 50 LPRINT "This line is BOLDFACE and EMPHASIZED." 60 LPRINT CHR$(27);"H"; 70 LPRINT "This line is EMPHASIZED printing.
39 more efficiently. You have at your disposal a unique command that lets you choose any valid combination of print modes and pitch. This is the Master Print mode command. It looks like this: (ESC) “!” n Here, the value of n defines the print style to be selected.
To better understand the way the print modes work, consider that each mode except pica (pica is the default) has a separate switch that can turned on and off via software. Once the switch is on, it stays on until turned off. When two modes that conflict are turned on at the same time, the printer must choose which one to use.
CHAPTER 4 FORMATTING TEXT Subjects we’ll cover in Chapter 4 include- * The carriage return and line feed; l The amount of space between lines; l Moving to the next page; l The number of lines on a printed page; l Horizontal and vertical tabs; l Setting margins- left, right, top and bottom; l Centering and aligning.
42 Line feed is more complicated. Each time the printer receives a CHR$(lO) it both advances the paper one line and returns the print head to the left margin, ready to start a new line. Now to add a little confusion-most (but not all) versions of BASIC add a line feed (CHR$(lO)) to every carriage return (CHR$(13)) that they send.
43 NEW 10 20 2 2: 70 ( Demo of line spacing FOR I=1 TO 25 IF 1=13 THEN 60 LPRINT CHR$(27);"A";CHR$(I); LPRINT "THIS LINE SPACING IS SET TO";1 NEXT I LPRINT "LINE SPACING IS SET TO 1/6 INCH (NORMAL) .I! 80 LPRINT CHR$(27);"2" 90 END This is what you will get: ! ‘f .
Line 40 changes the line spacing. The command (ESC)“A” CHR$(n) changes the line spacing to n/72 of an inch. The loop that is started in line 20 increases the value of n (the variable I in this program) each time it is executed. So the line spacing in- creases as the program continues.
45 The program works just the same as before, but the line spac- ing are just one-third what they were. This is because (ESC j“3” CHR$(n) sets the line spacing to n/216 inch. Table 4-2 shows all the line spacing commands, including several “shortcut” commands for commonly used line spacings.
46 NEW 10 ' Demo of' one-time line feeds 20 LPRINT "LINE NUMBER 1." ;; LPRINT "LINE NUMBER 2."; ' One-time line feed 50 LPRINT CHR$(27>;"J";CHR$(loO); 60 LPRINT "LINE NUMBER 3." 70 LPRINT "LINE NUMBER 4.
47 PAGE CONTROL Now that we have seen how to control line spacing, we can go on to page control - positioning the printing on the page and ad- justing the paper length. n Form feed The simplest forms control code is the form feed. Form feed (or < FF > ) is CHR$(12) and causes the printer to move the paper to the top of the next sheet.
ed, for example, to print text in a multi-column magazine for- mat; print the first column, then reverse form feed back to.the top of the page to start the second column. The code for reverse form feed is easy to remember: < ESC > < FF > .
49 advance the paper to the top of the next form. Line 50 then prints its message. After you have run this program, turn off the printer and ad- just the top of form position. When you turn the printer back on the page length will reset to its normal setting (usually 11 in- ches).
10 ' Demo of top and bottom margins 60 LPRINT CHR$(12); :' form feed 70 FOR I=1 TO 150 80 LPRINT "THIS IS LINE";1 90 NEXT I 110 LPRINT CHR$(12) :' form feed 120 END When you run this program it will print 150 lines right down the page and across the perforations.
THIS IS LINE 1 THIS IS ILINE 2 THIS IS LINE : THIS IS ILINE 4 THIS I5 LINE 5 THIS IS ILINE 6 THIS IS LINE 7 THIS IS LINE R THIS IS LINE 9 ; THIS I THIS ’ rHIS ; THIS , THIS I THIS LINE 50 LINE 51 LINE 52 LINE 53 LINE 54 LINE 55 I O1 ITHIS IS LINE 56 -.
SETTING LEFT AND RIGHT MARGINS The left and right margins of this printer work just like a typewriter - once they are set all the printing is done between them.
53 When you want to reset the margins to the default values, you have two choices. You can either turn the printer off and back on, or you can set margin values equal to the default values. This means that you should set a left margin of 0 and right margin of 80 in pica pitch.
15 LPRINT CHR$(27);"D";CHR$(7);CHR$(l4);CHR$(21); CHR$(O) (ESC)“D” is the command to begin setting horizontal tabs. It must be followed by characters representing the positions that you want the tabs set. In our program we are setting tabs in col- umns 7, 14, and 21.
,. 55 The aboslute horizontal tab command moves the print head to a specified position on the page. The position that you want the print head to move to (meaured from the left margin) is specified by the values of $21 and n2 in l/60-inch units using the formula nl + n2 x 256.
80 LPRINT 90 END W Vertical tabs Vertical tabs have the same kinds of uses that horizontal tabs do - they just work in the other direction. Horizontal tabs allow you to reach a specific column on the page no matter where you start from. Vertical tabs are the same.
j . 1-I-i I HC) TAM I wx.m-1-i-4 -rAb..
., Add one more line to the program to demonstrate one more feature of vertical tabs. 80 LPRINT CHR$(ll);"FIFTH TAB." Now when you run the program the first page looks just like before, but line 80 sends one more <VT> than there are tabs.
10 1 Demo of vertical tab channels 20 LPRINT CHR$(27>;"b';CHR$(l>;CHR$(lO);CHR$(2O); CHR$(O) ; 30 CLHPRHl~oT)CHR$(27);"b";CHR$(2);CHR$(15);CHR$(25); .
f-w In this program we set tabs at 10 and 20 in channel 1 in line 20. In line 30 we set tabs 15 and 25 in channel 2, and in line 40 we set tabs 17 and 28 in channel 3. Because the channels are stored, you must make the printer to recall one before you use it, so we used (ESC)“I”CHR$(nU) in line 80.
CHAPTER 5 SPECIAL FEATURES OF THE PRINTER Subjects we’ll cover in Chapter 5 include- * Printer’s bell; l Master reset; l Uni-directional printing; l International character sets; l Printing BIG characters; l The optional sheet feeder; l Macro instruction; l Reading a hex dump.
62 sound the bell for a quarter of a second. This can be used to re- mind an operator to change the paper or to make another adjust- ment to the printer.
stop the printer. This will allow you to print to the end of the sheet, and even beyond if you are not careful. The codes to con- trol the paper-out detector, along with the other codes that we have just learned are in the following table.
60 LPRINT "WORK" 70 LPRINT "CANCEL LINE"; 80 LPRINT CHR$( 24); 90 LPRINT "DOES NOT WORK" Here is what this program will print: The backspace codes in line 20 move the printhead a total of three spaces to the left so that the first part of line 30 will over- print the word “NOT”.
65 You can turn immediate-print mode on with (ESC) “i” 1. But before looking at it, let’s review the normal operation of the print buffer. Enter this program.
This line is added 10 spaces. This line is added 8 spaces. This line is added 6 spaces. This line is added 4 spaces. This line is added 2 spaces. This line is Normal space, This command can be used to produce micro-justification, which is a method of justifying lines by incresing the space be- tween each character.
67 Here is what you will get. The top line is printed bi-directional- ly, and the bottom is printed uni-directionally. You will have to look hard because there isn’t much difference. Let’s analyze the program. Line 20 sets the line spacing to 7/72 of an inch so that the characters that we print will touch top to bottom.
Table 5-3 Eighth bit controls Function Control code Turn the eighth bit ON (ESC) “>” Turn the eighth bit OFF (ESC) “=” ~ec~~~~;t~ bit “as is” from ( ESC > ,,#,, n Block graphics char.
I :- ; ::> 69 Figure 5- 1. Character set #2.
70 Figure 5-l shows what this program will print. If your chart doesn’t 1001 like this because it has regular letters and numbers instead of the special symbols, then your computer is only using seven bits.
71 If you have a 7-bit interface, add the following lines to the pro- gram given above: 15 LPRINT CHR$(27);">"; 95 LPRINT CHR$(27);"=" In this program line 10 selects character set #2 so that all the graphics characters can be used (including the “club” sym- bol).
72 Table 5-4 International character set commands I Countrv The characters that change are shown beneath their ASCII code in Table 5-5. Table 5-5 International character sets Country ~35~36~64~91~92~93~94~96~123~124~125~12 U.S.A I#lsl@lcllll*l’lcl:l,l~ IFrance I Germany l#l$lsl~l~lul^l’l~lal~lR al~lrl~lil~l~l~l~l~l- England f .
73 command to “normalize” the high-order control codes is (ESC) “6”. Try this program with the DIP switch 1-6 on. 10 ’ Demo of characters in the high-control code area 20 LPRINT CHR$(27);&qu.
74 130 NEXT I 140 LPRINT CHR$(144);CHR$(145); 150 FOR I=149 TO 159 160 LPRINT CiSS(I); 170 NEXT I 180 LPRINT CH?.$(27);"10" 190 END When you run this program you should get like this: Table 5-6 Control code area co lmmands Function Printable code area expansion Control c (ESC)“G” .
I ;. ” 75 10 ' Demo of BIG characters 20 LPRINT "THIS IS I'; 30 LPRINT CHR$(27);"h";CHR$(l); 40 LPRINT "DOUBLE"; 50 LPRINT CHR$(27) ;"h";CHR$(O); 60 LPRINT " SIZED PRINTING.
When you run this program, you will get like this: n The optional sheet feeder The automatic sheet feeder is a handy option that feeds single cut sheets automatically. Work done on cut sheets looks better that done on computer paper, and you don’t have to tear the “ears” off each sheet as you must with fan-fold paper.
77 which refers to an instruction that “calls,” or uses a group of nor- mal instructions. In computer programming macro-instructions (which are similar to subroutines) save programmers a lot of time and effort. Your printer’s macro can save you a lot of time and effort also.
78 tional pitch, condensed print, expanded print, boldface, em- phasized, and the underlining. Line 40 cancels the superscripts and the subscripts. Line 50 sets the line spacing to l/6 inch, and line 60 sets the left-aligned printing. Then, line 70 ends the macro definition.
79 If your system passes the codes directly to the printer without changing them, you will get like this. (You can print out the last remaining line in the print buffer by putting the printer off line with the On Line key.) a:,,:, 01 02 I:)? 04 05 06 07 If.
80 dumps the characters to the paper. To debug a program quickly, just use the hex dump capabili- ty. Appendix B will help you translate the hex codes to ASCII equivalents.
CHAPTER 6 CREATING YOUR OWN CHARACTERS Subjects we’ll cover in Chapter 6 include - l Designing and printing your own characters; l Designing proportional characters ; l Designing your own characters with NLQ. In the previous chapters of this manual you’ve learned how to control the printer to give dozens of different typefaces.
see, the capital letters use the top seven wires of the printhead, and the descenders (such as the lower case “p” shown) use the bottom seven pins. As the printhead moves across the page (in either direction - that’s what is meant by bi-directional print- ing) it prints one column of dots at a time.
83 character sets, and the NLQ characters. But there is another area of memory in this printer reserved for user-defzked characters. These are characters that you can design and download into the printer. When download characters are defined they are stored in RAM (random access memory), which allows you to define or modify them at any time.
download character. You can see how we’ve laid it out in Figure 6-5. Later in this chapter we’ll use this character to create a small graph.) E Tigure 6-4.
I . . 85 One bit in the download character definition command is to be treated as a descender or not. We’ll get to the command in due time. For now, if your character uses the top eight dots, write in a one next to the word “Descender” on the layout grid; if it uses the bottom eight dots, write in a zero.
1 m m, m, m, m. m. m m, m. m m 64 32 16 4 2 1 Tolal ASCII Code WRONG! Descender Start column End column M, = Descender l 128 + (Slat1 * 16) + End i Figure 6-6. cots cannot overlap; those in immediately adjacent “half columns” will be ignored when the character is printed.
87 So add up the values of the dots in each column using this system. In Figure 6-8 we’ve shown our grid with the sums of the columns filled in across the bottom (see if these agree with your answers!). Across the top of the grid you’ve probably noticed the cryptic labeling of each column: ml, m2, m3, etc.
also access the character from a BASIC program with the CHR$ function. There are no rules or restrictions on the use of numbers. This means you can use whatever is most convenient for you - perhaps seldom-used keys can be replaced by more useful characters.
I 1. : : 89 n Download character definition command You’ve read through a long explanation of download characters and we haven’t even told you the command syntax yet! Now the wait is over. This is the most complex command in your printer repertoire and now you’ve got the necessary knowledge to implement it.
L 0 000 1011 = ll(decimal) Descender Starting Ending date print column print column Figure 6-10. The attribute byte-(M) for our flask character. You’ll probably recognize ml . ..mll from the top of our layout grid. That’s right, each column is described by one byte.
I PRINTING DOWNLOAD CHARACTERS You’ve now defined and sent three characters to your printer. But how do you know that? If you try printing those characters now you don’t get a flask, car and gun. Instead you get . . ( = ). That’s because the download characters are stored in a different part of the printer’s memory.
92 Nope! Just three characters in the download set. This is incon- venient for a couple of reasons. First, every time you wanted to use a download character you would have to switch back and forth between character sets. Knowing that you wouldn’t want to do that, your printer won’t even allow it.
93 70 NEXT M 80 NEXT N 90 LPRINT 100 DATA 139, 2, 5, 8,241, 0, 0,241, 8, 5, 2, 0 110 DATA 139,124, 0, 66, 4, 64, 36, 16, 16 12 120 DA% 139: 46: 160, 2, 60, 0, 48, 0, 130 L%NT"~H~~~27;~"D"-cHR$(ll)CHR$(0) 140 LPRINT CHR$(27)f"h";CHR$(l);' 150 LPRINT " U.
94 Note that we didn’t have to re-enter the download characters, since they were already sent to the printer with the first pro- gram. They will stay with the printer until you download new characters to replace them or turn the printer off.
95 character width is five dots (so you could not, for instance, specify a starting column of 6 and an ending column of 8, even though those are both within the acceptable range). If you in- advertantly give an incorrect width value, however, your printer is forgiving: it will automatically revert to the default width of eleven dot columns.
96 Because the NLQ characters can use as many as 16 dots ver- tically and 11 dots horizontally, you plan your designs on a dif- ferent grid than the one you used for draft characters.
97 ASCII Code: ($0 Descender: 2. Start column: End column: MO = Descender* 128 + (Start * 16 ) + End Figure 6- 13. Add the values of the dots in each box and line col- umn and write the sum of each column at the bottom. Now enter the following program and run it.
140 DATA 139, 46, 16, 2, 60, 0, 48, 0, 48, o, 48, o 150 DATA 92, 32, 4, 60, 0, 48, 0, 48, 0, 48, 0 When you want to print the defined character, you must select the NLQ mode first, then select the download characters. If you don’t select the NLQ mode, the download characters are not printed even you selected the download character set.
99 240 LPRINT CHR$(61); 250 NEXT I 260 LPRINT 270 LPRINT "CHEMICALS";CHR$(g); 280 FOR I=.4 TO 8.7 STEP .4 290 LPRINT CHR$(60) 300 NEXT I 310 LPRINT 320 LPRINT "GUNS";CHR$(g); 330 FOR I=.
100 MEMO - -.
CHAPTER 7 DOT GRAPHICS Subjects we’ll cover in Chapter 7 include- . This printer’s bit image graphics capabilities; l Printing a pre-defined shape; l Plotting a calcurated shape; l High-resolution graphics. In Chapter 6 you were introduced to a form of computer graphics; you were able to actually define characters dot by dot.
So when do you use graphics and when do you use download characters? Practically anything you can do with graphics you can do with download characters, and vice versa. A clever pro- grammer could actually plot a mathematical curve using download characters or use strings of graphics data as user- defined characters.
largest number we can send in one byte (that’s what the BASIC CHR$( ) function sends: one byte) is 255. And with the normal density graphics it’s possible to have a graphics image as wide as 480 dots. So to figure out how many columns of graphics data to expect, your printer multiplies n2 by 256 and adds the value of nl to the product.
1 J Figure 7- 1. Starting with the most significant bit at the top, each pin of the print head is assigned a value which is a power of two. A short program should demonstrate how to implement the graphics command. The program below gave us this printout: __----.
105 mathematical function (a sine wave) to create a design. Later in this chapter we’ll show something more complex. The mathematical concepts (such as sine and pi) demonstrated here are not important; you don’t have to be a math whiz to use this printer’s graphics.
106 PRINTING A DESIGN OR LOGO Since you control the firing of every pin, you can print nearly anything with your printer that can draw (and probably better, if you’re like most computer users!). You can be used for creating “computer art” or drawing maps.
107 In the program below, we’ve taken the logo graphics informa- tion and put it into BASIC DATA statements. The program itself is short and simple. The loop starting at line 100 reads the data statements into a string array variable called LOGO$.
340 ' Row 2 350 DATA 0, 60,255,255,255,255,255,143, 15 360 DATA 370 DATA 400 410 DATA 31, 31, 15, 7, 3, o, o, o, ;, ; DATA 0, 0, 0, 0, 0, 0, 0, c, 420 DATA 0, 0, 60,255,255,255,255,255,143: 15 43.
109 20 LINE.8$=CHR$(27)+CHR$(65)+CHR$(8)+CHR$(27)+ CHR$(5Oj 40 LINE.l2$=CHR$(27>+CHR$(65)+CHR$(l2)tCHR$(27)t CHEI$(50) PLOTTING WITH YOUR PRINTER This section of the manual gets into more serious BASIC pro- gramming just because it’s required in order to have the com- puter act as a plotter driver.
80 LX=~O : LY=20 90 LXFAC=72/LX : LYFAC=~'~'/LY 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 it: ;zi 2: 410 420 430 440 450 460 .
660 RANG=ANG%*6 28/360 670 X2=RAD"COS(iANG)tlO : Y2=RADSSIN(RANG)tlO 680 GOSUB 250 690 NEXT ANG% 700 RETURN If you are using with the IBM mode (DIP switch 1-6 off), change the following lines to the program given above.
112 to calculate starting and ending points for a line (in our circle the “lines” are very short - sometimes the starting and ending points are the same). The coordinates of the starting point of the line are assigned to variables Xl and Y 1. The line ends at point X2, Y2.
I 113 600 ’ 610 ) Subroutine to plot a sine wave 620 ) 630 x1=0 : Yl=lo : x2=20 : Y2=10 640 GOSUB 250 650 x1=10 : Y~=O : x2=10 : Y2=20 650 GOSUB 250 670 X1=0 : Yl=lO 680 FOR X2=0 TO 20 STEP .
114 Table 7-2 Dot graphics commands Function Normal densitv (60 dots/inch) 1 (ESC)“*“CI I Control code HR$(O) nl n2 ml m2 . . . Double densit; (120 dotdinch~ _-_ --_- ._.. -.., 1 ( :ESC)“*“CfiR$(l) nl n2 ml m2 Doubledensity.---.--. ~_~~~ , j ,/double weed 1 (ESC )“*“CHR$(2) nl n2 ml m2 “*“CHR$(3) nl n2 ml m2 .
I. Double density graphics Double density/double speed , 115.
.
.
So if quadruple density looks so great, why not use it all the time? Let’s try an experiment on your printer which will show just how the different modes work. Using the first program in this chapter, change line 50 to try each of the different modes.
119 - puting time as double density, it prints at the same speed as nor- mal density graphics. Amazing, you say? Well, it is - until you know the secret. Every other column of dots is ignored, so the output is actually the same as normal density graphics.
120 , graphics densities. These commands, which are shown in Table 7-3, can be used interchangeably with the corresponding (ESC) “*” command. Like the commands you are already familiar with, these new commands are followed by two bytes to specify the number of graphics data bytes to print and then the data.
121 n g-pin graphics mode In the early part of this chapter, we said that the bottom pin of the print head is not normally used in the graphics modes. That’s because most computers communicate with parallel-type peripheral devices using eight data lines.
122 MEMO.
Ein wichtiger Punkt beim Kauf des Geräts Star Micronics NX-10 (oder sogar vor seinem Kauf) ist das durchlesen seiner Bedienungsanleitung. Dies sollten wir wegen ein paar einfacher Gründe machen:
Wenn Sie Star Micronics NX-10 noch nicht gekauft haben, ist jetzt ein guter Moment, um sich mit den grundliegenden Daten des Produkts bekannt zu machen. Schauen Sie zuerst die ersten Seiten der Anleitung durch, die Sie oben finden. Dort finden Sie die wichtigsten technischen Daten für Star Micronics NX-10 - auf diese Weise prüfen Sie, ob das Gerät Ihren Wünschen entspricht. Wenn Sie tiefer in die Benutzeranleitung von Star Micronics NX-10 reinschauen, lernen Sie alle zugänglichen Produktfunktionen kennen, sowie erhalten Informationen über die Nutzung. Die Informationen, die Sie über Star Micronics NX-10 erhalten, werden Ihnen bestimmt bei der Kaufentscheidung helfen.
Wenn Sie aber schon Star Micronics NX-10 besitzen, und noch keine Gelegenheit dazu hatten, die Bedienungsanleitung zu lesen, sollten Sie es aufgrund der oben beschriebenen Gründe machen. Sie erfahren dann, ob Sie die zugänglichen Funktionen richtig genutzt haben, aber auch, ob Sie keine Fehler begangen haben, die den Nutzungszeitraum von Star Micronics NX-10 verkürzen könnten.
Jedoch ist die eine der wichtigsten Rollen, die eine Bedienungsanleitung für den Nutzer spielt, die Hilfe bei der Lösung von Problemen mit Star Micronics NX-10. Sie finden dort fast immer Troubleshooting, also die am häufigsten auftauchenden Störungen und Mängel bei Star Micronics NX-10 gemeinsam mit Hinweisen bezüglich der Arten ihrer Lösung. Sogar wenn es Ihnen nicht gelingen sollte das Problem alleine zu bewältigen, die Anleitung zeigt Ihnen die weitere Vorgehensweise – den Kontakt zur Kundenberatung oder dem naheliegenden Service.