Epson ESC codes in dos

Posted on 2004-11-24
Last Modified: 2008-03-03
I guess this should go in the "Printers" section in hardware, but I think it probably needs a more technical mind to answer it, please help.

I'm trying to print barcodes on an epson EPL 6200 using ESC codes from DOS, just it's not working, I can't find any examples anywhere either.

the manual says:

ESC ( B nl nh k m s v1 v2 c barcodeData

I'm using ASCII character 27 for ESC which looks something like "<-" in DOS edit.

number of databytes = bytes in string + 6

nl = mod databytes/256
nh = databytes / 256

k is a hex value for what sort of barcode, code 128 = 06

m is module with, I'm using 05

s is space ajustment, I'm using 1
v1 and v2 = abar length, I'm using 2 for both

c = controll flag, I'm using 1000000 (8 bits)

so I'm sending from DOS edit and counting every ascII char as one byte, so my barcode "01234567801" = 11 bytes + 6 = 17

(<- = asci character 27)


but the printer just goes mental.

bizzarely when I paste it in here it comes out : "\033\017" something to do with ASCII -> ANSI conversion or something???

Any help would be fantastic, atleast an example that works?

Anyone ?
Question by:lorddef
    LVL 1

    Author Comment

    LVL 4

    Accepted Solution

    You will need to send the numbers as characters, not as text.

    ie: 17 should be send as ASCII character 17 and NOT the text characters '17'

    You will need to do the same with the remaining numbers in the string.


    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
    The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now