Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clear buffer with ZPL II [Zebra GK420d]

In documentation of ZPL II language there is command "~JA" which allow to clear all jobs in buffer.

Unfortunately it seems to not working on Zebra GK420d ( but I can't also find any word about it in printer specification ).

I can print labels with sending for example this string to printer :

PUT 
"^XA" SKIP
"^MMT" SKIP
"^LL1279" SKIP
"^PW799" SKIP
"^LS0" SKIP
"^BY5,3,387^FT633,947^B2B,400,Y,N,Y" SKIP
"^FD>:" v_value FORMAT 'x(8)' "^FS" SKIP
"^FT133,707^A0B,56,81^FH\^FD" v_value "^FS" SKIP
"^FT131,1100^A0B,56,81^FH\^FDVALUE:^FS" SKIP
"^PQ1,0,1,Y^XZ" 
SKIP.

Then if there is more than 2 labels in buffer i try to clear buffer with :

PUT 
"^XA" SKIP
"~JA" SKIP
"^XZ" SKIP
.

Without result.

I tried also only PUT "~JA" SKIP .

Again without result.

I cannot find any information why it's not working or how to make this working with Zebra GX420d.

Can You help me? Maybe this is not possible with this printer.

Thank You for all help.

Best Regards, Wiktor

like image 740
Wiktor Avatar asked Apr 27 '15 11:04

Wiktor


2 Answers

Tilde (~) is Progress default escape character. Use two tildes to bypass that:

PUT "~~JA" SKIP.

You can also look at the CONTROL option for the PUT statement.

CONTROL expression

The expression specifies a control sequence that you want to send without affecting the current line, page counters, and positions maintained within ABL. Following CONTROL, expression can be a character-string expression or a RAW variable. It can include null character constants of the form NULL or NULL( expression ), where expression specifies the number of NULLs to send.

Example:

PUT STREAM A CONTROL "~033A" NULL.
like image 75
Jensd Avatar answered Sep 20 '22 15:09

Jensd


Hopefully this helps someone, taken from manual EPL2_Prog.pdf

N = Clear Image Buffer Description: This command clears the image buffer prior to building a new label image.

Always send a Line Feed (LF) prior to the N command to ensure that previous data in the command buffer has cleared and the printer is initialized and ready to accept commands.

Do not use the N command within stored forms.

like image 32
atoms Avatar answered Sep 22 '22 15:09

atoms