Welcome to the Industrial Automation website!

NameDescriptionContent
HONG  KANG
E-mail  
Password  
  
Forgot password?
  Register
当前位置:

Zebra EPL2 Complete Guide

来源: | 作者:FANS | 发布时间 :2026-05-15 | 39 次浏览: | 🔊 Click to read aloud ❚❚ | 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).

  • ABB 3BUS208720-001 Industrial Power Signal Interconnection Module
  • TMEIC KPAD-3122A LCD Display Keypad
  • Siemens 6SN1145-1BA02-0CA1 PLC
  • LAM 2004365 TURBO BYPASS PLC ASM
  • Omron CJ1W-CORT21 PLC Module
  • Euchner MGB-L2B-PNA-L-121853 Safety Switch
  • XPSMC32ZP Safety Controller
  • Schneider 9070T3000D33 PLC
  • Omron C200H-MAD01 AD DA Module
  • Omron NJ501-1320 CPU Controller
  • Honeywell C36TR1UA1000 Thermostat
  • Honeywell TC-RPDXX1 Power Supply Module
  • Fuji NW0E32-3 PLC Programmable Controller
  • ASM 2004219 Turbo Bypass ASM 107864 Module
  • Future IHDW-BLA4S-IM CNC MPG Handwheel
  • Wieland R1.180.0080.0 SA-OR-S1-4RK-A Safety Module
  • Reliance Electric 57C493 AutoMax Power Supply 376W
  • Siemens 3VT8563-2AA03-2KA2 MCCB 3VT8
  • B&R X20IF1072 CAN Bus Interface Module
  • Mitsubishi OSE253S2 Rotary Encoder
  • Mitsubishi NV630-SW 4P 500A Earth Leakage Breaker
  • Euchner MGB-L1B-PNA-R-121857 Safety Switch
  • Honeywell 900A01-0102 Analog Input Module
  • OMRON C500-ID219 Input Unit
  • Westinghouse EL3030R Current Limiter
  • CLA-2 3L Electric Lubrication Pump
  • Proface GP2501-TC41-24V HMI
  • Omron KM-N1-FLK Small Power Monitor
  • HPM 1D703-0040 Command 9000 Console Card
  • Siemens 3RW5074-6AB14 SIRIUS Soft Starter
  • Genie 75032 Limit Switch
  • OMRON C200H-SP001 Space Module
  • OMRON C200H-PS211 Power Supply Unit
  • OMRON C200H-OC222 Relay Output Unit
  • Keyence KV-8000SO 4221 CPU Module
  • Cincinnati Milacron 3-542-1079A Circuit Board
  • Beckhoff EL3124 Analog Input EtherCAT Terminal
  • KRONES BWU1703 0900853537 ASi PROFIBUS Gateway
  • Radio Energie RE0444 R1S 0.06 CA Tachogenerator
  • Mitsubishi GT1685M-STBA GOT1000 HMI
  • Siemens 6GK7342-5DA03-0XE0 CP 342-5 PROFIBUS
  • Allen Bradley 8520-PX-ASM3-EXEC2-63M Servo Module
  • Delta AH10PM-5A Programmable Controller
  • Siemens 3TK2805-0BB4 Safety Contactor Combination
  • EUCHNER HBA-079827 Pendant Station
  • CLC-2 4L PLC Lubrication Pump
  • KEYENCE GS-51P5 Safety Switch
  • AB 442G-MABH-R Safety Switch
  • GE Fanuc VersaMax PLC Module Set
  • Siemens 6ES7214-1HF40-0XB0 CPU 1214FC
  • Microchip DSPIC30F4011-30I/P DSC
  • FANUC A20B-2102-0081 I/O Link Module
  • Endress Hauser CLS15-B1M2A Conductivity Sensor
  • B&R 3AM050.6 Analog I/O Module
  • Fanuc A16B-2201-0320 MAIN-B CPU Board
  • Pilz 475650 PNOZ 1 Safety Gate Relay
  • Omron NSH5-AL001 Handheld HMI Terminal
  • Allen-Bradley 1756-OF8 Analog Output 8 Ch
  • Siemens 6SL3210-1SE31-0AA0 45kW Power Module
  • PMA TB45-110-00000-000 Temperature Limiter
  • PSR-SCP-24DC-ESD-5x1-1x2-300 Safety Relay
  • Pilz 774140 PZE 9 24V AC Safety Relay
  • Telemecanique TSXRKN82F 8 Slot Rack
  • Mitsubishi R16CPU iQ-R PLC CPU
  • Mitsubishi A2ACPU-R21-S1 PLC CPU
  • Omron NX-AD4208 Analog Input Unit
  • Schneider LMC802CAA10000 PacDrive 3 Controller
  • Reliance Electric 0-51874 Static Sequence Card
  • Pilz 787310 PNOZ X3P C Safety Relay
  • B&R X20CP1684 CPU Module
  • Siemens 6SN1145-1BB00-0FA1 Power Module
  • Beckhoff EL3174 Analog Input EtherCAT Terminal
  • CLC-2P 4L PLC Lubrication Pump System
  • Omron CJ1W-DA08C Analog Output Unit
  • Metso Automation D201776 ACN PO DC PLC Control Server Computer
  • GE AT868 AquaTrans Ultrasonic Flow Transmitter
  • ABB PFSA107-Z42 DTU Stressometer Digital Transmission Unit
  • ABB PFSA240 3BSE073476R1 Roll DC Supply Unit
  • Fanuc A16B-2201-0320 CPU MAIN Board
  • Pilz 475650 PNOZ 1 Safety Gate Relay
  • Omron NSH5-AL001 HMI Interface Unit
  • Allen-Bradley 1756-OF8 Analog Output Module
  • Siemens 6SL3210-1SE31-0AA0 Power Module 45kW
  • PMA TB45-110-00000-000 Temperature Limiter
  • PSR-SCP-24DC-ESD-5x1-1x2-300 Safety Relay
  • Pilz 774140 PZE 9 Safety Relay
  • Telemecanique TSXRKN82F PLC Rack Chassis
  • Mitsubishi R16CPU PLC CPU Module
  • OMRON C500-PS223-E Power Supply Module
  • Siemens 3VL4731-1DC36-0AA0 Circuit Breaker
  • Siemens 7ML5201-0EA0 Ultrasonic Level Transmitter
  • OMRON NQ3 NQ5 Touch Panel HMI
  • OMRON CJ1W-AD081-V1 Analog Input Module
  • OMRON NJ301-1100 Machine Automation Controller
  • B&R X20BC00G3 EtherCAT Bus Controller
  • Schneider ATV212HD22N4S Variable Speed Drive
  • B&R 8B0C0320HW00.002-1 Power Supply Module
  • Mitsubishi OSA105S2A Incremental Rotary Encoder
  • Pilz 777514 PNOZ XV3P Safety Relay
  • Gould AS-884A-111 Modicon 884 Controller
  • Siemens 6SC6130-0FE00 SIMODRIVE Control Card
  • Omron CV500-PS221 PLC Power Supply Module
  • ABB CM577-ETH AC500 PLC Ethernet Module
  • Omron NX-SIH400 Safety Input Unit NX Series
  • Omron NJ501-1300 Machine Automation Controller
  • Siemens 3VT8563-2AA03-2KA2 Molded Case Breaker
  • Pilz PNOZ m1p ETH 773103 Safety Controller
  • Omron CJ1H-CPU66H-R CJ1 Series CPU Module
  • ASI ASI533-S00 PLC Module S1
  • Mitsubishi AJ71C21-S1 Serial Module
  • Keyence IX-1000 Laser Sensor Amplifier
  • Siemens 6SN1145-1AA01-0AA1 Power Module
  • Siemens 3VA2340-5HL32-0AA0 MCCB 400A
  • Mitsubishi OSA104S Absolute Encoder
  • Siemens 6ES7350-1AH03-0AE0 FM 350-1 Counter
  • Siemens 6SE7038-6EK84-1JC2 IGD8 Gate Driver
  • Eaton EASY819-AC-RC Programmable Relay
  • Omron CPM1A-40CDT-D PLC 24V DC
  • Omron NA5-12W101B-V1 12-inch Programmable Terminal
  • Siemens 6ES7331-7KF02-0AB0 Analog Input SM 331
  • Moxa PTC-101-S-SC-HV Photoelectric Converter
  • Fanuc A20B-3300-0031 CNC Control Circuit Board
  • OMRON NA5-7W001B-V1 Programmable Terminal HMI
  • Parker AH385851U002 590C DC Drive Power Board
  • ABB 3BSE040662R1 AI830A Analog Input Module
  • DOLD BF9250.01/001 Solid State Relay
  • Siemens 6ES7331-7KF02-0AB0 SIMATIC S7-300 SM 331
  • ABB 07AC91 I6 GJR5252300R3101 Advant Controller 31