How to clear buffer with ZPL II [Zebra GK420d]
Asked Answered
D

2

7

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

Davisdavison answered 27/4, 2015 at 11:46 Comment(2)
Have you tried ^JA (it seems that ^ is used quite a lot)? Another option to try is ~~JA (Progress generally looks at ~ as an escape character so two ~ might override that). There's also a CONTROL option for the PUT command.Horrendous
Thank You @Jensd. "~~JA" solved my problem. Best Regards!Davisdavison
H
8

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.
Horrendous answered 27/4, 2015 at 12:28 Comment(0)
T
1

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.

Thither answered 9/4, 2018 at 13:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.