Connect Zebra zt410 printer and print label by ignition

Hi everyone, I’m doing a project which need to print 2D barcode and some label informationl. We bought a zebra zt410 printer. I find a function in the forum as in the pictures , but there is an error come up, Please help me to check, and if you have any good function to print the label and barcode by clicking the button to trigger the zebra printer, please show me ! I realy need your help. Thanks !

error:PrinterException: Printer is not accepting job

java.awt.print.PrinterException: Printer is not accepting job.
at sun.print.RasterPrinterJob.print(Unknown Source)
at com.inductiveautomation.factorypmi.application.print.FPMIPrinterJob.print(
at com.inductiveautomation.factorypmi.application.script.builtin.PrintUtilities$JythonPrintJob.print(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.python.pycode._pyx13.f$0(event:actionPerformed:5)
at org.python.pycode._pyx13.call_function(event:actionPerformed)
at org.python.core.Py.runCode(
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(
at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(
at com.sun.proxy.$Proxy33.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$ Source)
at java.awt.EventQueue$ Source)
at Method)
at$1.doIntersectionPrivilege(Unknown Source)
at$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$ Source)
at java.awt.EventQueue$ Source)
at Method)
at$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at Source)

Ignition v7.8.0 (b2015101414)
Java: Oracle Corporation 1.8.0_31

How is the printer connected? IMO, you can usually get better results using ZPL than going through ZDesigner.

An example of ZPL, sending this plaintext to the printer (if you are still looking to do this through Windows, you can use the Generic Text driver.)

~JA ^XA ^BY2,2,167 ^FT015,280,^B3N,N,,N,N ^FDP4CJ9496SA24^FS ^FT050,080^A0N,40,45 ^FDP4CJ9496SA24^FS ^PQ11,0,0,N ^XZ

This will print a barcode (Code39 in this instance) and some readable text.

Part of asking how the printer is set up is to help tailor a more specific answer. :slight_smile:

We recently integrated a Zebra printer into an Ignition system. We ended up using ZPL as Jordan suggests, sending it to the printer using raw TCP sockets. The following Python script should give you an idea of how to go about this:

import socket
HOST = ''
PORT = 9100
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
s.sendall('^FO50,50^ADN,36,20^FDHello world')

Just put this script on a button in Ignition and make sure the HOST variable is set to the IP address of your printer. After that, sorting the layout, choosing the type of barcode you want printed etc. is a matter of reading the ZPL manual!

1 Like

Zebras… my favorite topic :mrgreen:

A quick way is to print directly to LinkOS enabled printers is to use HTTP and post the ZPL. … ost-v5.pdf

The way I like to do printing is to:

  • manage the printers using Zebra Mirror (fancy FTP server)
  • create labels using ZDesigner and export them to Mirror for XML enabled printing
  • send print jobs to the printer via HTTP or LinkOS SDK.

Here is a private video that I have shared with some Zebra techs when working on a particular problem.

Feel free to call me at the number on the video if you want to chat about Zebras in the wild…


Hello Everyone, sorry to send a message to the this topic, but if we use a Local Zebra Printer By USB, how can I send the ZPL code for that?

If you use the RS232 port on the printer you can send ZPL over Serial.

You could check to see if the USB connection also allows a for a serial protocol, not sure if there is another way.

Thanks for the fast reply, I will try this method.