P1 printing.
4.2 Variables (V command)
Vnn, max, justification, "prompt" defines a variable field, where nn ranges from 00 to 99 and max is the maximum number of characters. Reference through Vnn in text or barcode data.
Expression support: A100200, 0, 4, 1,1, N, "Oil change at" V00+3000 "miles." can perform addition operations (only supports constant and variable addition). If the result exceeds the field length, fill in "X".
4.3 Counter (C command)
Cn, digits, justification, step, "prompt" define automatic up/down counters (only numbers are supported). The step size is+1 to+9 or -1 to -9. Use as an additional variable when the step size is+0.
Protecting consecutive numbers: Adding a minus sign - in front of the prompt can make the prompt only appear once when the form is recalled, and then automatically use the last value and increment it to prevent duplicate printing of the same serial number.
Advanced configuration of 2D barcode
EPL2 supports two-dimensional barcodes such as Aztec, Data Matrix, MaxiCode, PDF417, QR Code (Japanese models), etc., all of which use the b command, but the third parameter is different (A is Aztec, D is Data Matrix, M is MaxiCode, P is PDF417, Q is QR Code).
5.1 PDF417 Automatic Optimization
b x,y,P,max_width,max_height,sN,cM,xW,yH,rR,lC,tT,oR,"DATA"
Set the error correction level (s0-s8, default automatic).
Choose compression mode (c0 automatic, c1 binary).
X module width (dots, 2-9), y module height (4-99, default 4 x width).
Maximum number of rows for r and maximum number of columns for l.
The printer will automatically adjust the module size and number of rows/columns to fit the maximum size limit.
Common error: When the amount of data is too large to fit, error 93 (PDF-417 coded data too large) will be reported. The maximum width/height should be increased or the error correction level should be raised.
5.2 MaxiCode Mode Selection
MaxiCode supports modes 2, 3, 4, and 6. If not specified, the printer automatically selects mode 2 for all digits and mode 3 for alphanumeric characters based on the postal code. The data format for Mode 2/3 is: [)><RS>01<GS>zip<GS>country<GS>class<GS>tracking<GS>..., where<RS>=0x1E,<GS>=0x1D. The printer can automatically parse the AIM standard format.
5.3 Geometric Shape of Data Matrix
B x, y, D, cC, rR, hH, "DATA" where C specifies the number of columns and R specifies the number of rows. If not specified, the printer automatically selects the smallest square. If only columns (such as 18, 26, 32, 36, 48) or rows (8, 12, 16) are specified, rectangular symbols may be generated. When the data length is incompatible with the geometric shape, error 03 (Data Length Error) is reported.
Asian fonts and multilingual support
Asian models (Chinese, Japanese, Korean) support dual byte font 8 (24 × 24 dots @ 203 dpi, 36 × 36 @ 300 dpi) and font 9 (Traditional Chinese/Japanese). Single byte Latin fonts are retained simultaneously.
Use the 'i' command to set the spacing between Asian characters: i3 adds 3 spaces between characters.
Japanese JIS input: Use Shift (1C hex) plus&to enter JIS mode, Shift. to exit.
Code page switching: I8,0001 select American English (Code Page 437). The appendix lists various code pages (437, 737, 850, 852, 855, 857, 860, 861, 862, 863, 865, 866, 869, 1250-1255) and Asian double byte code pages.
Practical reminder: When changing languages, the corresponding firmware version must be used (such as Simplified Chinese, Japanese, and Korean are not compatible with each other). Switching code pages through the I command only affects Latin fonts (1-5) and does not affect double byte fonts 8/9.

SGD Command: Network and Device Configuration
The SGD (Set/Get/Do) command allows for dynamic configuration of printers through serial ports, USB, or Ethernet. They are! Starting with U1, the format is! U1 getvar "attribute" or! U1 setvar "attribute" "value"。
7.1 Common Configuration Items
Example values for attribute description
The current programming language for device. languages is epl_zpl, which supports both EPL and ZPL
Media.printmode Printing modes: tea off ("T"), peel off ("P"), cutter ("C")
Ip.primary_network main network interface wired or wireless
Ip.dhcp.enable DHCP switch on/off
Ip.addr static IP address "192.168.1.100"
WLAN.ESSID wireless network name "Zebra_SIP"
The security types "none", "wep 40 bit", "wpa psk", etc. for wlan.security
Odometer.otal_print_1ength The total print length of the printer (read-only) returns "12345 INCHES, 31356 CENTIMETERS"
Debugging tips: Use! U1 getvar "ip.active_network" to check if the current connection is wired or wireless. If wireless association fails, check wlan.associated and wlan.signal_strength.
7.2 Batch Sending SGD Commands
Can be omitted! U1 prefix, end with END:
text
! U getvar "ip.telnet.enable"
getvar "ip.dhcp.enable"
END
Common faults and diagnostic methods
8.1 Dump Mode