Sample Program - Star Micronics TSP400 Series Programmer's Manual

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

Advertisement

7-5. Sample Program

==SAMPLE
PROGRAM==
'This sample program (SAMPLE1.BAS) is included in a floppy disk comes with the
TSP400 printer.
'——<< SAMPLE1.BAS >>——
E$=CHR$(27): LN$ = CHR$(10) + CHR$(0): A$ = DATE$
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$; "D1500"; LN$;
PRINT #1, E$; "L00;0050,0050,0750,0050,0,4"; LN$;
PRINT #1, E$; "L01;0150,0300,0230,0300,0,2"; LN$;
PRINT #1, E$; "L02;0150,0400,0310,0400,0,2"; LN$;
PRINT #1, E$; "L03;0050,0800,0310,0800,0,2"; LN$;
PRINT #1, E$; "L04;0590,0800,0750,0800,0,2"; LN$;
PRINT #1, E$; "L05;0050,0945,0750,0945,0,4"; LN$;
PRINT #1, E$; "L06;0050,0050,0050,0950,1,4"; LN$;
PRINT #1, E$; "L07;0150,0050,0150,0950,1,2"; LN$;
PRINT #1, E$; "L08;0230,0050,0230,0950,1,2"; LN$;
PRINT #1, E$; "L09;0260,0050,0260,0400,1,2"; LN$;
PRINT #1, E$; "L010;0310,0050,0310,0950,1,2"; LN$;
PRINT #1, E$; "L011;0590,0050,0590,0950,1,2"; LN$;
PRINT #1, E$; "L012;0670,0050,0670,0950,1,2"; LN$;
PRINT #1, E$; "L013;0745,0050,0745,0950,1,4"; LN$;
PRINT #1, E$; "PC00;0070,0930,1,1,1,33,02"; LN$;
position and type
PRINT #1, E$; "PC01;0060,0780,2,3,2,33,02"; LN$;
PRINT #1, E$; "PC02;0170,0930,1,1,1,33,02"; LN$;
PRINT #1, E$; "PC03;0160,0780,1,2,4,33,02"; LN$;
PRINT #1, E$; "PC04;0170,0380,1,1,1,33,02"; LN$;
PRINT #1, E$; "PC05;0180,0280,1,1,4,33,02"; LN$;
PRINT #1, E$; "PC06;0250,0930,1,1,1,33,02"; LN$;
PRINT #1, E$; "PC07;0260,0780,1,1,2,33,02"; LN$;
PRINT #1, E$; "PC08;0240,0380,1,1,1,33,02"; LN$;
PRINT #1, E$; "PC09;0275,0380,1,1,2,33,02"; LN$;
PRINT #1, E$; "PC10;0610,0930,1,1,1,33,02"; LN$;
PRINT #1, E$; "PC11;0620,0780,1,1,2,33,02"; LN$;
PRINT #1, E$; "PC12;0690,0930,1,1,1,33,02"; LN$;
PRINT #1, E$; "PC13;0695,0780,1,1,2,33,02"; LN$;
PRINT #1, E$; "PB00;0330,0850,1,1,3,0120"; LN$;
and type
PRINT #1, E$; "PB01;0470,0850,1,2,3,0100"; LN$;
PRINT #1, E$; "PB02;0470,0450,1,2,3,0100"; LN$;
PRINT #1, E$; "B"; LN$;
'——<< PRINT DATA >>——
PRINT #1, E$; "RC00;TYPE-No"; LN$;
PRINT #1, E$; "RC01;ABC0123456789"; LN$;
PRINT #1, E$; "RC02;LOT"; LN$;
PRINT #1, E$; "RC03;5X6789"; LN$;
PRINT #1, E$; "RC04;QTY"; LN$;
PRINT #1, E$; "RC05;10000"; LN$;
PRINT #1, E$; "RC06;DATE"; LN$;
PRINT #1, E$; "RC07;";A$; LN$;
:'Clear format
:'Set print area
:'Enable cutter
:'Set character data
– 58 –
:'For Serial I/F COM1:
:'For Serial I/F COM2:
:'For Parallel I/F LPT1:
:'Define ruled line format
:'Define character string
:'Define bar code position

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tup400 series

Table of Contents