RD-KT247 thermal printers
42 / 61
Program code is as follows:
unsigned char str[200];
j=0;
str[j++] = 0x1B;
str[j++] = 0x2A;
str[j++] = 32; //m=32(height is 24 dots, double-width)
str[j++] = 12; //graphic width is 12dots
str[j++] = 0;//bit image data
str[j++] = 0x10;str[j++] = 0x00;str[j++] = 0x20;str[j++] = 0x1F;str[j++] = 0xFF;str[j++] = 0xE0;
str[j++] = 0x1F;str[j++] = 0xFF;str[j++] = 0xE0;str[j++] = 0x10;str[j++] = 0x20;str[j++] = 0x20;
str[j++] = 0x10;str[j++] = 0x20;str[j++] = 0x00;str[j++] = 0x10;str[j++] = 0x30;str[j++] = 0x00;
str[j++] = 0x10;str[j++] = 0x3C;str[j++] = 0x00;str[j++] = 0x10;str[j++] = 0x2f;str[j++] = 0x00;
str[j++] = 0x18;str[j++] = 0x43;str[j++] = 0xC0;str[j++] = 0x0F;str[j++] = 0xC0;str[j++] = 0xE0;
str[j++] = 0x07;str[j++] = 0x80;str[j++] = 0x20;str[j++] = 0x00;str[j++] = 0x00;str[j++] = 0x20;
str[j++] = 0x0D;// Print out the current graphics
SendDataToPrinter(str,j);
[Example 4]
m =33 (24 dots, don’t enlarge
), d1,d2 and d3 represent the data to be printed in the first,
second and third column. And dk represents the data to be printed in the k
th
column. The bn
represents the n
th
bit of the byte.
d4 d7
D d49
0 0
0
0 0 0 0 0 0 0 0 0
b7
0 0
0
0 0 0 0 0 0 0 0 0
b6
0 0
0
0 0 0 0 0 0 0 0 0
b5
1 1
1
1 1 1 1 1 1 0 0 0
b4
0 1
1
0 0 0 0 0 1 1 0 0
b3
0 1
1
0 0 0 0 0 0 1 1 0
b2
0 1
1
0 0 0 0 0 0 1 1 0
b1
0 1
1
0 0 0 0 0 0 1 1 0
b0