K-WANG

+086-15305925923
Service expert in industrial control field!
NameDescriptionContent
Adequate Inventory, Timely Service
pursuit of excellence 
Ship control system
Equipment control system
Power monitoring system
Current position:
新闻动态
newS
   
Brand

Zebra EPL2 Programming Language Programming Guide

From: | Author:Wang | Time :2026-05-15 | 11 visit: | 🔊 Click to read aloud ❚❚ | Share:


Zebra EPL2 Programming Language Programming Guide

Zebra EPL2(ELTRON ®  The official programming manual of Programming Language is aimed at label printer developers, fully defining the EPL2 command syntax, parameters, formats, and usage rules. It supports text, one-dimensional barcodes, two-dimensional barcodes (QR/DataMatrix/PDF417/Aztec/MaxiCode), graphics, lines, form storage, variables/counters, RTC clocks, and other printing elements. It provides SGD (Set/Get/Do) configuration instructions and wired/wireless network parameters, covering serial/parallel/Ethernet/wireless settings, error codes, memory management, character sets (including China, Japan, and South Korea), and is suitable for desktop printers such as G-Series, 2844, 3842. The core is used for label template design, batch printing, variable printing, and automation control.


EPL2 core command system

1. Image and page control

Key parameters of command function

N Clear image cache None

Set label width (dots) from 0 to 65535

Q Set label length+spacing length, spacing, offset

Set the left and right margins, as well as the top and bottom margins, of the reference origin point (X, Y) for R

Z sets the printing direction T=forward/B=reverse

Number of printed copies and sets executed by P

XA automatic detection label size none

2. Text Printing (Command A)

Function: Print text, supporting built-in fonts 1-5 and Asian fonts 8-9 (Chinese, Japanese, and Korean)

Grammar: A x, y, rotation, font, aspect ratio, aspect ratio, reversed color, "content"

Support: Variables, counters, RTC time/date (TT/TD), expression calculation

3. Barcode printing

One dimensional barcode (B command)

Support: Code 39/128, EAN-8/13, UPC-A/E, Codabar, ITF, Postnet, etc

2D barcode (b command)

QR Code、Data Matrix、PDF417、Aztec、MaxiCode、Aztec Mesa

PDF417 supports Macro PDF large data splitting

4. Graphics and Lines

Command function

LO/LE/LW black/XOR/white lines

LS diagonal line

X box

GM/GG/GK stores/calls/deletes PCX graphics

GW directly writes binary graphics

5. Forms, Variables, and Counters

Form storage: FS (Save) → FE (End) → FR (Call) → FK (Delete)

Variable (V): Supports 00~99, maximum 99 characters, left/right/center alignment

Counter (C): 0~9, steps ± 1~9, used for serial number printing

AUTOFR: Automatically run forms upon startup, enabling offline printing

6. Printer system configuration

Command function

Printing speed (1-6 ips)

D printing density (0~15)

Y serial port settings (baud rate/checksum/data bits/stop bits)

Hardware options (cutter, peeling, sensor)

Fine adjustment of cutting blade position

C Cut the paper immediately

^@Printer reset

^Default factory reset

SGD (Set/Get/Do) configuration instruction

Format:! U1 setvar/getvar/do "Parameters" "Values"

Core purpose:

Setvar: Set network, serial port, and print mode

Getvar: query firmware IP、 Mileage and status

Do: Perform actions (clean the cutting blade, calibrate the sensor)

Support:

Network: IP, DHCP, FTP, HTTP, SNMP, TELNET

Wireless: SSID, Security, Roaming, Signal

Milemeter: total print length, print head lifespan, media count


Character set and multilingual support

Latin characters: Code Page 437/850/852/1252

Asian Double Byte:

Simplified Chinese GBK 936

Japanese Shift JIS 932

Korean 949

Command: I select the code page; Set the spacing between Asian characters; Replace Euro symbol with oR


Error and Status Report

^Ee: Immediately return error code

Common errors:

00: No errors

01: Grammar error

03: Barcode data length error

07: Paper/ribbon shortage

11: Print head turned on

US/UT: Enable serial port error feedback (ACK/NACK)


Memory management

M: Allocate memory for forms/graphics/soft fonts

FI/UE/UG: Query Form/Font/Graphic Information

FK/GK/EK: Delete Forms/Graphics/Soft Fonts


Key questions and answers

Question 1: What is the most core tag template structure in EPL2? What are the minimum commands required?

Answer: The simplest template fixed structure is: N → q (width) → Q (length) → content (A/B/X, etc.) → P (printing). The cache must be cleared with N, the paper defined with q/Q, and finally output with P. Example: Nq400Q200,24A50,50,0,1,1,1, N, "Hello Zebra" P1

Question 2: How does EPL2 achieve continuous printing of serial numbers? What is the difference between a counter and a variable?

answer:

Counter (C command): dedicated to increasing/decreasing numbers from 0 to 9, supports stepping, suitable for serial numbers.

Variable (V command): can store any string, numbered from 00 to 99, used for custom content such as product name and batch.

Usage: Define V/C in the form first, use when printing? Incoming data, with reference method V01/C1.

Question 3: What is the relationship between EPL2 and SGD instructions? What scenarios are they used for?

answer:

EPL2: Used for label content design (text, barcode, graphics, forms).

SGD: Used for printer system configuration (IP, speed, density, network, status query).

Both can coexist but must be sent separately and cannot be written on the same line; SGD is here! Starting with U1, EPL2 directly starts with the command.

  • ABB PFSA240 Roll DC Supply Unit 3BSE073476R1 Industrial Stressometer Power Supply Module for Rolling Mill Systems
  • ABB PFSA107-Z42 DTU Stressometer Digital Transmission Unit High Precision Strip Tension Measurement Module
  • GE AT868-2-1-1 Ultrasonic Flow Transmitter AquaTrans AT868 Dual Channel Industrial Flow Meter
  • ABB SCC-C 23070-0-10232110 Industrial Control Module Automation System Communication Controller
  • APPLIED MATERIALS 0041-96185 - Heater Assy with 0150-45776 0190-60492 AMAT
  • APPLIED MATERIALS 0021-33426 - SHIELD INNER SINGLE 300MM NO COIL AMAT
  • APPLIED MATERIALS 0140-01905 - HARNESS ASSY DUAL IHC PRESS CONT ADAPTER 16798 AMAT
  • APPLIED MATERIALS 0051-01848 - LINE VAC EXHAUST CH Y LEAK CHECK PORT EPI AMAT
  • APPLIED MATERIALS 0010-02863 - P5000 150mm Teos Susceptor AMAT
  • APPLIED MATERIALS 0010-14056 - ASSY INJECT NOZZLE STANDARD AMAT
  • APPLIED MATERIALS 0020-34694 - LINER GDP R2 OXIDEGECO AMAT
  • APPLIED MATERIALS 0195-07416 - SYCAMORE-X CMP POLISHER I/O ASSEMBLY AMAT
  • APPLIED MATERIALS 0200-09036 - WAFER LIFT PIN AMAT
  • APPLIED MATERIALS 0021-39090 - FLANGE 10" CONFLAT ADAPTOR AMAT
  • APPLIED MATERIALS 0100-99011 - GAS INTERLOCK AMAT
  • APPLIED MATERIALS 0100-11002 - digital I/O card AMAT
  • APPLIED MATERIALS 0190-40000 - PNEUMATIC MANIFOLD CHAMBER 32903 AMAT
  • APPLIED MATERIALS 0021-39792 - PERF PLATE OX. 200 MM TEOS 21896 AMAT
  • APPLIED MATERIALS 0040-04896 - BELL JAR QUARTZ Q-KOTE 200MM AMAT
  • APPLIED MATERIALS 0020-20653 - BASE HEATER AMAT
  • APPLIED MATERIALS 0190-75057 - Lift Cylinder Assy AMAT
  • APPLIED MATERIALS 0010-70345 - Applied Materials 0042-01927
  • APPLIED MATERIALS 0100-91024 - PWBA PRE-ACCEL VENDOR I/F PCB 9500 IMPLANT AMAT
  • APPLIED MATERIALS 0041-56144 - HEATER PEDESTAL ASSEMBLY ENP FCVD EDGE AMAT
  • APPLIED MATERIALS 0090-00836 - SOURCE MOTOR ASSY 0040-24074 GFB5G10 FBLM5120W AMAT
  • MKS 0190-63631 - MASS FLOW VERIFIER MFVA-33168 AMAT
  • APPLIED MATERIALS 0100-35070 - ASSY PCB RF GENERATOR INTERFACE AMAT
  • APPLIED MATERIALS 0010-32221 - ASSEMBLY ROUGH THROTTLE VALVE DRIVE 300MM AMAT
  • SANYO DENKI 0190-14713 - P30B06040HXS8RM AC SERVO MOTOR BL SUPER AMAT
  • APPLIED MATERIALS 0190-14224 - FLEX DIST PANEL AMAT
  • APPLIED MATERIALS 0190-23897 - SPECIFICATION EXMP SYNCNET STAND ALON 14535 AMAT
  • APPLIED MATERIALS 0010-04542 - HEATER ASSY 200MM FC WXZPLUS OSCR 15607 AMAT
  • APPLIED MATERIALS 0190-51414 - AC SERVO DRIVER SGDV-OCA05AY890AA AMAT
  • APPLIED MATERIALS 0020-31747 - P5000 LOADLOCK LID WAFER TXR CHMBR 0020-32930 12573 AMAT
  • APPLIED MATERIALS 0620-01727 - CABLE ASSY SIGNAL RBN 50PIN DSUB EMI RES 17781 AMAT
  • APPLIED MATERIALS 0190-A9510 - IP POWER SUPPLY 33361 AMAT
  • APPLIED MATERIALS T1101-05-000-30 - CRYO TIGER COMPRESSOR AMAT
  • APPLIED MATERIALS 0040-13338 - LINK 1 UPPER 7.2 DEGREE OFFSET CR 300MM 38177 AMAT
  • APPLIED MATERIALS 0190-06926 - Cable SQS R/A TO SQS R/A #2 AMAT
  • APPLIED MATERIALS 0200-00705 - EDGE RING THIN 200MM AMAT
  • APPLIED MATERIALS 0190-01399 - INLINE O3 SNSR ULTRA FULL FLOW HI-CON 6627 AMAT
  • APPLIED MATERIALS 0190-21054 - RF MATCH CABLE ASSEMBLY PRECLEAN 2 AMAT
  • APPLIED MATERIALS 0041-12156 - REFLECTOR PLATE INJECT 300MM RADIANCE PLUS 29763 AMAT
  • MKS 0100-03680 - PCB CHMBR DIST 0090-09483 AS00363-16 35465 AMAT
  • APPLIED MATERIALS E11355460 - Plasma Detector E11355470 Rev.B AMAT
  • APPLIED MATERIALS 0021-33981 - LOWER SHIELD AMAT
  • APPLIED MATERIALS 0100-00583 - GAS PANEL CONTROLLER DIST AMAT
  • APPLIED MATERIALS 0010-54820 - IPC VALVE ASSEMBLY FM 1/2" INTER-PLATEN SPRAY AMAT
  • APPLIED MATERIALS 0020-31747 - P5000 LOADLOCK LID WAFER TXR CHMBR 0020-32930 12573 AMAT
  • APPLIED MATERIALS 0020-40566 - BLANK-OFF POSITION E-F ENP AMAT
  • APPLIED MATERIALS 0021-31023 - Flange Spacer Automatch Single RPS Producer SE AMAT
  • APPLIED MATERIALS 0020-21225 - WEIGHT RING 300MM TITAN PROFILER AMAT
  • APPLIED MATERIALS 0190-A9510 - IP POWER SUPPLY 33361 AMAT
  • APPLIED MATERIALS 0100-90618 - PCB H1 GROUND PDU MOTHER BOARD 0100-90036 AMAT
  • APPLIED MATERIALS 0010-04542 - HEATER ASSY 200MM FC WXZPLUS OSCR 15607 AMAT
  • APPLIED MATERIALS 0020-31658 - CLAMP VESPEL OX-MLR-NIT 200MM AMAT
  • APPLIED MATERIALS 0021-09974 - WINDOW SAPPHIRE PUMPING PLATE AMAT
  • APPLIED MATERIALS 0051-01849 - LINE VAC EXHAUST ELBOW CH Y FAC TRAY EPI 30 AMAT
  • APPLIED MATERIALS 0010-29842 - 300mm DBR High Temp Belt Wrist Titanium AMAT
  • APPLIED MATERIALS 1410-01166 - Heating Jacket AMAT
  • APPLIED MATERIALS 0620-01727 - CABLE ASSY SIGNAL RBN 50PIN DSUB EMI RES 17781 AMAT
  • APPLIED MATERIALS 0010-70345 - Applied Materials 0042-01927
  • APPLIED MATERIALS 0090-00836 - SOURCE MOTOR ASSY 0040-24074 GFB5G10 FBLM5120W AMAT
  • APPLIED MATERIALS 0190-46837 - INFRARED THERMOMETER COMM BOX RAYMI3COMM 30009 AMAT
  • APPLIED MATERIALS 0020-31886 - FLANGE INSULATION UNIBODY .400 THK AMAT
  • APPLIED MATERIALS 0010-05920 - CONTROLLER CCM PROD ETCH CS-PM CARD CAGE AMAT
  • APPLIED MATERIALS 0242-30292 - KIT 20 SCCM MFC W/HRDWR UNIBODY 6449 AMAT
  • APPLIED MATERIALS 0040-41061 - JIG FOUR PT LEVELING TOOL TXZ 300MM AMAT
  • APPLIED MATERIALS 0020-30287 - ADAPTER RING PUMPING PLATE 200MM COMMO AMAT
  • APPLIED MATERIALS 0041-12156 - REFLECTOR PLATE INJECT 300MM RADIANCE PLUS 29763 AMAT
  • APPLIED MATERIALS 0010-37866W - ASSY INT ISRM MODULE FULL SCAN SMG AMAT
  • APPLIED MATERIALS 0090-08137 - 300MM TXZ DLI HEATER CONTROLLER MODULE AMAT
  • APPLIED MATERIALS 0040-20006 - ARM WELDMENT SOURCE STD 8464 AMAT
  • APPLIED MATERIALS 0090-07392 - Dual RF filter AMAT
  • APPLIED MATERIALS 0190-06926 - Cable SQS R/A TO SQS R/A #2 AMAT
  • APPLIED MATERIALS 0020-70279 - LIFTER 150MM WAFER ORIENTER P5000 AMAT
  • APPLIED MATERIALS 0190-35652 - SERIPLEX MUX I/O PCB AMAT
  • APPLIED MATERIALS 0100-11002 - digital I/O card AMAT
  • APPLIED MATERIALS E11355460 - Plasma Detector E11355470 Rev.B AMAT
  • APPLIED MATERIALS 0010-19188 - ASSY COOLDOWN LIFT 34703 AMAT
  • APPLIED MATERIALS 0100-00975 - PCB STEPPER CONTROLLER 2 8099 AMAT
  • APPLIED MATERIALS 0190-16236 - MOTOR ENCODER ASSY ROBOT WRIST MIRRA CMP AMAT
  • APPLIED MATERIALS 0040-48671 - LEFT GUIDE 300MM L-DOOR 37961 AMAT
  • MKS 0100-03680 - PCB CHMBR DIST 0090-09483 AS00363-16 35465 AMAT
  • APPLIED MATERIALS 0190-01399 - INLINE O3 SNSR ULTRA FULL FLOW HI-CON 6627 AMAT
  • APPLIED MATERIALS 8330 - Pair Of Side viewport Panels AMAT
  • APPLIED MATERIALS 0190-75057 - Lift Cylinder Assy AMAT
  • APPLIED MATERIALS 0100-02016 - PCB ASSY ANALOG SYNC DETECT 904-125N AMAT
  • Abaco Systems 0090-08517 - VMICPCI-7326 PCB 38085 AMAT
  • APPLIED MATERIALS 0100-20069 - ASSY WAFER ORIENTER BOARD 0100-02797 AMAT
  • ELEKTRO-AUTOMATIK EA-PS 9036-070 - S01 POWER SUPPLY 625-795365 AMAT
  • APPLIED MATERIALS 3310-00139 - CAPACITANCE PIRANI GAUGE C-SEAL MOUNT 15-PIN AMAT
  • APPLIED MATERIALS 0010-00510 - ASSY BEARING STD 36806 AMAT
  • APPLIED MATERIALS 0041-13895 - FACEPLATE 26MIL CENTERHOLE RF CAP 300MM SACVD 13964 AMAT
  • APPLIED MATERIALS T1101-05-000-30 - CRYO TIGER COMPRESSOR AMAT
  • APPLIED MATERIALS 0050-10076 - WELDMENT DUAL HE MANF SACVD 20243 AMAT
  • MKS 0190-48179 - AS01294-05237-030 Hardened DeviceNet I/O Block AMAT
  • APPLIED MATERIALS 0240-75102 - 8" Transfer Blade 200mm End Effector AMAT
  • APPLIED MATERIALS 0110-90770 - Index Control PCB AMAT
  • APPLIED MATERIALS 0090-91209 - SOURCE SUPPRESSION CLAMPING BOX AMAT
  • APPLIED MATERIALS 0200-01427 - ISOLATOR CERAMIC CVD LOW K 300MM PROD AMAT
  • APPLIED MATERIALS 0021-03637 - FACEPLATE SILANE PRODUCER 200MM AMAT
  • APPLIED MATERIALS 0010-09837 - Wafer Lift Tungsten Precision 5000 AMAT
  • APPLIED MATERIALS 0101-57014 - PCB DEFLECTION-AMPLIFIER BOARD D-AMP 50-06 26296 AMAT
  • APPLIED MATERIALS 0190-36715 - PCB GP IO DISTRIBUTION AMAT
  • APPLIED MATERIALS 0660-00078 - PCB ASSY DNET ANALOG I/O CDN396 DIP-506-068 13392 AMAT
  • APPLIED MATERIALS 0190-B4670 - FIBER HARNESS DVD2-SBBI AMAT
  • APPLIED MATERIALS 1080-02356 - ACCELNET SINGLE AXIS SERVO DRIVE 800-2122 AMAT
  • APPLIED MATERIALS 0040-02937 - WATER MANIFOLD TXZ CIP 200 & 300MM AMAT
  • APPLIED MATERIALS 0040-08944 - LID ANNEAL ECP 200MM AMAT
  • SMC INOI-7134-111 - 4-PORT DEVICENET UPA MODULE Pressure Control AMAT
  • SMC INOI-7134-21 - 4-PORT DEVICENET UPA MODULE Pressure Control AMAT
  • APPLIED MATERIALS 0100-40024 - ASSY WPCBA LOADLOCK INTERCONNECT BOARD AMAT
  • APPLIED MATERIALS 0660-01635 - Chamber P2 Board A AMAT
  • APPLIED MATERIALS 0041-31945 - DOOR ENP ALUM SPD SLIT VALVE VITON LLK 3 AMAT
  • APPLIED MATERIALS 0040-48671 - LEFT GUIDE 300MM L-DOOR 37961 AMAT
  • APPLIED MATERIALS 0051-01849 - LINE VAC EXHAUST ELBOW CH Y FAC TRAY EPI 30 AMAT
  • APPLIED MATERIALS 0040-81661 - CATHODE FACILITY PLATE 35320 AMAT
  • APPLIED MATERIALS 0040-20006 - ARM WELDMENT SOURCE STD 8464 AMAT
  • APPLIED MATERIALS 0110-90770 - Index Control PCB AMAT
  • APPLIED MATERIALS 8330 - Pair Of Side viewport Panels AMAT
  • APPLIED MATERIALS 0040-81155 - LINER LOWER AMAT
  • APPLIED MATERIALS 0100-90618 - PCB H1 GROUND PDU MOTHER BOARD 0100-90036 AMAT
  • APPLIED MATERIALS 0040-47677 - FACEPLATE SIN XG DXZ DCVD AMAT
  • APPLIED MATERIALS 0020-31658 - CLAMP VESPEL OX-MLR-NIT 200MM AMAT
  • CTI-CRYOGENICS 0190-54040 - ON-BOARD IS CONTROLLER 34633 AMAT
  • APPLIED MATERIALS 0020-21665 - SHIELD AL/TI 8 INCH WAFER AMAT
  • APPLIED MATERIALS 0090-10397 - RF FILTER BOX AMAT