Welcome to the Industrial Automation website!

NameDescriptionContent
XING-Automation
E-mail  
Password  
  
Forgot password?
  Register
当前位置:

Zebra EPL2 Complete Guide

F: | Au:FANS | DA:2026-05-15 | 312 Br: | 🔊 点击朗读正文 ❚❚ | Share:

Zebra EPL2 Programming Complete Guide

Introduction: The positioning and advantages of EPL2

EPL2 (Eltron Programming Language 2) is the core page description language for Zebra desktop printers such as GK420, LP2844, G-Series, etc. Unlike the early line mode (EPL1), EPL2 adopts a "assemble first, print later" mechanism, which can efficiently process text, barcodes, graphics, and QR codes. Its syntax is concise and commands are compact, making it particularly suitable for quickly generating tags in resource constrained embedded environments.

This article is based on the official EPL Programming Guide (document number 14245L-003 Rev. A), which outlines common commands, form storage techniques, variable and counter usage, 2D barcode configuration, network settings (SGD), and common troubleshooting methods for engineers. It helps you quickly locate problems when developing or maintaining Zebra printing applications.


EPL2 Basic Concepts and Command Structure

2.1 Command syntax rules

Each EPL2 command starts with one or two case sensitive letters, followed by parameters (separated by commas), and ends with a line break (LF, ASCII 10). The carriage return (CR) will be ignored. The optional parts in the parameters are represented by square brackets, and the fixed data is enclosed in double quotation marks.

Example: A50,50,0,1,1,1, N, "Hello" - Print "Hello" at coordinates (50,50) using font 1, in normal orientation, without highlighting.

2.2 Image Buffer and Coordinate System

EPL2 uses a dot matrix coordinate system, with the origin (0,0) located in the upper left corner. The X-axis represents width, and the Y-axis represents height. All drawing commands (text, barcode, lines, boxes) are based on this coordinate system. Before printing, the image buffer must be cleared using the N command.

2.3 Media and Printing Control

Set label width (dots): q416 represents a width of 416 dots.

Q sets the label length and gap: Q160,24 represents 160 point labels+24 point gaps.

S sets the printing speed: S2 corresponds to 2 ips (inches/second), the specific value varies depending on the model.

D Set printing density: D5 range 0-15 (0 is shallowest, 15 is deepest).

P printing label: P1 prints one set, P2, Print 2 sets, with 3 copies per set.


Detailed explanation and practical skills of core commands

3.1 Text Printing - A Command

Command syntax: A p1, p2, p3, p4, p5, p6, p7, "DATA"

P1, p2: Starting coordinates (points)

P3: Rotation (0/1/2/3=0 °/90 °/180 °/270 °)

P4: Font selection (1-5 are built-in equal width Latin fonts; 8-9 are Asian double byte fonts; A-Z are soft fonts)

P5, p6: Horizontal/vertical magnification (1-6, 8, and 1-9)

P7: Normal (N) or reversed (R)

Tip: It is recommended to use the LE (Line Draw Exclusive OR) command to draw white text on a black background instead of the R parameter of the A command for more precise border control.

3.2 One Dimensional Barcode - B Command

The B command supports Code 39, Code 128, EAN/UPC, Interlocked 2 of 5, Codabar, Postnet, Planet, and more. The parameters include narrow bar width, wide bar width, barcode height, and whether to print readable characters.

Common problem: Barcode scanner cannot read barcodes in the "ladder" direction (rotated 90 °/270 °). Suggest using the "fence" direction (0 °/180 °) as much as possible. If rotating barcodes must be used, automatic optimization can be disabled through the oB command (but this may cause some scanners to fail to read, and Zebra does not guarantee compatibility).

Code 128 functional characters: Supports FNC1 – FNC4, automatically processes extended ASCII. For 5 or more consecutive extended characters, the printer automatically locks into extended mode; If there are less than 5, use the shift method.

3.3 Graphic Storage and Printing - GM/GG

GM "NAME" size: Download PCX format graphics to memory, size is in bytes. Binary data follows closely behind.

GG x, y, "NAME": Print stored graphics.

GW x, y, width, height, data: Directly write the original bitmap data into the image buffer (without storage).

Operation suggestion: Use DOS COPY/b command or Zebra Firmware Downloader to send graphic files. Do not add extra line breaks after graphic data.

3.4 Tables and Lines

LO x, y, width, height: Draw a black solid rectangle (covering existing content).

LW x, y, width, height: Draw a white rectangle (erase).

LE x, y, width, height: XOR line drawing can be used to invert existing graphics.

Form storage and automation of variables/counters

4.1 Form Concept

EPL2 allows storing complete label designs as "Forms". The form can contain fixed elements, variable fields, and counters, and can be printed by filling in variables each time it is called. This greatly reduces the overhead of duplicate data transmission.

Storage process:

FS "FORMNAME" - Start storing the form.

Define variables (V00,10, N, "Prompt"), counters (C0,5, L,+1, "-"), then add commands such as A/B and reference these variables.

FE - End storage.

Call process:

FR "FORMNAME" - Recall the form from memory.

Command followed by variable values (in defined order).

  • Basler Electric SR4A1B10B3E Static Voltage Regulator
  • Basler Electric CBS 212 Current Boost System
  • Basler Electric SR32A2B05B3E Static Voltage Regulator
  • Basler Electric MOC2207 Motor Operated Potentiometer
  • Basler Electric SR4A1B05A3E Static Voltage Regulator
  • Basler Electric BE1-32R Power Relay B2EE1PA0N1F
  • Basler BEI-81 Underfrequency Relay
  • Basler CBS 212A Current Boost System
  • Basler SSR 63-12 Static Voltage Regulator
  • Basler DGC-2020 Digital Genset Controller
  • Basler BE1-32 Reverse Power Relay
  • Basler BE1-50/51B-207 Overcurrent Relay
  • Basler BE1-951 Overcurrent Protection System
  • Basler 9073800-103 Power Supply
  • Basler SCA1300-32FC CCD Camera
  • Basler 9073800-103 Power Supply
  • Basler SCA1300-32FC CCD Camera
  • Basler L304KC Protective Relay
  • Basler BE3-25-1S1N4 Time Overcurrent Relay
  • Basler 9032300113 Excitation Support System
  • Basler BE1-59N Ground Overvoltage Relay
  • Basler MVC-300 Manual Voltage Control Unit
  • Basler MOC2102 Potentiometer
  • Basler BE1-87G Generator Differential Relay
  • Basler Electric DECS-200 Digital Excitation Control System
  • Basler Electric DECS 125-15-B2C5 Digital Excitation System
  • Basler Electric PLA2400-12GM Power Supply
  • Basler Electric BE1-50/51B-235 Overcurrent Relay
  • Basler Electric BE1-27/59 Undervoltage Overvoltage Relay
  • Basler Electric CEM-2020 Contact Expansion Module
  • Basler Electric BE1-32R Solid State Power Relay
  • Basler Electric BE1-700 Digital Generator Management Relay
  • Basler Electric BE1-59N Ground Fault Overvoltage Relay
  • Basler Electric BE10493002 Protection Module
  • Basler Electric BEI-79A1AA5CA3M1F Digital Annunciator
  • Basler Electric SSR 32-12 Static Voltage Regulator
  • Basler Electric BE1-CDS240 Current Differential System
  • Basler Electric BE1-67 Directional Overcurrent Relay
  • Basler Electric 9121000106 DECS-100 Voltage Controller
  • Basler Electric BEI-871 Interface Module
  • Basler Electric 8650C72 Exciter Control Module
  • Basler Electric RDP-110-S1 Generator Annunciator
  • Basler Electric BE1-32O/U Directional Power Relay
  • Basler Electric BE2000E AVR Voltage Regulator
  • BASLER ELECTRIC BE1-50F2EA1PA0N0F Instantaneous Overcurrent Relay
  • BASLER ELECTRIC BE1-81T1EE1WA0N1F Underfrequency Relay
  • Basler BE1-67 Directional Overcurrent Relay
  • Basler BE1-25/79TR Reclosing Relay
  • Basler CEM-2020 Contact Expansion Module
  • Basler BE1-11 Overcurrent Protection Relay
  • Basler BE1-GPS Generator Protective Relay
  • BASLER ELECTRIC MVC-300 MANUAL VOLTAGE CONTROL UNIT 9121000106
  • Basler Electric KR2FF Voltage Regulator 9 1163 00 109
  • BASLER ELECTRIC BE1-87G-G1E-A1K-A0N0F Generator Differential Relay
  • Basler BE1-47NE3EA1PA0N2F Phase Sequence Relay
  • Basler BE1-81-T1E-E1C-B0N1F Frequency Relay
  • Basler DECS125-15 Excitation Control
  • Basler BE1-25 Sync-Check Relay
  • Basler BE1-50/51B Overcurrent Relay
  • Basler BE1-40Q Loss of Excitation Relay
  • Basler BE1-50/51M-104 Overcurrent Relay
  • Basler SSE-N 250-9 KW Shunt Exciter Assembly
  • Basler BE1-87T Transformer Differential Relay
  • Basler BE1-60 Solid State Protective Relay
  • Basler DECS125-15 Excitation Control System
  • Basler SR4A-2B15B3A Static Voltage Regulator
  • Basler BE150BF Overcurrent Relay
  • BASLER ELECTRIC BE1A1HF1JD1S2F Overcurrent Relay
  • Basler BE1-81O Under/Over Frequency Relay
  • Basler EDM-200 Exciter Diode Monitor
  • Basler DECS125-15-B2C5 Excitation Control
  • Basler 9261402100 PCB Board
  • Basler 9252000107 Overcurrent Relay
  • Basler BE1-87T Solid State Protective Relay
  • Basler Electric Phase Directional Overcurrent Relay BE1-Z2JA0N2F
  • Basler SSR125-12 Static Voltage Regulator
  • Basler Electric KR7F VOLTAGE REGULATOR 9116200100
  • BASLER ELECTRIC BE1-59N-A8E-E1L-N0S1F Ground Overvoltage Relay
  • Basler SR8A2B06B3A Static Voltage Regulator
  • BASLER ELECTRIC BE1-81O/UT3EE1KA7N1F Under/Over Frequency Relay
  • Basler MOC2107 Output Module
  • Basler 9125600102 Control Module
  • BASLER ELECTRIC BE1-81T1EE1EA2N0F
  • Basler BE3-25A Time Overcurrent Relay
  • Basler Electric CBS 212 Current Boost System 9 2650 00 100 120/240 VAC 50/60Hz
  • Basler Electric BE1-27 Under Voltage Relay A3EC1JA0N5F
  • Basler BE1-32R Power Relay B2EE1PA0N1F
  • Basler DECS100-B15 Automatic Voltage Regulator
  • Basler SR8A-2B15B3A Static Voltage Regulator
  • Basler AVC63-4 Analog Voltage Regulator
  • Basler UFOV 260 A Overvoltage Module
  • Basler SR4A-2B16B3A Static Voltage Regulator
  • Basler SR4A-2B16B3E Static Voltage Regulator
  • Basler SCA1300-32GM CCD Camera
  • Basler BE34062001 G18 Transformer
  • Basler BE1-87T Transformer Differential Relay
  • Basler 9 2849 00 101 DECS Power Module
  • Basler RAL6144-16GM Line Scan Camera
  • Basler 9269101107 Voltage Regulator Board
  • Basler BE1-851 Overcurrent Relay
  • Basler SR32A-2B13B3E Static Voltage Regulator
  • Basler 9 2007 00 100 Current Boost System CBS 305
  • Basler DECS-100-B11 Automatic Voltage Regulator
  • Basler BE127 Under Voltage Relay
  • Basler 3300C03B1028-G01 Spike Suppressor
  • Basler SSR 125-12 Static Voltage Regulator
  • Basler SCA1300-32GM CCD Camera Lens Enclosure
  • Basler BE32965001 Transformer Timer Kit
  • Basler D90 96801 100 PCB Card
  • Basler BE1-81-T1E-E1C-A0N1F / 9106400 Underfrequency Relay
  • Pro-Face Basler AGP3600-T1-D24 HMI Touch
  • Basler SR4A2B10B1A Static Voltage Regulator
  • Basler SR8A2B05B3A Static Voltage Regulator
  • Basler BE1-25 Time Overcurrent Relay M1FA6PA4S0F
  • Basler SR4A2B05B3E Static Voltage Regulator
  • Basler DECS-200-2L Digital Excitation Control
  • Basler BE303280001 Control Transformer
  • Basler 9262103004 Voltage Regulator Board For Basler DECS-400
  • Basler ICRM-7 Inrush Current Reduction Module
  • Basler BE1-32R Power Relay
  • BASLER ELECTRIC KR4F VOLTAGE REGULATOR 9042600100 600V 50/60Hz
  • Basler 9222600101 Power Module
  • Basler SR8A-2B15B3A Static Voltage Regulator
  • BASLER BE1-87G G1E A1L A0N1P Generator Differential Relay w/ Reactor 9170818100
  • Basler 9284900101 DECS Power Module
  • Basler PRS250 Veri-Sync Relay
  • Basler BE 12296 001 Transformer
  • Basler 905970-104 Rev.M Voltage Regulator