105斑马打印机

  • 时间:
  • 浏览:3449
  • 来源:中华貔貅网

  问题:

斑马105SL打印机用串口ZPL指令打印时,当打印一些图标时,需要发送很多的字符串,请问能否把这些图标生成一个固定的文件,这样以后只需发送相应的文件名就可打印相关的图标了。请赐教!

敏用数码解答:

斑马105SL实现这个功能是没有任何问题的,但需要注意105sl的内存配置,老型号的105sl采用4MB RAM(R:),2MB闪存(E:),新型号的105sl采用6MB RAM(R:),4MB闪存(E:)。避免条码打印机出现图形过大下载溢出的情况。

通常采用ZPL中的~DG指令(下载图形)【ZTOOLS工具生成GRF】和^XG指令(调用图形)或^IL指令(调用图形)【^XG与^IL的区别为:是否可以对图形进行缩放?】来完成这样一个过程。

~DG指令(下载图形)格式:

~DGd:o.GRF,t,w,data

d=存储图形的位置,可选的值:R,E,B,A

o=文件名,1-8个字母数字字符

t=图形占用字节数(bits)

w=每行的字节数

data=ASCII字符串

t参数的计算公式:

xz/8 * yz=t  (x=图形以mm为单位的宽度,y=图形以mm为单位的高度,z=dots/mm为单位的打印机分辨率,8=bits/byte)

比如,8mm宽,16mm高的图形,采用105sl-203dpi打印机打印,那么:

t=8*12/8*16*12=2304

^XG指令(调用图形)格式:

^XGd:o.GRF,mx,my

d=存储图形的源位置,可选的值:R,E,B,A

o=图形的文件名

mx=X轴的放大倍数,1-10

my=Y轴的放大倍数,1-10

^IL指令(调用图形)格式:

^ILd:o.GRF

d=存储图形的源位置,可选的值:R,E,B,A

o=图形的文件名

例子:

下载图形代码:

~DGR:SAMPLE.GRF,00080,010,FFFFFFFFFFFFFFFFFFFF

8000FFFF0000FFFF0001

8000FFFF0000FFFF0001

8000FFFF0000FFFF0001

FFFF0000FFFF0000FFFF

FFFF0000FFFF0000FFFF

FFFF0000FFFF0000FFFF

FFFFFFFFFFFFFFFFFFFF

调用图形代码(^XG):

^XA

^F020,20^XGR:SAMPLE.GRF,1,1^FS

^XZ

调用图形代码(^IL):

^XA

^F020,20^ILR:SAMPLE.GRF^FS

^XZ

如何把图片转换为GRF格式:

下面介绍如何把斑马logo转换为GRF格式

1、Logo图形的后缀名需要为PCX或者TIF

2、然后通过ZTOOLS工具中的Convert Graphic File功能,把PCX或者TIF的文件转换为GRF格式的文件。

斑马LOGO经过转换后的GRF格式的代码如下:

~DGR:ZLOGO,02180,020,E0000000000000000000000000000000000001A0

0000000000000000000000000000000000000040

8000000000000000000000000000000000000020

0000000000000000000000000000000000000000

0000000000000000000000000000000000000000

0000000000000000000000000000000000000000

0000000000000050000000000000000000000000

000000000000015C000000000000000000000000

0000000000080750000000000000000000000000

0000000000240440100000000000000000000000

0000000000181580200000000000000000000000

0000000000500D0020C000000000000000000000

0000000000200000200000000000000000000000

0000000081C01C00618000000000000000000000

0000000101807000400000000000000000000000

0000000502805800830000000000000000000000

00000002000078008C0000000000000000000000

00000004008020010A4000000000000000000000

0000000A03006800920000000000000000000000

0000060601805005440000000000000000000000

0000080001800406800000000000000000000000

00000C0C01401801180000000000000000000000

0000180801800A04600000000000000000000000

0000100600201681800000000000000000000000

0000100400900980000000000000000000000000

0014100200600380400000000000000000000000

002C200100181A00C00000000000000000000000

0010000680502502200000000000000000000000

01C8300100281C04C00000000000000000000000

0020100000100000400000000000000000000000

00F0280120A0B416900000000000000000000000

00181000C0009809680000000000000000000000

0068180040E08810200000000000000000000000

0050140181401860100000000000000000000000

0018090001419040080000000000000000000000

0004028282801080000000000000000000000000

0016020283820000002000000000000000000000

0008030102011C80002000000000000000000000

0002000500821830384000000000000000000000

00000106028008C4802000000000000000000000

0000820502810451506000000000000000000000

00000404028104A4D0D000000000000000000000

0000800600020348806000000000000000000000

00010E0601C50371E1D000000000000000000000

00000204000600A1021000000000000000000000

0000080101810711C20000000000000000000000

0006120501810041044040000000000000000000

00040C0400E200209800C0000000000000000000

000C060200C202C1282060000000000000000000

00041C0300230240C060A0000000000000000000

00081802802181C0204050000000000000000000

000C1200002A0101C10060000000000000000000

0000020140288080804180000000000000000000

00302C0080178001820100000000000000000000

00082C00400A4180018200000000000000000000

00001200300B8081020200000000000000000000

0058010010058080020221800000000000000000

00680600100240820C0402400000000000000000

000818002C004000041805A00000000000000000

007819000800F0021A385C800000000000000000

000816C002001080049066500000000000000000

00280B400D00200018C0B3200000000000000000

00880EA0068018820E2005600000000000000000

005004300140000211A1EAB00000000000000000

00580E280050000009801F480000000000000000

00300814016400000D011F800000000000000000

00100C000028000006041F680000000000000000

00400A02007A000000031F980000000000000000

002C0202800C0000000A1FA00000000000000000

004C01012011A00000051F500000000000000000

00140500A0125000001F1F400000000000000000

002401015808E00000081F800000000000000000

001806000205A0000005D3800000000000000000

0016018081C02000000250800000000000000000

00090200E020400000004C000000000000000000

0007038010304000000000000000000000000000

000D0180401C0000000000000000000000000000

0004000000138000000000000000000000000000

0002818018140000000000000000000000000000

00014060280A0000000000000000000000000000

000040E030020000000000000000000000000000

0001A0000004004CF20000010000000000000000

0000D040100000B19D0000036000000000000000

000020000800016D618000005000000000000000

000038280800000024000002A000000000000000

00000C3404000000180000023000000000000000

0000081800000000B2006401C1C0090402E00000

00001806020000022402AE8136B0162408200000

0000020C010000028005638336341CD0322F0000

000004818080000D700980C0E8040DA060150000

00000184000000142006812330251200000B0000

000002004000002200146A32D01A128002B40000

000000438000003400039B4140010B8029930000

000080A0400000CC0019A42250040A805A0C0000

020000129800004800160001A0011A0040050000

00400029700001B5B20280225829070074160000

04020019A0000100F008816308A80E80C4350000

0000000C400000FFFF8154C0D1AC10805A0A0000

0044200380000000E0017001B148048024870000

0040000200000000000000000000000000000000

0002000000000000000000000000000000000000

0002000000000000000000000000000000000000

0000000000000000000000000000000000000000

0000000000000000000000000000000000000000

0000000000000000000000000000000000000000

8000000000000000000000000000000000000000

0000000000000000000000000000000000000000

8000000000000000000000000000000000000020

6000000000000000000000000000000000000080

<a href="http://www.chongshang.com.cn/label_ribbon.shtml">标签</a>