Software Toolbox Technical Blog

5 min read

Direct Control of Zebra Label Printers from HMI / SCADA

Sep 26, 2019 2:00:00 PM


One of the most common device integration scenarios that we encounter is needing to control a printer and/or label applicator directly from an HMI or SCADA such as Wonderware.  And printers can be tricky, with most having similar but still different communication protocols - so how does one account for that kind of variability?

In this first blog post of a series on OmniServer user stories, we’ll discuss a specific use case of a paper products manufacturer needing direct control of their printing and labeling process directly from Wonderware and how OmniServer provided a driver without the need for custom code.

In any industry where a finished product of some sort is being created, there will inevitably be a packaging and labeling step in the process.  Many times, the printing and labeling equipment has potentially been in place for some time and the "integration" of that equipment is as basic as manual entry or possibly has been accomplished through wiring the printer up to a PLC.

Even if it's a new system being implemented, the ideal is to have the most direct control of printing and labeling tasks as possible by the operator of your HMI or SCADA for the process.  But printers don't typically just have an off-the-shelf OPC server to facilitate that level of direct control (not like devices that support a protocol like Modbus, for instance).

The Use Case - More Direct Printer Control

Logo_Zebra_CurrentTo provide some insights into solving this sort of problem, let's look at a real user story as a representative example of how to accomplish more direct control in a printer architecture that started off much more indirect.  A system integrator was working with a large paper producer on their printing architecture using Zebra label printers.

As part of the production process, it was required to print and apply a barcode label to finished pallets and bales of product prior to shipment. Each pallet or bale of product was labeled with a unique “license plate number” drawn from an existing ERP system by their Wonderware InTouch HMI.

Printing was occurring indirectly from the HMI to a PLC, which actually performed the print command to the Zebra label printer. With such an indirect architecture, if there were ever any communications problems, it was much more difficult to pinpoint which component of the system was having the problem and resolve the issue.

The client wanted more direct control of the printing functions from the Wonderware InTouch HMI application.  As part of that proposed new direct architecture, it would be necessary to send the required LPN data from InTouch using the necessary commands to the Zebra label printer using the native Zebra printer protocol called ZPL-II.

The Indirect Architecture of the Original System

The diagram here shows the overall architecture used in the previous design of this system.  The control of printing and applying the labels was done in a roundabout fashion through PLC logic in a Simatic 505 controller.

Diagram - Original Printer Architecture

The Simatic controller had some of the basic Zebra ZPL-II protocol commands programmed in PLC logic.  Should any additional ZPL-II protocol commands ever be needed in the future, they would have to be added to the PLC logic, which was less than ideal.  The variable information such as the unique LPN number was written to V registers in the Simatic controller from InTouch through the Wonderware Siemens TI Direct I/O Server.

The logic in the controller used these variable values to construct the print command string, which it transmitted to the Zebra label printer from the RS-232 port, which was connected to a Serial-to-Ethernet converter to transmit the printer commands to the Zebra printer across the network, where they were processed and the labels would be printed and applied.

The Direct, More Efficient Architecture of the New System

The architecture of the new, more direct system implementing OmniServer is shown here in this diagram.  With an OmniServer solution, the overall architecture was simplified here, as several previously required components were no longer necessary.

Diagram - New Printer Architecture with OmniServer

Rather than variables such as the LPN number being written to V registers in a Simatic controller, the variable values are now passed to items configured in the OmniServer protocol, thus triggering the print commands in OmniServer to be transmitted directly to the Zebra printer.  With OmniServer’s built-in Ethernet device support, it was also no longer necessary to use a Serial-to-Ethernet converter for sending commands across the network to the printer.

OmniServer Streamlined the Printing Control Process

As a result of using OmniServer, the efficiency of the overall labeling system was greatly improved.  Some of the key benefits included:

  1. Fewer components means fewer points of failure

    With fewer overall components, there are fewer points of failure in the system. OmniServer removed the need for the Siemens TI Direct Server, the Simatic controller and the Serial-to-Ethernet converter in this setup.

    Not only does this remove the components themselves, but the requirement for maintaining this additional hardware and the PLC Logic that made the system work, resulting in lower overhead for the system.
  2. More direct control from the HMI increases responsiveness

    Also, with the unnecessary components removed, InTouch is afforded more direct control of the printing process, increasing responsiveness. This results in more efficiency in the overall process.
  3. Additional ZPL-II Print Language commands easier to implement as needed

    And it will be much easier to add additional ZPL-II print commands to the OmniServer protocol, if they are ever needed in the future for increased functionality, reducing engineering time.  The expertise of a PLC programmer just to add additional commands is no longer required.
  4. Diagnostic tools in OmniServer allow easier troubleshooting

    Additionally, if/when there are ever any problems with this system, the diagnostic tools in OmniServer, such as the I/O Monitor and Event Logger, allow better, more effective troubleshooting than would have been possible in the previous setup.  This reduces any potential downtime that might result because of a failure in this system

For any such printer integration project, OmniServer provides an easily configured, easy-to-integrate, custom protocol server, that can be configured to do anything from triggering individual prints to downloading whole print formats to the printer. (For new users, if you'd like an introduction to using OmniServer, please click here.)

Just make sure the protocol documentation for your particular model of printer is available [for a tutorial on evaluating protocol documentation, click here] on how to format the messages to the printer.  Beyond just Zebra printers, we’ve had experience implementing protocols for many different makes of printers, such as Leibinger, Zebra, Domino, Matrix, VideoJet, and others. (For a general discussion on integrating printers, don't miss this blog post.)

Wondering if OmniServer might work for integrating your printers (or any other non-standard equipment)? Email us at support@softwaretoolbox.com with your questions and  subscribe to our blog for more helpful OmniServer tutorials and tips.  And don't forget to download your free trial of OmniServer to start integrating your own printers and other non-standard devices.Get Your Free OmniServer Trial Now

Kevin Rutherford
Written by Kevin Rutherford

Join Our Journey

Working in industrial automation since 1996, the Software Toolbox team has seen a lot. The level of automation system sophistication of our integrators and users has evolved, each driven by the demands of their market and clients.  Everyone's learning continues as technological change accelerates.

This blog is about sharing from these journeys.  From tips on implementing software, successes our clients have experienced, or new ideas and things to consider in your journey, we'll be sharing them here.

Subscribe to our Blog

Recent Posts

Posts by Topic

See all