Star Micronics TSP400 Series Programmer's Manual page 63

Star micronics tsp400: reference guide
Hide thumbs Also See for TSP400 Series:
Table of Contents

Advertisement

==SAMPLE
PROGRAM==
'This sample program (SAMPLE2.BAS) is included in a floppy disk with the TSP400
printer.
'——<< SAMPLE2.BAS >>——
E$ = CHR$(27): LN$ = CHR$(10) + CHR$(0)
OPEN "COM1:9600,N,8,1,CS0,DS0" FOR RANDOM AS #1
'OPEN "COM2:9600,N,8,1,CS0,DS0" FOR RANDOM AS #1
'OPEN "LPT1:"FOR RANDOM AS #1: WIDTH "LPT1:", 255
'——<< FORMAT SETTINGS >>——
PRINT #1, E$; "C"; LN$;
PRINT #1, E$; "D0800"; LN$;
PRINT #1, E$; "PC00;0300,0222,1,1,1,00,01"; LN$;
position and type
PRINT #1, E$; "PC01;0300,0249,1,1,1,00,01"; LN$;
PRINT #1, E$; "PC02;0300,0276,1,1,1,00,01"; LN$;
PRINT #1, E$; "PB00;0300,0330,4,1,0,0040"; LN$;
and type
PRINT #1, E$; "B"; LN$;
'——<< PRINT DATA >>——
PRINT #1, E$; "RC00;Part#": 08210116
PRINT #1, E$; "RC01;Name : TTL IC 74LS06 (FLAT TYPE)"; LN$;
PRINT #1, E$; "RC02;Qty.: 50 pcs "; LN$;
PRINT #1, E$; "RB00;08210116"; LN$;
'
PRINT #1, E$; "H;0135,0255,";
OPEN "TTLIC.BMP" FOR BINARY AS #2
FOR I = 1 TO LOF(2): D$ = INPUT$(1, #2): PRINT #1, D$;: NEXT l
CLOSE #2
PRINT #1, ","; LN$
'——<< PRINT >>——
PRINT #1, E$; "I"; LN$
END
Print Out Sample
:'Clear format
:'Set print area
:'Enable cutter
";LN$; :'Set character data
:'Copy BMP file to image buffer"
:'Print Label
– 60 –
:'For Serial I/F COM1:
:'For Serial I/F COM2:
:'For Parallel I/F LPT1:
:'Define
character
:'Define
bar
code
:'Set bar code data
string
position
P1995.6

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tup400 series

Table of Contents