Creating an Automatic Form with Zebra Designer or DOS

This document tells you how to set up the printer so that variable data can be scanned straight into a stored form (AUTOFR) via the printers’ serial or parallel port in a standalone mode. You can also have the desired quantity of labels print automatically, as soon as the last variable field is filled. This form becomes active as soon as the printer is powered on.

The AUTOFR form can be created using Zebra Designer software (free with your purchase or from our web site or by entering the command language in the DOS editor. You can have up to 99 variable fields in the form, which will be downloaded and stored to the printers’ resident memory. However, there can be no other forms stored in the printer when using the AUTOFR.

Note: while you are testing AUTOFR it is best to use another name for the form. Once you are satisfied with the form, rename it AUTOFR before you download it. There is no need for a file extension.

 

Creating the form in Zebra designer

  1. Create label and save it with a unique form name. Not AUTOFR
  2. Set up the port for your printer to FILE (in the zebra designer printer driver properties)
  3. You may view the label format  by selecting the "Export to printer" command from the "File" menu.  This will cause the application to generate the printer code necessary to store the label for recall.  It will be stored on your PC with the first 8 characters of the name of the label format file, with the .lbl extension.    One can view this file by opening the .lbl file with an application such as NOTEPAD.

Edit the form

  1. Go to Start and click Run. Type: command and click OK to open a DOS window.
  2. At the C:\ prompt type: dir <put the unique form name here>.lbl  /s and press the <Enter> key.
  3. Make note of the directory path where the file is stored.
  4. At the prompt type: cd <put the directory path here> and press <Enter>.
  5. Type: edit <put the unique form name here>.lbl and press <Enter>. The form will now appear on the editor screen.
  6. Add a command script at the end to recall the form, send the variable data and print the desired number of labels. This is used for testing only.
  7. Save the file, exit the editor and copy the file to the port your printer is on. This will print your label exactly as it will appear when initiated from your device.
  8. Check the label and use the editor to make any additions or corrections necessary, then re-test.
  9. After you are satisfied with the printers’ output, remove the test script and add the PA command just before the FE. You will also be renaming the form to AUTOFR.
  10. Save the file, exit the editor and copy the file to your printer. You can now send variable data from your scale or scanner straight to the printer.

This procedure is outlined in the following example:

 

The form name for our example is TESTFORM.LBL. (Note: Upper or Lower case makes no difference to DOS and it is assumed that the <ENTER> key is pressed at the end of every line)

In the DOS window at the prompt C:\

Type: dir testform.LBL /s

In this case the returned message is:

Directory of C:\EPL\Samples
07/14/00 03:18p               166 TESTFORM.LBL
1 File(s)                                                     166 bytes
Total Files Listed:
       1 File(s)                                              166 bytes

Type: cd c:\EPL\samples
Type: edit testform.LBL

The blue editor screen will now be up. Follow screen instructions to clear the intro page and TESTFORM.LBL will be displayed.

This is the edit screen for TESTFORM.LBL. It has one fixed text line and one variable barcode.
Refer to the EPL2 Programmers Manual for a detailed explanation of the command lines.

(LF)                                                  Line Feed to wake up the firmware Not typed, use<Enter>key
FK"*"                                            Form Kill (delete any existing form)
FS"TESTFORM"                         Form Save (save from here to FE at the bottom)
V00,10,N,""                                   Variable field definition
q464                                              Label width
Q152,20                                          Label height followed by gap width
S2                                                    Speed (2ips)
D8                                                     Density or darkness setting
ZT                                                     Print direction
A10,61,0,2,1,1,N,"QUANTITY"    ASCII Text specifying a fixed text line
B122,10,0,3,2,4,102,B,V00              Barcode definition reflecting variable data from above
FE(LF)                                                Form End followed by a Line Feed

Add a command script at the end to recall the form, send the variable data and print the desired number of labels. This is used for testing only.

FR"TESTFORM"                         Form Recall loading the form created above
?                                                     Download following data to the labels’ variable fields
ABC1234                                         Data to be downloaded
P1                                                     Print 1 label

Click on File, Save As… and TESTFORM.LBLshould be in the field. Click OK.
Click on File, then Exit.

If you are downloading the file through the COM (serial) port you will need to configure the port using the following procedure. If you are using the LPT (parallel) port, skip down to Testing the form.

Setting up the COM ports

  1. Autosense the printer.
  2. Write down the serial port settings from the configuration report label.
  3. If you are using Windows 98 or 95, skip to line 5. If you are using Windows NT or 2000, go to Start, Settings, and Printers.
  4. Right click on each printer in the window and click on Properties, then Ports.
  1. In a DOS window, configure the COM port to match the settings in the configuration report.

Your COM port is now able to communicate directly to your printer. If you minimize or jump out of the DOS window the COM port will remain configured when you return. But if you close the DOS window you will have to enter the command line again.

Testing the form

At the prompt type: copy testform.LBL lpt1: or com1: or com2: etc….whichever port the printer is located.

Check the label and make any additions or corrections necessary, then re-test. After you are satisfied with the printers’ output, remove the test script and add the PA command just before the FE. You will also be renaming the form to AUTOFR.

Replace this: With this:
FS"TESTFORM" FS"AUTOFR"
FE(LF) PA1            Print 1 (or the number required) Automatically
FR"TESTFORM" FE               Form End
? FI               Print Form Information
ABC1234  
P1  

The printer will respond with a Form information label reporting that AUTOFR is stored in the printer. Now attach the printer to your device and test a label. If nothing prints, nothing is arriving – check pin-outs and serial settings.

Note that the above form was created using Create-A-Label’s code generating feature, but the EJF file can be built entirely in the DOS editor.

Other Issues

1. You will need to make sure the pin-outs of your sending device match EPL printers requirements

EPL printer side - Pin 2 Transmit, Pin 3 Receive, Pin 6 Data Send Ready and Pin 5 Ground are required.

2. Make sure that serial communication parameters are correctly set for your device.

If necessary, use the Y command to set the printers’ baud rate and parity, etc..

3. You will need to be sure of everything the sending device sends.

If your scale sends 10 spaces before it sends the weight, you will need to know that before defining the length of the variable field, otherwise the field you create in your label may not be long enough to accept all the characters. Place the printer in the diagnostic dump mode and send from your sending device. All characters the device sends will be printed on the label. If nothing prints, nothing is arriving - check pin-outs and serial settings.

4. AUTOFR treats any incoming data as a variable intended for printing.

This means if you send the printer a memory partition command – the command will print on a label. If you send a delete command - that command will print on a label.

5. IMPORTANT-COPY THE AUTOFR FILE  FOR A BACKUP!

If the printer loses the AUTOFR file for any reason (ex. memory is lost, printer is sent in for repair or replaced) someone will need to reload the file from this backup. Make it easy for the end-user to get the printer back on line.

Making changes to AUTOFR

When you want to make changes to the existing AUTOFR you must clear the old one out of the printers’ memory first. Open the DOS editor as described earlier and execute the following procedure:

Hold down the <Ctrl> key and press <P>, then let them both up.
Hold down the <Alt> key and using the 10-key number pad on the right side of the keyboard, Type: 19
You will see !!
Press the <Enter> key.
Click on File, Save As… and type: STOPFORM.LBL in the field. Click OK.
Click on File, then Exit.
At the prompt type: copy stopform.LBL lpt1: or com1: or com2: etc…
Then start the editor up again and press the <Enter> key.
Type: FK"*"
Press <Enter> key.
Type: FI
Press <Enter> key.
Click on File, then Save As… and type: KILLFORM.LBL  in the field. Click OK.
Click on File, then Exit.
At the prompt type: copy killform.LBL lpt1: or com1: or com2: etc…
The printer will print a Form information label reporting no forms stored.
The AUTOFR is now cleared from the printer.