Introduction

This tutorial gives an introduction of how to setup your Zebra barcode printers for printing barcodes.

Client Side vs. Server Side Printing

In general the Client Side printing option is for customers where Eazyworks does the hosting. In that case the server which is in the cloud cannot get to the customers printer. Printers need to be installed on the customer location connected to their HW. This HW needs to have the printer drivers installed for the Zebra printers, and the PC where the browser runs, needs to have access to that printer through the browser.

As this doesn't always to be straightforward to setup, we have made a support page where the tools can be downloaded to make the connection between the browser and the printer, as well as some tools to help to support the total setup. This can be found following this support link.

In case you are hosting the application yourself, we recommend using server-side printing.

 

IF YOU ARE HOSTING THE MES SYSTEM LOCAL OR INTERNALLY, WE STRONGLY RECOMMEND USING SERVER SIDE PRINTING!
 

 

Configure the Printer in EZ-MES

Setting the Printer

The printer can be stored at 3 different locations. The system will go through the following logic to determine which saved printer has to be used:

  1. If it is printed through a label design file, it will use the printer that is defined on that label design file. If no value is defined, it will:
  2. Check the printer that is saved for the user that pressed the print button. If this user does not have a printer defined:
  3. It will check the defined printer on the ‘system’ user.
  4. If none of these result in a printer, it will result in an error.

Set the printer name for a specific user

Set the printer for a specific user.

Set system default printer

Only a user with admin rights can set the system default printer by taking the following steps.

Setting the system default Printer.

Server Side Printing

By default EZ-MES is configured for client side printing.

To enable server side printing you have to switch the program from client to server side printing. You can do this by taking the following steps:

Open the system object

  1. Press F9 or click the barcode Icon
  2. This will open the Barcode scanner window
  3. Type: ‘user system’
  4. Press enter or Click the ‘OK’ Button

Now the system dialog will open:

  1. After the system user form opens
  2. Click the check box to ‘Enable Server Side Printing’
  3. Enter the address and printer name. In this example: \\ez20.eazyworks.local\lp2824-z

 

Get the Zebra Designer Software

You can download the Zebra Designer from the www.zebra.com website, at the following link:

http://www.zebra.com/us/en/products-services/software/zebralink/zebra-designer.html

Or in case the link does not work:

Download the Zebra Designer software

  1. Go to www.zebra.com
  2. Select ‘Products and Services’
  3. Select ‘Software’
  4. Under ‘ZebraLink’ select ‘ZebraDesigner’
  5. Download the software

To download the software you need to make an account at zebra. Don’t forget to uncheck the ‘junkmail’ check mark.

 

Design your Barcode Labels

We use the ZebraDesigner to create a design of a barcode label. We will go through the following steps:

  1. Start ZebraDesigner
  2. Setup your design file (.lbl)
  3. Add a barcode to the design
  4. Print the design to file
  5. Connect strings in the prn file to EZ-MES values

Welcome Wizard

When you start the ZebraDesigner, it will come up with the Welcome Wizard

  1. Directly after the ZebraDesigner is started
  2. The Welcome Wizard will open
  3. Select that you want to Create a new Label
  4. Click the Finish button, now the Label Setup Wizard will start.

Label Setup Wizard

Zebra Designer will let you go through a number of screens with its Wizard. In most case you don’t have to change anything.

Select the printer you are designing the label for (you need to have access to a ZPL printer)

We are not going to use a stock file

Page Size settings

Label Layout, press ‘Next’

The Zebra Designer knows the dimensions for your printer, so you can press finish

NOTE: Make sure that the dimensions in this dialog match the size of the actual label. Otherwise it can happen that text will not be shown on the printed label.

Design your Label in the Zebra Designer

Insert a Barcode in your design, After selecting ‘Fixed bar Code’, click on the canvas

Define the properties for you barcode

  1. Select the ‘Fixed bar code data’ option
  2. Enter a value that you can easily find in the resulting prn file, and it is recommended to just use the same name as the Variable you use in EZ-MES.
  3. Select the Bar code type. In this case simple Code128
  4. Press the Finish button

The resulting design in the ZebraDesigner:

Note ‘UID’ under the barcode, you will find the same string in the prn file.

NOTE: The size of the barcode is determined by the 3 characters of ‘UID’ your serial number is probably longer than that, so you have to size the barcode smaller to make it fit.

Save the prn file

To create the prn file you need to upload to the MES take the following steps

Select Print from the File Menu, that will open the following dialog:

Make sure that you select the ‘Print to file’ checkbox

  1. Select the ‘Print to file’ check box
  2. Press the ‘Print’ button, this will open the following file dialog where you can define the location and name for your prn file.

Press save to create the prn file.

When you look at the prn file with a text editor you will see the following:

Content of the prn file, you can see UID what will be coded in the barcode.

The following text can be used to cut and paste (the first line can be ignored):

^XA~TA000~JSN^LT0^MNW^MTD^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ

^XA

^MMT

^PW448

^LL0406

^LS0

^BY3,3,109^FT45,167^BCN,,Y,N

^FD>:UID^FS

^PQ1,0,1,Y^XZ

First line of the PRN file

The first line is ignored.

DLE stands for Data Link Escape: It is sometimes necessary in an ongoing data communication to send control characters. There are situations where those control characters might be understood as part of the normal data stream. The DLE has been defined in the ASCII standard for these situations. If this character is detected in a data-stream, the receiving party knows, that one or more of the following characters must be interpreted in a different way than the other characters in the stream. The exact interpretation of the following characters is not part of the ASCII definition, just the availability to break out of a communication stream with the data link escape.

The remainder of the line is used to set the settings. In this case these settings are the default anyway:

  1. ~CD, : Change Delimiter to ‘,’. The default is ‘,’ so it is redundant
  2. ~CC^ : Change Carrot to ‘^’. This is already the default, so redundant.
  3. ~CT~ : Change Tilde to ‘~’. Redundant

The actual printing will start with ^XA. For more information:

http://en.wikipedia.org/wiki/Zebra_(programming_language)

Adding Text in your design

DON’T USE TRUE TYPE FONTS TO LINK TO VARIABLES

If you want to be able to link your text of the design with the EZ-MES variables, than you can only use ‘Printer Fonts’

To prevent mistakes, only use Printer Fonts

  1. De activate the True Type Font button
  2. Activate the Printer Font Button
  3. Now only the Printer Fonts will show up to select

Add Links to EZ-MES in label design

To transfer information from EZ-MES to the actual label, you have to connect the fields you want to replace with MES values by adding ‘<%’ at the front and ‘%>’ at the end. The value in between will be matched up with the variable defined in the MES.

Replace the ‘UID’ text in the prn file with ‘<%UID%>’

Putting the Labels into EZ-MES

The following help page does a good job explaining this:

http://help.eazyworks.com/index.php?option=com_content&view=article&id=536

 

Troubleshooting

.

Variable for text does not show up in the PRN file

When you cannot find the variable to replace in your prn file, it is likely that you used true type fonts in the design of your file. The true type fonts are changed into images before they are put into the prn file, so you will not be able to connect them to EZ-MES variables.

Only use the Zebra Fonts (ZEBRA 0, ZEBRA A etc.) if you want to be able to connect the value to EZ-MES.

Using Zebra fonts:

Design with only using ZEBRA 0 font

This results in the following prn file:

prn file from the above design

In this file you can easily find the text you used in the design. However if we change PRI to an true type font like Arial, we will get the following prn file:

Using a true type font.

In this prn file you can see that the first PRI string is replaced with a reference to a 000.GRF. The font is stored as an image and cannot be replaced.

Variables are not coming through

Make sure you followed the description in chapter 4.6: Add links to EZ-MES in label design. So if you used the proper ‘<%’ and ‘%>’ syntax around your variables there is an additional way you can debug this problem.

You can capture how the system is parsing your prn file. For example take the following example:

Simple example where the ‘<%UID%> has to be replaced with the actual serial number of the part.

Now create the following URL:

http://gemini.eazyworks.com/Eazy_ZPL.ashx?sUser=admin&sData=PR14-000000169&sBarCodeJobFile=DC14-000000004

This URL consists of the following:

  1. http://gemini.eazyworks.com : The URL for your EZ-MES application, you have to change this to your URL.
  2. /Eazy_ZPL.ashx : The handler that does the parsing, no need to change this.
  3. ? : a list of input parameters for the handler:
    1. sUser=admin
    2. sData=PR14-000000169 the Job of the Part Record for which you want to print the label. This can also be the traveler, dependent to which object the document is connected.
    3. sBarCodeJobFile=DC14-000000004: The document that has the uploaded prn file.

When you paste this URL in the browser:

Here you can see that <%UID%> is replaced with ID0002

The result is that the parsing works correctly.

Obtaining the job number of your label document

To use this way of debugging you will need the internal EZ-MES job-number for the label document. You can get this by taking the following steps:

Get the job-number

  1. Open the document form of the print label
  2. If the document is not Pending, move it to ‘Pending’
  3. Cut the Doc. No. into the paste buffer
  4. Press the auto generate button (will only work if no syntax is defined for the document number)
  5. Note the Job-number and paste back the cut value
  6. Now move the document back to active

DC14-000000001 is the Job-Number (8 zeros, before the ‘1’)

 

Still cant get it to work?

Please contact us at: This email address is being protected from spambots. You need JavaScript enabled to view it. or call us at: 626 698 0694