×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • 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!

*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.

Students Click Here

Zebra Printers and VB6 - Printer Object/ZPL

Zebra Printers and VB6 - Printer Object/ZPL

Zebra Printers and VB6 - Printer Object/ZPL

(OP)
HI, For the past 10 or 15 years we have used two Zebra label printers hooked up to a computer via serial port and  have sent ZPL to it. We have now decided to upgrade to newer Zebra printers so we can print images on the labels, which have pretty much done what I planned, but I am running into some complications. The new printers are hooked up with a network card.

With the new printers I have just used VB6’s printer object and set X and Y coordinates to print my text and bar codes on the labels. I am not going to get into the issues that I am having, because I don't think it is relevant (but if you think so I will post it).

My main question is everything I read says to write the txt file and send ZPL to the printer. Why is this used instead of VB6's printer object? I have about 80 users that send print jobs to these printers and wondered if creating a ZPL file was a better way of printing.

RE: Zebra Printers and VB6 - Printer Object/ZPL

Yes, ZPL is native to Zebra's.
You should find it prints much faster as well.
the easiest way to create ZPL is by using a label design program for your Zebra printer and then Print to a txt file. Design your label as normal. Use Native Zebra built in Fonts (not True Type Fonts) Print the label as normal to get it correct then when its all correct print to file.

then you use this FAQ for specific details FAQ694-2608

DougP, MCP, A+

RE: Zebra Printers and VB6 - Printer Object/ZPL

I have just bought a Zebra TLP2844 Label printer, have had some experience programming serial label printers before using an vb6 stk supplied by the makers. However I am having a deal of problems getting my VB6 app printing to this device, UncleCake you seem to have it cracked can you throw me a  bone in the form of some vb6 code I recon if I can jut get it to print a barcode and some text I can crack it.

RE: Zebra Printers and VB6 - Printer Object/ZPL

Be careful!

As I understand it, the TLP2844 models only speak EPL while the TLP2844-Z models speak ZPL2. The languages are different. Verify your printer model and supported language in its firmware.

Jim Asman
http://www.spectracolorservices.com

RE: Zebra Printers and VB6 - Printer Object/ZPL



I have been firing code at this TPL2844 all night and it just sits there, I called Zebra who told me to go back to the supplier who then direct me to the Zebra website. I know the printer works because I can print from the Zebra software so what am I doing wrong I can anone help?


This is my code


Text2.Text contains one line at a time of the following three lines

N
B100,100,0,RL,4,4,40,B,"1234567890"
P

Private Sub Command1_Click()
  With MSComm1
    'make sure the serial port is open
    If .PortOpen = False Then .PortOpen = True
    .CommPort = 1
    'set the badurate,parity,databits,stopbits for the connection
    .Settings = "1200,N,7,1" ‘same as Zebra use
    'set the DRT and RTS flags
    .DTREnable = True
    .RTSEnable = True
    'enable the oncomm event for every reveived character
    .RThreshold = 1
    'disable the oncomm event for send characters
    .SThreshold = 0
    'open the serial port
    .PortOpen = True
    'send the data (including a tailing carriage return as often needed)
    .Output = Text2.Text & vbCr
  End With 'MSComm1
  Dim intoone As String
  intoone = Text2.Text
  With Text2
    'place the focus back to the textbox
    .SetFocus
    'select the current text to be overwritten
    .SelStart = 0
    .SelLength = Len(.Text)
  End With 'Text1
End Sub

RE: Zebra Printers and VB6 - Printer Object/ZPL

Yes this is EPL and I have discovered that I may have been miss sold the product.

I baught this printer expressly on the advice of EPOS Logic I asked for a printe with an VB5 or 6 STK, I got the TPL 2844 after hours of messing about I installed the Zebra Pro software which installed a print driver the printer works fine! with it's own driver however I get error 8015 telling me a paramiter is incorrect from my v code opening com1. Great I recomend if you want to use this great little printer with VB forget it unless you want a good deal of messing about. if anone knows better please let me know before I strangle EL

RE: Zebra Printers and VB6 - Printer Object/ZPL

Yes I tried many combinations from the programming manual

then tried copy barcode.txt com1 nothin happend untill i instal the zebra com port driver then it copy barcode.txt com1 works fine only problem my vb application cant talk to the com port error 8015 ouch.

RE: Zebra Printers and VB6 - Printer Object/ZPL

EPL commands require a lf termination. cr is optional.
Also, it's good practice to send a cr/lf first.

Change the following line and see if it helps.
.Output = vbCrLf & Text2.Text & vbCrLf


Mark

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

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! Already a Member? Login

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