20
6. Using black-mark paper
DOS command: COPY TEST5.DAT PRN
←
F1
←
Q992
/* remark F1 and Q992 command is gobble command */
←
S2
←
D7 /* remark S2 and D7 command is gobble command */
♀
←
M07
←
A11PAYMENT TIME
↵
←
M07
←
A22 10:20 AM
↵
←
M07
←
A11FEE PAID
↵
←
M07
←
A22 $ 12.50
↵
←
M07
←
A11DEPARTURE TIME
↵
←
M07
←
A22 02:20 PM
↵
♀
PAYMENT TIME
10:20 AM
FEE PAID
$ 12.50
DEPARTURE TIME
02:20 PM
7. C sample program to test the printer with Black line sensor.
#include <stdio.h>
#define FORMFEED 12
main()
{
printf("\n\n PM-202 test \n\n");
printf("Initial Step: set the Q value\n");
printf("Press a key to start\n");
getchar();
fprintf(stdprn,"%c%s",27,"F1");
fprintf(stdprn,"%c%s",27,"Q992");
fprintf(stdprn,"%c",FORMFEED);
fprintf(stdprn,"%c%s",27,"S2");
fprintf(stdprn,"%c%s",27,"D7");
do{
printf("Print label...\n");
printf("Press a key to start\n");
printf("Press ctrl-break to quit\n");
getchar();
fprintf(stdprn,"%c%s",27,"M07");
fprintf(stdprn,"%c%s",27,"A11");
fprintf(stdprn,"%s%c","PAYMENT TIME",'\n');
fprintf(stdprn,"\n");
fprintf(stdprn,"%c%s",27,"A22");
fprintf(stdprn,"%s%c","10:20 AM",'\n');
fprintf(stdprn,"%c",FORMFEED);
}while(1);
}
PDF created with FinePrint pdfFactory trial version
http://www.fineprint.com