Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Escape sequence help needed for Epson LQ2180 to print BarcodeHelpful Member! 

rdfoerster (Programmer) (OP)
10 Apr 03 17:01
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.
JimBrown (IS/IT--Management)
11 Apr 03 6:58
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

rdfoerster (Programmer) (OP)
11 Apr 03 11:49
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
Helpful Member!  mssi (Programmer)
27 May 03 15:06
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
rdfoerster (Programmer) (OP)
27 May 03 16:36
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.
DougP (MIS)
29 May 03 13:32
attrofy (IS/IT--Management)
25 Jun 03 16:27
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.
mssi (Programmer)
25 Jun 03 17:06
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!

                
attrofy (IS/IT--Management)
26 Jun 03 10:22
yes that helps tremendously.  I assume that any single digit (or letter) that is to be barcoded comprises of only one byte?

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close