Clear / Cancel "waiting for slip" EPSON TM-H6000IV using ESC/POS

510 views
Skip to first unread message

Juan Soto

unread,
Sep 2, 2014, 11:54:14 PM9/2/14
to qz-p...@googlegroups.com
I have an EPSON that we are using qzprint to both print receipts with on roll paper and "stamp" documents using the front slip. 

Printing hasn't been an issue thus far for the most part but I would like to know if it's possible to send a "cancel" command or some way to re-initialize the printer while it's waiting for a slip to be inserted so I don't have to put the paper in and can send new commands. I see two commands in the programming guide that seem to be possibilities but I'm not entirely sure I'm using them right.

These are the commands

Select paper sensor to output paper-end signals 
ASCII  ESC c 3 n
Hex     1B 63 33 n

Now the guide says that the n (bit) is either 4 or 5 (slip TOF / slip BOF respectively)
In addition to that for n = 4, the Off is signified by Hex 00 to disable the slip TOF and On is signified by Hex 10 to enable it
For n = 5, Off is Hex 00 to disable slip BOF and On is Hex 20 to enable it 

The other command I have is 
Select paper sensor(s) to stop printing
ASCII  ESC c 4 n
Hex     1B 63 34 n

The same applies to this command as above for the n value with the slip

For example, I tried sending ESC c 3 n with the following with no luck (tried the same with ESC c 4 n as well)

qz.append('\x1B' + '\x63' + '\x33' + '\x00');

and

qz.append('\x1B' + '\x63' + '\x33' + '\x04' + '\x00');

and 

qz.append('\x1B' + '\x63' + '\x33' + '\x05' + '\x00');

Are these the correct commands to use to cancel out of the slip sensor "waiting" for a piece of paper or is there something else I should be doing? Should they be done in a certain order or am I just using them incorrectly? I have tried to send the Printer init command (ESC @) and that didn't do anything either. 




Tres Finocchiaro

unread,
Sep 2, 2014, 11:57:05 PM9/2/14
to Juan Soto, qz-p...@googlegroups.com
@Juan,

"\x00" is invalid in JavaScript on all major web browsers, so we created appendHex() for times when x00 is needed.

Usage:

qz.appendHex('x1B' + 'x63' + 'x33' + 'x00');

-Tres

--
You received this message because you are subscribed to the Google Groups "qz-print" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qz-print+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Juan Soto

unread,
Sep 3, 2014, 12:49:25 AM9/3/14
to qz-p...@googlegroups.com, jls...@gmail.com
Tres,

Thanks so much for the quick reply.

I changed all my calls over to appendHex to avoid any further issues (including the ones with x00) and I still can't get either of those commands working. Do you know of a way to cancel a slip "waiting" sensor after the command has been sent? Everything I've tried hasn't worked.


-Juan

Tres Finocchiaro

unread,
Sep 3, 2014, 1:26:11 PM9/3/14
to Juan Soto, qz-p...@googlegroups.com
> Do you know of a way to cancel a slip "waiting" sensor after the command has been sent? Everything I've tried hasn't worked.

No, but I'll forward the conversation to my brother, he has more experience with ESCP.

I've never used an epson printer for stamping documents.  Can you explain a bit more?

-Tres

Juan Soto

unread,
Sep 3, 2014, 3:02:08 PM9/3/14
to qz-p...@googlegroups.com, jls...@gmail.com
Thanks again Tres,

I should clarify.. what we're doing is simply enabling the slip (front side) printing, and then inserting a document to have a barcode with some document details printed on the top right of the document. We called it "stamping" the document but we're not literally stamping it :).

We do the same with checks for printing the endorsement on the back of the check via the slip/validation.

-Juan
Reply all
Reply to author
Forward
0 new messages