Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Escape sequence help needed for Epson LQ2180 to print Barcode 1

Status
Not open for further replies.

rdfoerster

Programmer
Apr 10, 2003
3
BG
I have the documentation for the printer but the documentation is not much help when you have never worked with bar codes.

The documentation says the following:

ESC(Bn1n2kmsv1v2c data

n=(n1 + (256xn2))

k: Barcode font 0: EAN-13
1: EAN-8
2: Interleaved 2 of 5
3: UPC-A
4: UPC-E
5: Code 39
6: Code 128
7: POSTNET

m: Module width 2: 2 dots
3: 3 dots
4: 4 dots
5: 5 dots

s: Space Adjustment value
-3 <= s <= 3 (1/360 inch units)

v1, v2: Bar Length
v1 + v2 X 256 (1/180 inch units)

I have figured out the following:
k = 5
m = 4
s = 0 or 1

The v and n values are to be determined.
The bar height needs to be .5 to .75 inches which is v. I think the value needs to be v1 = 9 and v2 = 0.

The n values are the number of allowed characters so I believe it needs to be n1=F n2=F for all characters in the ascii chart.

So the finished product is ESC(B 0xff 5 4 0 90 c
Spaces are between the items for readability.

The code is not working so does anyone have any suggestions.
 
Well what is it doing? Is there an error code? Does it print anything, even garbage?

Are you sure it's OK to put those n values in hex? Jim Brown,
Johannesburg,
South Africa.
My time is GMT+2
 
The printer was locking up until a ESC@ was done after the data that it was surpose to print.

I am not sure on the hex value The manual doesn't go into detail on the character values. There is a page later that says:
Number of valid characters 1: Control flag c b0=0
Number of valid characters 2: Control flag c b0=1.

I just realized that if I want all 256 characters that n would be 01.

The only thing left is v if this is correct.

Richard Foerster
Mesa, AZ USA
My time is GMT-7
 
Did you ever have any luck with this? I'm trying to do the same thing - print a Postnet barcode (9-digit zip code plus check digit) on an Epson LQ 2170 and not having any luck with the manual. If you can provide the escape sequence that worked for you (Postnet or other - I realize v1 and v2 don't apply to Postnet) I would be very grateful!
Dawn
MSSI
 
I wish that I could help but I have been unable to get this to work and I have been unable to work on it with everything that is going on in the office.
 
I am having a similar problem. I have tried their tech support - tier 1 at best - even tier 2 is pretty much useless. If you come up with any results, let me know as well.
 
Yes, I finally figured this out. Had to get a manager at Epson Customer Support on the phone to do it, but he pointed me to a Product Support Bulletin (PSB No. 1996.07.001) that included sample GWBASIC code from which I could finally figure it out. The escape sequence that worked for me is as follows:

ASCII HEX Comments
ESC 1B
( 28
B 42
DLE 10 n1: # of bytes of barcode data to
follow; in my case 16: 6 bytes of
parameters, zip+4 (9), and check
digit (1)
NUL 00 n2
BEL 07 k: Hex 07 indicates POSTNET
ETX 03 m: module width; default is hex 02,
I got better results with 03
STX 02 s: spaces adjustment value; again,
this gave me best results
NUL 00 v1 - doesn't pertain to POSTNET
NUL 00 v2 - ditto
NUL 00 c: control flag; couldn't figure out
out how to get the printer to add the
check digit, so I calculated it myself

then, the 10 digits to be barcoded.

Hope this helps!

 
yes that helps tremendously. I assume that any single digit (or letter) that is to be barcoded comprises of only one byte?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top