background image

PSB No: P-0082
Page: 

11 of 14

page contains a print sample of the Registered Tables available in printers sold in the
U.S. In order to print the first 31 characters in Tables 1 through 9, the ESC ( ^

command must be sent.

Listed below is a Basic language program and an explanation of the program that will
print the output illustrated on page 13 of this bulletin.

10 FOR Z=1 TO 6

20

READ Y,Y$

30 LPRINT “Table”;Y;” “;Y$
40

LPRINT CHR$(27);“(t”;CHR$(3);CHR$(0);CHR$(0);CHR$(Y);CHR$(0);

50

LPRINT CHR$(27);“t”;CHR$(0)

60

IF Y=0 THEN GOTO 100

70

LPRINT CHR$(27);“(^“;CHR$(31);CHR$(0);

80

FOR X=1 TO 255:LPRlNT CHR$(X);:NEXT X

90

GOTO 120

100 FOR X=33 TO 126:LPRINT CHR$(X);:NEXT X
110 FOR X=161 TO 254:LPRlNT CHR$(X);:NEXT X
120 LPRINT CHR$(10):LPRINT CHR$(10)
130 NEXT Z
140 DATA 0, Italic, 1, PC437 (US),3,PC850 (International),7,PC860 (Portugal)
150 DATA 8, PC863 (Canada-French),9,PC865 (Norway)

Program Description

10

20

30
40

50

60

Begin loop to print the 6 Registered Tables
Read Registered Table number and Table Name
Print Registered Table number and Table Name
Send the Assign Character Table command to the printer assigning the
Registered Character Table read in line 20 to Selectable Character Table 0.
Send the Select Character Table command to the printer selecting Selectable
Table number 0 as the current Character Table for printing.

If the Registered Character Table number is 0, do not execute commands in lines
70 through 90. This is because the Italic Character Table duplicates control
codes and non-displayable characters in ASCII values 127 through 160. Program
lines 100 and 110 prevent the attempted printing of this range of ASCII values.

Note: tines 70 through 90 will execute ONLY if the Registered Character Table to be

printed is NOT table number 0. Refer to the conditional command in line 60.

70

If the Registered Character Table number is not 0, send the Print Data as
Characters command to the printer. Specifically, this command, as listed, tells

the printer to print the next 31 bytes as data, not control codes.

Summary of Contents for ActionPrinter 5500 - ActionPrinter-5500 Impact Printer

Page 1: ...ommonly used printer commands used in ESC P2 Listed below are the commands discussed in this bulletin Command Command Name PSB Page ESC X m n1 n2 Select Pitch and Point Size 2 ESC C m1 m2 n1 n1 Set Page Length in Defined Units 5 ESC vm1 m2 n1 n2 Set Relative Vertical Position 6 ESC Vm1 m2 n1 n2 Set Absolute Vertical Position 8 ESCtn Select Character Table 9 ESC t n1 n2 d1 d2 d3 Assign Character Ta...

Page 2: ... For example if m 60 then 360 divided by 60 equals 6 and the character pitch is 6 characters per inch If m 30 the character pitch is 12 characters per inch For the Roman and Sans Serif fonts the values used for n1 are 0 16 20 21 24 28 32 36 40 42 44 48 52 56 60 and 84 For all other fonts the values used for n1 are 0 21 and 42 The actual point size that will print is n1 divided by 2 For example if ...

Page 3: ...alid point size was input If the point size is valid the program jumps to line 30 If the point size is not valid the program prints a message on the screen and starts over again Line 30 computes the value for n1 for advancing paper using the ESC v command Line 40 sends the Set Pitch and Point Size command to the printer Note The pitch is set for proportional spacing for all point sizes to ensure p...

Page 4: ...haracters These are 14 point characters These are 16 point characters These are 18 point characters These are 20 point characters These are 21 point characters These are 22 point characters These are 24 point characters These are 26 point characters These are 28 point characters These are 30 point characters These are 32 point characters ...

Page 5: ...ue for n1 5 The whole number in the quotient from step 3 is the value for n2 EXAMPLE 1 The page length is 8 5 inches 2 8 5 x 360 3060 3 3060 divided by 256 11 with a remainder of 244 4 n1 244 5 n2 11 In the Basic programming language the command would look like this This command as listed in the line above will set the page length to 8 5 inches NOTE The current line becomes the top of form This co...

Page 6: ...ole number in the quotient from step 3 is the value for n2 EXAMPLE 1 The desired distance is 1 inch 2 1x360 360 3 360 divided by 256 1 with a remainder of 104 4 n1 104 5 n2 1 In the Basic programming language the command would look like this This command as listed in the line above will feed the paper up 1 inch from the current line The current print column horizontal position IS NOT changed Rever...

Page 7: ...nder of 90 4 256 90 166 5 n1 166 6 n2 255 In the Basic programming language the command would look like this LPRlNT CHR 27 v CHR 2 CHR 0 CHR 166 CHR 255 This command as listed in the line above will feed the reverse feed the paper 1 4 inch from the current line The current print column horizontal position IS NOT changed ...

Page 8: ... distance by 360 3 Divide the result by 256 using long division 4 The remainder in the quotient from step 3 is the value for n1 5 The whole number in the quotient from step 3 is the value for n2 EXAMPLE 1 The desired dice from the Top of Form is 1 inch 2 1x360 360 3 360 divided by 256 1 with a remainder of 104 4 n1 104 5 n2 1 In the Basic programming language the command would look like this This ...

Page 9: ...with the value II n I T a b l e II II 3 I PC437 US II Table 1 NOTE 1 Character tables other than those listed above can be assigned by using the ESC t command Assign Character Table 2 The value used for n can be either the ASCII value OR the ASCII character i e chr 1 or 1 In the Basic programming language the command would look like this LPRlNT CHR 27 t CHR 0 CHR 27 is ESC and CHR 0 selects table ...

Page 10: ...command MUST be sent to select the table before printing from the new table For example the command ESC t 3 0 1 3 0 is sent assign Registered Table 3 PC850 to Selectable Table 1 PC437 In order to print the Q character ASCII 245 the command ESC t 1 must be sent In the Basic programming language the sequence would be as follows LPRINT CHR 27 T CHR 3 CHR 0 CHR 1 CHR 3 CHR 0 LPRINT CHR 27 t CHR 1 LPRI...

Page 11: ... the 6 Registered Tables Read Registered Table number and Table Name Print Registered Table number and Table Name Send the Assign Character Table command to the printer assigning the Registered Character Table read in line 20 to Selectable Character Table 0 Send the Select Character Table command to the printer selecting Selectable Table number 0 as the current Character Table for printing If the ...

Page 12: ...0 100 If this Registered Character Table number is 0 sand ASCII values 33 through 126 to the printer 110 If this Registered Character Table number is 0 send ASCII values 161 through 254 to the printer 120 Send 2 line feed commands to the printer to provide separation between tables 130 If program lines 20 through 120 have not executed 6 times return to line 20 and start again 140 Data that is read...

Page 13: ...anada French D o pRU 4 g tl t oA C Or23456789 ABCDEFGHIJKLMNOP XSTUWXYZ abcdefghijklmno rstuvwxyz I b Alt EBbii E E X iiO 6U fbOf 66 3 f a JJJ kt fttL nLLrrt l w raprxCalrr BQG B nnfLIFJ9 Jn2r Table 9 PC865 Norway b no bORU 4 tl t A SX 0123456789 QABCDEFGHIJKLMNOP RSTUWYCYZ I abcdefghijklmno qrstuvwxyz I CU AA oe iiiXAB b ij a a 0f0Ptfbi6ri RPo f n i111 lJJJ fH ttLpTw LLr jJ rly raPrxCa BQ6 8EnifL...

Page 14: ...sing long division divide the quantity of ASCII codes that will be sent sequentially immediately following n1 and n2 by 255 3 The remainder in the quotient is the value for n1 4 The whole number in the quotient is the value for n2 EXAMPLE 1 The symbols for the different suits of a card deck hearts diamonds clubs and spades V 4 and 4 are to be printed These are each separate ASCII codes ASCII codes...

Reviews: