. . .

. .

ii

.,

L.

I

n Unidirectional printing

Unidirectional printing is a big word that means printing in one direction on@. SD-IO/l5 normally prints when the printhead is moving in both directions. But once in a while you may have an application where you are more concerned about how the vertical lines align than with how fast it prints. SD-lo/IS lets you make this choice. The table below shows the commands for controlling how SD- 1O/l 5 prints.

 

Table 8-3

 

 

Printing

direction

commands

 

 

Function

Mode

Control code

 

Print in one direction

STAR

< ESC >

“U”

11

 

IBM

<ESC>

“U”

1

Print in both directions

STAR

<ESC>

“U”

0

 

IBM

< ESC >

“U” 0

One-time print in one

STAR

<ESC >

“<”

 

direction

IBM

<ESC>

“c”

 

Try this program to see the difference that printing in one direction makes.

10 'Demo unidirectional printing.

20 LPRINT CHR$(27) "A" CHR$(7) ; 'Line spacing = 7/72". 30 FOR I = 1 TO 10

40 LPRINT "I"

50 NEXT I

60 LPRINT : LPRINT

70 LPRINT CHR$(27) "U" CHR$(l) ; 'Turn on unid irectional printing.

80 FOR I = 1 TO 10

90 LPRINT "I"

100 NEXT I

110 LPRINT CHR$(12) CHR$(27) “@”i 'Form feed, master reset.

Here is what you will get. The top line is printed bidirectionally,

and the bottom is printed undirectionally. 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. Lines 30-50 print 10 vertical line characters. Then line 70 sets one-direction printing and the vertical lines are printed

71

Page 79
Image 79
Star Micronics SB-15 user manual Print in one direction