Epson ESC codes in dos
Posted on 2004-11-24
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?