Datamax E4203 All in One Printer User Manual


 
E-Class DPL Programmer’s Manual 73
Appendix B
Sample Programs
Basic Language Program
The following sample Basic program is included for reference. Values are assigned to the variables in
the main section and sent to the printer in the section titled ‘Send Data’. The sample below shows the
output generated by this program.
START:
OPEN “COM1:9600,N,8,1,FOR RANDOM” AS #1
MAIN:
CLS
PRINT “DMX Printer Test Program (press any key)”
WHILE I$= ““
I$=INKEY$
WEND
desc$=“10K OHM 1/4 WATT”
pcs=590
SENDDATA:
CR$ = CHR$(13)
PRINT #1, CHR$(2);”L”; CR$;
PRINT #1”,H07”;CR$;
‘set burn time to 7
PRINT #1”,D11”;CR$;
‘set for 300 DPI
PRINT #1”,191100801000025”;desc$;CR$;
‘send description line
PRINT #1”,1a6210000000050”;pcs; CR$;
‘send barcode
PRINT #1”,E”;CR$;
‘ end of format and print
GOTO MAIN
10K OHM 1/4 WATT
Figure B-1: Sample Label