Go Back   Technology Questions > Hardware Questions > Desktop Computers

Desktop Computers Hardware components for stationary PCs: Audio and Video, Monitors, Motherboards, Networking, Peripherals, Processors, RAM, Storage deivces, and Optical devices .

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 02-06-2007, 06:52 PM
JJ Jones
Tablet PC Guest
 
Posts: n/a
Printing Barcodes with ESC/P on Epson Impact Printer

Hello,

Does anybody know how to print barcodes on an Epson impact printer
(FX-2190 or FX-2170) using ESC/P?

Using the ESC/P manual, I entered two sequences that were supposed to
print barcodes, and neither of them printed. In fact, they froze the
printer.

I'm using the manual titled "Epson ESC/P Reference Manual, December
1997". In the "Recommended Operations" section, there are many
examples of numeric sequences that are supposed to print barcodes, but
I can't get them to work. I tried two:

At the top of page R-95, I sent the following hex numbers to the
printer: 1B,28,42,0D,00,04,02,00,7D,00,03,30,31,32,33,34,35 ,30, but it
didn't generate the example barcode.

At the bottom of page R-93, I sent the hex numbers:
1B,28,42,12,00,04,02,00,7D,00,00,30,31,32,33,34,35 ,36,37,38,39,30,35,
but it also didn't print the example barcode.

When doing this, I first turned the printer off & on, to initialize it,
then I sent the hex string. My guess is that there is some magic
number that I'm missing that will initialize the printer properly, or
put it into graphics mode or something.

Any ideas?

Thanks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 02-06-2007, 06:52 PM
Xploder HD Movie Player for PS3. Manage, convert and transfer media files between the PC and PS3.
  #2 (permalink)  
Old 02-06-2007, 06:52 PM
Justin C
Tablet PC Guest
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

In article <1161812634.386429.18860@m7g2000cwm.googlegroups.c om>,
"JJ Jones" <jamesjonathanjones******.com> wrote:

> Hello,
>
> Does anybody know how to print barcodes on an Epson impact printer
> (FX-2190 or FX-2170) using ESC/P?
>

[snip]

I wish you well with this. We've an Epson thermal label/barcode printer
which also uses ESC/P. I've never got further than having MS Word print
to it from Win98. I'd like to get it printing barcodes though - I found
the ESC/P manuals too baffling for my small brain.

What I have seen suggested here in the past is kbarcode. I don't know
how well it's maturing but it's probably worth a look. If you are able
to produce *any* code that produces reliable output from an ESC/P
printer I'd very much like to see it - as a starting point for my own
endeavours, especially seeing as I don't even know where to start with
this!

--
Justin C, by the sea.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 02-06-2007, 06:52 PM
Justin C
Tablet PC Guest
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

In article <1161812634.386429.18860@m7g2000cwm.googlegroups.c om>,
"JJ Jones" <jamesjonathanjones******.com> wrote:

> Hello,
>
> Does anybody know how to print barcodes on an Epson impact printer
> (FX-2190 or FX-2170) using ESC/P?
>

[snip]

I wish you well with this. We've an Epson thermal label/barcode printer
which also uses ESC/P. I've never got further than having MS Word print
to it from Win98. I'd like to get it printing barcodes though - I found
the ESC/P manuals too baffling for my small brain.

What I have seen suggested here in the past is kbarcode. I don't know
how well it's maturing but it's probably worth a look. If you are able
to produce *any* code that produces reliable output from an ESC/P
printer I'd very much like to see it - as a starting point for my own
endeavours, especially seeing as I don't even know where to start with
this!

--
Justin C, by the sea.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 02-06-2007, 06:52 PM
Justin C
Tablet PC Guest
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

In article <1161812634.386429.18860@m7g2000cwm.googlegroups.c om>,
"JJ Jones" <jamesjonathanjones******.com> wrote:

> Hello,
>
> Does anybody know how to print barcodes on an Epson impact printer
> (FX-2190 or FX-2170) using ESC/P?
>

[snip]

I wish you well with this. We've an Epson thermal label/barcode printer
which also uses ESC/P. I've never got further than having MS Word print
to it from Win98. I'd like to get it printing barcodes though - I found
the ESC/P manuals too baffling for my small brain.

What I have seen suggested here in the past is kbarcode. I don't know
how well it's maturing but it's probably worth a look. If you are able
to produce *any* code that produces reliable output from an ESC/P
printer I'd very much like to see it - as a starting point for my own
endeavours, especially seeing as I don't even know where to start with
this!

--
Justin C, by the sea.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 02-06-2007, 06:52 PM
JJ Jones
Tablet PC Guest
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

Actually, ESC/P has been pretty reliable for simple things like
changing font sizes, etc. But I haven't gotten to first base on
barcodes or even graphics code. I would also like to use some simple
graphics, like blacking-out something with a solid black square.

One thing I found out is that there is a 1998 ESC/P manual which has a
somewhat different escape sequence for barcodes than the 1997 manual
that I have. For example, the 1997 manual shows the length as 2 bytes
- an int and a mod. While the 1998 manual shows it as a "word". I
assume a "word" is 4 bytes in this case.

I'll try to track down the latest manual.


Justin C wrote:
> In article <1161812634.386429.18860@m7g2000cwm.googlegroups.c om>,
> "JJ Jones" <jamesjonathanjones******.com> wrote:
>
> > Hello,
> >
> > Does anybody know how to print barcodes on an Epson impact printer
> > (FX-2190 or FX-2170) using ESC/P?
> >

> [snip]
>
> I wish you well with this. We've an Epson thermal label/barcode printer
> which also uses ESC/P. I've never got further than having MS Word print
> to it from Win98. I'd like to get it printing barcodes though - I found
> the ESC/P manuals too baffling for my small brain.
>
> What I have seen suggested here in the past is kbarcode. I don't know
> how well it's maturing but it's probably worth a look. If you are able
> to produce *any* code that produces reliable output from an ESC/P
> printer I'd very much like to see it - as a starting point for my own
> endeavours, especially seeing as I don't even know where to start with
> this!
>
> --
> Justin C, by the sea.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #6 (permalink)  
Old 02-06-2007, 06:52 PM
JJ Jones
Tablet PC Guest
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

Actually, ESC/P has been pretty reliable for simple things like
changing font sizes, etc. But I haven't gotten to first base on
barcodes or even graphics code. I would also like to use some simple
graphics, like blacking-out something with a solid black square.

One thing I found out is that there is a 1998 ESC/P manual which has a
somewhat different escape sequence for barcodes than the 1997 manual
that I have. For example, the 1997 manual shows the length as 2 bytes
- an int and a mod. While the 1998 manual shows it as a "word". I
assume a "word" is 4 bytes in this case.

I'll try to track down the latest manual.


Justin C wrote:
> In article <1161812634.386429.18860@m7g2000cwm.googlegroups.c om>,
> "JJ Jones" <jamesjonathanjones******.com> wrote:
>
> > Hello,
> >
> > Does anybody know how to print barcodes on an Epson impact printer
> > (FX-2190 or FX-2170) using ESC/P?
> >

> [snip]
>
> I wish you well with this. We've an Epson thermal label/barcode printer
> which also uses ESC/P. I've never got further than having MS Word print
> to it from Win98. I'd like to get it printing barcodes though - I found
> the ESC/P manuals too baffling for my small brain.
>
> What I have seen suggested here in the past is kbarcode. I don't know
> how well it's maturing but it's probably worth a look. If you are able
> to produce *any* code that produces reliable output from an ESC/P
> printer I'd very much like to see it - as a starting point for my own
> endeavours, especially seeing as I don't even know where to start with
> this!
>
> --
> Justin C, by the sea.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #7 (permalink)  
Old 02-06-2007, 06:52 PM
JJ Jones
Tablet PC Guest
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

Actually, ESC/P has been pretty reliable for simple things like
changing font sizes, etc. But I haven't gotten to first base on
barcodes or even graphics code. I would also like to use some simple
graphics, like blacking-out something with a solid black square.

One thing I found out is that there is a 1998 ESC/P manual which has a
somewhat different escape sequence for barcodes than the 1997 manual
that I have. For example, the 1997 manual shows the length as 2 bytes
- an int and a mod. While the 1998 manual shows it as a "word". I
assume a "word" is 4 bytes in this case.

I'll try to track down the latest manual.


Justin C wrote:
> In article <1161812634.386429.18860@m7g2000cwm.googlegroups.c om>,
> "JJ Jones" <jamesjonathanjones******.com> wrote:
>
> > Hello,
> >
> > Does anybody know how to print barcodes on an Epson impact printer
> > (FX-2190 or FX-2170) using ESC/P?
> >

> [snip]
>
> I wish you well with this. We've an Epson thermal label/barcode printer
> which also uses ESC/P. I've never got further than having MS Word print
> to it from Win98. I'd like to get it printing barcodes though - I found
> the ESC/P manuals too baffling for my small brain.
>
> What I have seen suggested here in the past is kbarcode. I don't know
> how well it's maturing but it's probably worth a look. If you are able
> to produce *any* code that produces reliable output from an ESC/P
> printer I'd very much like to see it - as a starting point for my own
> endeavours, especially seeing as I don't even know where to start with
> this!
>
> --
> Justin C, by the sea.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #8 (permalink)  
Old 02-06-2007, 06:52 PM
Martin Gregorie
Tablet PC Guest
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

JJ Jones wrote:
> Hello,
>
> Does anybody know how to print barcodes on an Epson impact printer
> (FX-2190 or FX-2170) using ESC/P?
>
> Using the ESC/P manual, I entered two sequences that were supposed to
> print barcodes, and neither of them printed. In fact, they froze the
> printer.
>
> I'm using the manual titled "Epson ESC/P Reference Manual, December
> 1997". In the "Recommended Operations" section, there are many
> examples of numeric sequences that are supposed to print barcodes, but
> I can't get them to work. I tried two:
>
> At the top of page R-95, I sent the following hex numbers to the
> printer: 1B,28,42,0D,00,04,02,00,7D,00,03,30,31,32,33,34,35 ,30, but it
> didn't generate the example barcode.
>
> At the bottom of page R-93, I sent the hex numbers:
> 1B,28,42,12,00,04,02,00,7D,00,00,30,31,32,33,34,35 ,36,37,38,39,30,35,
> but it also didn't print the example barcode.
>
> When doing this, I first turned the printer off & on, to initialize it,
> then I sent the hex string. My guess is that there is some magic
> number that I'm missing that will initialize the printer properly, or
> put it into graphics mode or something.
>
> Any ideas?
>

Are you sure that your particular printer can understand that escape
sequence and/or print bar codes?

Whenever I've written code to send Esc/P sequences to Epsons it has
always "just worked". Epson parallel printers are generally backward
compatible: my Epson Stylus Colour 850 produces perfectly formatted
output when driven by programs developed to drive an LQ-550 (24 pin dot
matrix) or even an MX-80 (9 pin dot matrix).

It could be worth writing a simple "echo" equivalent so you can enter
hex control sequences and ASCII text via a command line.

I have dim memories that it may help to end each string with CR/LF
because some Epsons contain a line buffer that isn't printed until the
CR/LF sequence is received.


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #9 (permalink)  
Old 02-06-2007, 06:52 PM
Martin Gregorie
Tablet PC Guest
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

JJ Jones wrote:
> Hello,
>
> Does anybody know how to print barcodes on an Epson impact printer
> (FX-2190 or FX-2170) using ESC/P?
>
> Using the ESC/P manual, I entered two sequences that were supposed to
> print barcodes, and neither of them printed. In fact, they froze the
> printer.
>
> I'm using the manual titled "Epson ESC/P Reference Manual, December
> 1997". In the "Recommended Operations" section, there are many
> examples of numeric sequences that are supposed to print barcodes, but
> I can't get them to work. I tried two:
>
> At the top of page R-95, I sent the following hex numbers to the
> printer: 1B,28,42,0D,00,04,02,00,7D,00,03,30,31,32,33,34,35 ,30, but it
> didn't generate the example barcode.
>
> At the bottom of page R-93, I sent the hex numbers:
> 1B,28,42,12,00,04,02,00,7D,00,00,30,31,32,33,34,35 ,36,37,38,39,30,35,
> but it also didn't print the example barcode.
>
> When doing this, I first turned the printer off & on, to initialize it,
> then I sent the hex string. My guess is that there is some magic
> number that I'm missing that will initialize the printer properly, or
> put it into graphics mode or something.
>
> Any ideas?
>

Are you sure that your particular printer can understand that escape
sequence and/or print bar codes?

Whenever I've written code to send Esc/P sequences to Epsons it has
always "just worked". Epson parallel printers are generally backward
compatible: my Epson Stylus Colour 850 produces perfectly formatted
output when driven by programs developed to drive an LQ-550 (24 pin dot
matrix) or even an MX-80 (9 pin dot matrix).

It could be worth writing a simple "echo" equivalent so you can enter
hex control sequences and ASCII text via a command line.

I have dim memories that it may help to end each string with CR/LF
because some Epsons contain a line buffer that isn't printed until the
CR/LF sequence is received.


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #10 (permalink)  
Old 02-06-2007, 06:52 PM
Martin Gregorie
Tablet PC Guest
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

JJ Jones wrote:
> Hello,
>
> Does anybody know how to print barcodes on an Epson impact printer
> (FX-2190 or FX-2170) using ESC/P?
>
> Using the ESC/P manual, I entered two sequences that were supposed to
> print barcodes, and neither of them printed. In fact, they froze the
> printer.
>
> I'm using the manual titled "Epson ESC/P Reference Manual, December
> 1997". In the "Recommended Operations" section, there are many
> examples of numeric sequences that are supposed to print barcodes, but
> I can't get them to work. I tried two:
>
> At the top of page R-95, I sent the following hex numbers to the
> printer: 1B,28,42,0D,00,04,02,00,7D,00,03,30,31,32,33,34,35 ,30, but it
> didn't generate the example barcode.
>
> At the bottom of page R-93, I sent the hex numbers:
> 1B,28,42,12,00,04,02,00,7D,00,00,30,31,32,33,34,35 ,36,37,38,39,30,35,
> but it also didn't print the example barcode.
>
> When doing this, I first turned the printer off & on, to initialize it,
> then I sent the hex string. My guess is that there is some magic
> number that I'm missing that will initialize the printer properly, or
> put it into graphics mode or something.
>
> Any ideas?
>

Are you sure that your particular printer can understand that escape
sequence and/or print bar codes?

Whenever I've written code to send Esc/P sequences to Epsons it has
always "just worked". Epson parallel printers are generally backward
compatible: my Epson Stylus Colour 850 produces perfectly formatted
output when driven by programs developed to drive an LQ-550 (24 pin dot
matrix) or even an MX-80 (9 pin dot matrix).

It could be worth writing a simple "echo" equivalent so you can enter
hex control sequences and ASCII text via a command line.

I have dim memories that it may help to end each string with CR/LF
because some Epsons contain a line buffer that isn't printed until the
CR/LF sequence is received.


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #11 (permalink)  
Old 02-06-2007, 06:52 PM
Lee
Tablet PC Guest
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

JJ Jones wrote:
> Hello,
>
> Does anybody know how to print barcodes on an Epson impact printer
> (FX-2190 or FX-2170) using ESC/P?
>
> Using the ESC/P manual, I entered two sequences that were supposed to
> print barcodes, and neither of them printed. In fact, they froze the
> printer.
>
> I'm using the manual titled "Epson ESC/P Reference Manual, December
> 1997". In the "Recommended Operations" section, there are many
> examples of numeric sequences that are supposed to print barcodes, but
> I can't get them to work. I tried two:
>
> At the top of page R-95, I sent the following hex numbers to the
> printer: 1B,28,42,0D,00,04,02,00,7D,00,03,30,31,32,33,34,35 ,30, but it
> didn't generate the example barcode.
>
> At the bottom of page R-93, I sent the hex numbers:
> 1B,28,42,12,00,04,02,00,7D,00,00,30,31,32,33,34,35 ,36,37,38,39,30,35,
> but it also didn't print the example barcode.
>
> When doing this, I first turned the printer off & on, to initialize it,
> then I sent the hex string. My guess is that there is some magic
> number that I'm missing that will initialize the printer properly, or
> put it into graphics mode or something.
>
> Any ideas?
>
> Thanks
>

I used to use these all the time to print bar codes!
You are going about it the wrong way.
First, there are DIP switches that have to be set to allow graphics mode.
Then, instead of sending code sequences, you use software that prints
the kind of bar codes you want. There are many kinds of bar codes.
The sequences you are playing with are for programmers.
Firstly, determine what kind of bar codes you want.
Second, find software to do it.
There is freeware software to do just about anything you want.
i.e. type 'freeware barcode software' in Google and you will find all
kinds of things.
Regards
Lee

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #12 (permalink)  
Old 02-06-2007, 06:52 PM
Lee
Tablet PC Guest
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

JJ Jones wrote:
> Hello,
>
> Does anybody know how to print barcodes on an Epson impact printer
> (FX-2190 or FX-2170) using ESC/P?
>
> Using the ESC/P manual, I entered two sequences that were supposed to
> print barcodes, and neither of them printed. In fact, they froze the
> printer.
>
> I'm using the manual titled "Epson ESC/P Reference Manual, December
> 1997". In the "Recommended Operations" section, there are many
> examples of numeric sequences that are supposed to print barcodes, but
> I can't get them to work. I tried two:
>
> At the top of page R-95, I sent the following hex numbers to the
> printer: 1B,28,42,0D,00,04,02,00,7D,00,03,30,31,32,33,34,35 ,30, but it
> didn't generate the example barcode.
>
> At the bottom of page R-93, I sent the hex numbers:
> 1B,28,42,12,00,04,02,00,7D,00,00,30,31,32,33,34,35 ,36,37,38,39,30,35,
> but it also didn't print the example barcode.
>
> When doing this, I first turned the printer off & on, to initialize it,
> then I sent the hex string. My guess is that there is some magic
> number that I'm missing that will initialize the printer properly, or
> put it into graphics mode or something.
>
> Any ideas?
>
> Thanks
>

I used to use these all the time to print bar codes!
You are going about it the wrong way.
First, there are DIP switches that have to be set to allow graphics mode.
Then, instead of sending code sequences, you use software that prints
the kind of bar codes you want. There are many kinds of bar codes.
The sequences you are playing with are for programmers.
Firstly, determine what kind of bar codes you want.
Second, find software to do it.
There is freeware software to do just about anything you want.
i.e. type 'freeware barcode software' in Google and you will find all
kinds of things.
Regards
Lee

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #13 (permalink)  
Old 02-06-2007, 06:52 PM
Lee
Tablet PC Guest
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

JJ Jones wrote:
> Hello,
>
> Does anybody know how to print barcodes on an Epson impact printer
> (FX-2190 or FX-2170) using ESC/P?
>
> Using the ESC/P manual, I entered two sequences that were supposed to
> print barcodes, and neither of them printed. In fact, they froze the
> printer.
>
> I'm using the manual titled "Epson ESC/P Reference Manual, December
> 1997". In the "Recommended Operations" section, there are many
> examples of numeric sequences that are supposed to print barcodes, but
> I can't get them to work. I tried two:
>
> At the top of page R-95, I sent the following hex numbers to the
> printer: 1B,28,42,0D,00,04,02,00,7D,00,03,30,31,32,33,34,35 ,30, but it
> didn't generate the example barcode.
>
> At the bottom of page R-93, I sent the hex numbers:
> 1B,28,42,12,00,04,02,00,7D,00,00,30,31,32,33,34,35 ,36,37,38,39,30,35,
> but it also didn't print the example barcode.
>
> When doing this, I first turned the printer off & on, to initialize it,
> then I sent the hex string. My guess is that there is some magic
> number that I'm missing that will initialize the printer properly, or
> put it into graphics mode or something.
>
> Any ideas?
>
> Thanks
>

I used to use these all the time to print bar codes!
You are going about it the wrong way.
First, there are DIP switches that have to be set to allow graphics mode.
Then, instead of sending code sequences, you use software that prints
the kind of bar codes you want. There are many kinds of bar codes.
The sequences you are playing with are for programmers.
Firstly, determine what kind of bar codes you want.
Second, find software to do it.
There is freeware software to do just about anything you want.
i.e. type 'freeware barcode software' in Google and you will find all
kinds of things.
Regards
Lee

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #14 (permalink)  
Old 02-06-2007, 06:52 PM
Robert Newson
Tablet PC Guest
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

JJ Jones wrote:

> Actually, ESC/P has been pretty reliable for simple things like
> changing font sizes, etc. But I haven't gotten to first base on
> barcodes or even graphics code. I would also like to use some simple
> graphics, like blacking-out something with a solid black square.


Thing with graphics is there are various "modes" which the printer may, or
may not, understand, in particular 8 & 24 bit graphics (for 9 & 24 pin
printers). The difference being that more bits are stacked vertically for
the latter - 3 bytes are used to define the stack of bits to printer as
opposed to just 8.

When printing graphics, a stack of bits is scanned across each line - you
need to specify /exactly/ how many stacks of bytes are being sent so that
the printer with accept the full 8 bits for the next n bytes before resuming
normal character/control interpretation.

Similarly when doing bar codes: you will need to specify exactly how many
data bytes are being sent to the command (the data for the bar code, plus
the preamble which specifies the bar code type and size, etc).

> One thing I found out is that there is a 1998 ESC/P manual which has a
> somewhat different escape sequence for barcodes than the 1997 manual
> that I have. For example, the 1997 manual shows the length as 2 bytes
> - an int and a mod. While the 1998 manual shows it as a "word". I
> assume a "word" is 4 bytes in this case.


I would presume the word to be 16 bit, or 2 words, and giving the same result.
....

>>I wish you well with this. We've an Epson thermal label/barcode printer
>>which also uses ESC/P. I've never got further than having MS Word print
>>to it from Win98. I'd like to get it printing barcodes though - I found
>>the ESC/P manuals too baffling for my small brain.


Examining the original example:

1B,28,42,0D,00,04,02,00,7D,00,03,30,31,32,33,34,35 ,30

or as characters:

<ESC> ( B [13] [0] [4] [2] [0] [125] [0] [3] 0 1 2 3 4 5 0

We have (presuming data correct):

<ESC> - command prefix
( - Command: an extended one, next char gives actual command
B - Command: print a bar code
[13][0] - A lo-hi (little-endian 16 bit word) length of data to follow
(13 bytes)
[4] - Bar code type: 4 = UPC-E
[2] - Module Width: 2 dots
[0] - Space adjustment (none)
[125][0] - A lo-hi Bar length = 125 units
[3] - Control flag: 0000 0011 = No human readable chars
Printer adds check digit
0..0 - Bar code data (7 as printer adds 8th check digit) - 0123450

The size of the unit depends upon the printer and the parameter. 24 pin
printers using a smaller unit than 9 pin printers.

I vaguely remember when testing bar codes (when working in mail order retail
years ago) that they don't print until the paper is advanced. Try adding a
few Carriage Return line feeds (CRLF - 0x0D 0x0A) to the end of the test
print, ie send:

0D 1B 42 0D 00 04 02 00 7D 00 03 30 31 32 33 34 35 30 0D 0A 0D 0A 0D 0A

>>What I have seen suggested here in the past is kbarcode. I don't know
>>how well it's maturing but it's probably worth a look. If you are able
>>to produce *any* code that produces reliable output from an ESC/P
>>printer I'd very much like to see it - as a starting point for my own
>>endeavours, especially seeing as I don't even know where to start with
>>this!


It is possible to print bar codes using the graphics mode (I used that
before we got a printer that could do bar codes, but I only had the
definitions for 2 of the possible bar codes).

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #15 (permalink)  
Old 02-06-2007, 06:52 PM
Robert Newson
Tablet PC Guest
 
Posts: n/a
Re: Printing Barcodes with ESC/P on Epson Impact Printer

JJ Jones wrote:

> Actually, ESC/P has been pretty reliable for simple things like
> changing font sizes, etc. But I haven't gotten to first base on
> barcodes or even graphics code. I would also like to use some simple
> graphics, like blacking-out something with a solid black square.


Thing with graphics is there are various "modes" which the printer may, or
may not, understand, in particular 8 & 24 bit graphics (for 9 & 24 pin
printers). The difference being that more bits are stacked vertically for
the latter - 3 bytes are used to define the stack of bits to printer as
opposed to just 8.

When printing graphics, a stack of bits is scanned across each line - you
need to specify /exactly/ how many stacks of bytes are being sent so that
the printer with accept the full 8 bits for the next n bytes before resuming
normal character/control interpretation.

Similarly when doing bar codes: you will need to specify exactly how many
data bytes are being sent to the command (the data for the bar code, plus
the preamble which specifies the bar code type and size, etc).

> One thing I found out is that there is a 1998 ESC/P manual which has a
> somewhat different escape sequence for barcodes than the 1997 manual
> that I have. For example, the 1997 manual shows the length as 2 bytes
> - an int and a mod. While the 1998 manual shows it as a "word". I
> assume a "word" is 4 bytes in this case.


I would presume the word to be 16 bit, or 2 words, and giving the same result.
....

>>I wish you well with this. We've an Epson thermal label/barcode printer
>>which also uses ESC/P. I've never got further than having MS Word print
>>to it from Win98. I'd like to get it printing barcodes though - I found
>>the ESC/P manuals too baffling for my small brain.


Examining the original example:

1B,28,42,0D,00,04,02,00,7D,00,03,30,31,32,33,34,35 ,30

or as characters:

<ESC> ( B [13] [0] [4] [2] [0] [125] [0] [3] 0 1 2 3 4 5 0

We have (presuming data correct):

<ESC> - command prefix
( - Command: an extended one, next char gives actual command
B - Command: print a bar code
[13][0] - A lo-hi (little-endian 16 bit word) length of data to follow
(13 bytes)
[4] - Bar code type: 4 = UPC-E
[2] - Module Width: 2 dots
[0] - Space adjustment (none)
[125][0] - A lo-hi Bar length = 125 units
[3] - Control flag: 0000 0011 = No human readable chars
Printer adds check digit
0..0 - Bar code data (7 as printer adds 8th check digit) - 0123450

The size of the unit depends upon the printer and the parameter. 24 pin
printers using a smaller unit than 9 pin printers.

I vaguely remember when testing bar codes (when working in mail order retail
years ago) that they don't print until the paper is advanced. Try adding a
few Carriage Return line feeds (CRLF - 0x0D 0x0A) to the end of the test
print, ie send:

0D 1B 42 0D 00 04 02 00 7D 00 03 30 31 32 33 34 35 30 0D 0A 0D 0A 0D 0A

>>What I have seen suggested here in the past is kbarcode. I don't know
>>how well it's maturing but it's probably worth a look. If you are able
>>to produce *any* code that produces reliable output from an ESC/P
>>printer I'd very much like to see it - as a starting point for my own
>>endeavours, especially seeing as I don't even know where to start with
>>this!


It is possible to print bar codes using the graphics mode (I used that
before we got a printer that could do bar codes, but I only had the
definitions for 2 of the possible bar codes).

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Epson Scanners vernon Windows Vista 32 05-27-2008 09:30 AM
Epson 1280 & OSX???? Gregory W Blank Apple Macintosh Hardware 4 02-06-2007 04:43 PM
Help with Epson 740 Inkjet Printer Summer Apple Macintosh Hardware 6 02-06-2007 03:50 PM
Epson Printer Drivers Michael Kintner Windows XP 2 01-29-2007 08:15 AM
Printer for ' Photo-Printing' purpose only Spring06 Windows XP 1 01-04-2007 06:44 AM


All times are GMT -8. The time now is 03:07 AM.


2003 - 2008 All Rights Reserved. Technology Questions

SEO by vBSEO 3.1.0