Sending binary data to the Zebra 2844

299 views
Skip to first unread message

David Lopez

unread,
Sep 25, 2012, 8:01:44 AM9/25/12
to jzebra...@googlegroups.com
hi everybody,

I'm trying to use the 2D Bar Code - Data Matrix. I get 42 Bytes represented in Hex but the Zebra only accepts ASCII or Binary. I would like to send the information in Binary but I'm struggling to do it. I send commands in EPL over jZebra to comunicate with the printer.

Here an example:

 applet.append("b10,20,D,c26,r26,\"100010001000101010000010100100001101100010000000101111001111101111010010111111110000000011011100110100101000000000000000100000000000000000000000100000001000000000000000110000000000000011000100110000001100000011000000110010001100000011000000110000001100010000000000000000000000000000000000000000000000000000000000000000000000000000000000\"\n");

Thanks, David

Tres Finocchiaro

unread,
Sep 25, 2012, 9:18:21 AM9/25/12
to jzebra...@googlegroups.com
David,

What model printer?

Can you reference the manual and the page you are working from?

I had to do something similar with binary but it was for ZPL and the data had to be put into Hex.  I understand that won't work in your case, so I want to see how the manual instructs to do so.

-Tres

--
To unsubscribe from this group, send email to jzebra-users...@googlegroups.com
 
http://code.google.com/p/jzebra



--
- Tres.Fin...@gmail.com

David Lopez

unread,
Sep 25, 2012, 9:32:28 AM9/25/12
to jzebra...@googlegroups.com
Hi Tres,

the printer is a Zebra LP 2844, page .68 EPL2 Programming Manual.

Regards
David

David Lopez

unread,
Sep 25, 2012, 9:38:41 AM9/25/12
to jzebra...@googlegroups.com
Tres,

Below the Hex chain that I get 44 45 41 12 1B 01 2F FB D2 FF 00 DC 69 20 00 1F 00 00 01 03 00 06 00 31 30 30 30 32 30 30 30 31 00 00 00 00 00 00 00 00 00 00

If you analyze it, you will find control characters (01, FB, 1B), so I cannot transform it to Ascii as I will lose information.

Best Regards
David

Am Dienstag, 25. September 2012 15:18:21 UTC+2 schrieb Tres Finocchiaro:

Tres Finocchiaro

unread,
Sep 25, 2012, 10:00:04 AM9/25/12
to jzebra...@googlegroups.com
Within literal strings, all ASCII characters, 0-255, (00-FF hex) are allowed.

You will likely need to convert your binary into Hexadecimal.

100010001000101010000010100100001101100010000000101111001111101111010010111111110000000011011100110100101000000000000000100000000000000000000000100000001000000000000000110000000000000011000100110000001100000011000000110010001100000011000000110000001100010000000000000000000000000000000000000000000000000000000000000000000000000000000000

Would be translated to something like this:

88 8a 82 90 d8 80 bc fb d2 ff 00 dc d2 80 00 80 00 00 80 80 00 c0 00 c4 c0 c0 c0 c8 c0 c0 c0 c4 00 00 00 00 00 00 00 00 00 00

You are correct in assuming the content needs to be ASCII, but it will use hex notation.  The confusing part about this is we often use hex (i.e. \x1B) in JavaScript.  This would be hex "looking" characters which will be interpreted into actual hex by the printer.

Your code *may* look like this (just a sample, I haven't checked syntax):
applet.append("b10,20,D,c26,r26,\"  888A8290D880BCFBD2FF00DCD28000800000808000C000C4C0C0C0C8C0C0C0C400000000000000000000 \"\n");


This is the same method used for inserting images, so I think sending the data in this form will get you the best results.

-Tres

David Lopez

unread,
Sep 25, 2012, 10:15:50 AM9/25/12
to jzebra...@googlegroups.com
Hi,

well, my main problem ist the information I get are 42 Hex pairs, and should be able to pack that in a 26x26.I i send the information directly, I get an empty value, I suppose that are too many values.

Regards

Tres Finocchiaro

unread,
Sep 25, 2012, 10:34:08 AM9/25/12
to jzebra...@googlegroups.com
Below the Hex chain that I get 44 45 41 12 1B 01 2F FB D2 FF 00 DC 69 20 00 1F 00 00 01 03 00 06 00 31 30 30 30 32 30 30 30 31 00 00 00 00 00 00 00 00 00 00

Where does the original "Hex Chain" come from?

-Tres

David Lopez

unread,
Sep 25, 2012, 11:03:39 AM9/25/12
to jzebra...@googlegroups.com
It is coming from a automatic process of the "Deutsche Post", which is used to set the price of the letters and don't use stamps. 

David Lopez

unread,
Sep 25, 2012, 12:02:51 PM9/25/12
to jzebra...@googlegroups.com
Hi Tres,

it would be wonderful if you try printing the example below in a 26x26, it is supposed to macht. The Deutsche Post an image of the Datamatrix that we can use but it will slow the whole printing process.

44 45 41 12 1B 01 2F FB D2 FF 00 DC 69 20 00 1F 00 00 01 03 00 06 00 31 30 30 30 32 30 30 30 31 00 00 00 00 00 00 00 00 00 00

Regards
David

Am Dienstag, 25. September 2012 16:00:05 UTC+2 schrieb Tres Finocchiaro:

Tres Finocchiaro

unread,
Sep 25, 2012, 2:36:02 PM9/25/12
to jzebra...@googlegroups.com
David,

Unfortunately I do not have one of these printers to try this on.

Can you contact Zebra?  Their support is excellent for these types of things.

Make sure to mention datagrid printing.

I've worked with Zebra for Card printing issues (slightly different language) and support was top notch.

-Tres

David Lopez

unread,
Sep 25, 2012, 2:37:20 PM9/25/12
to jzebra...@googlegroups.com
Thnx Tres,

I will give it a try with the Zebra Technical Support.

Regards
David
Reply all
Reply to author
Forward
0 new messages