Page 1 of 1

Open cashdrawer on TM88

Posted: Thu Aug 25, 2011 9:47 am
by skiman
Hi,

I have a customer with a TM88 printer and a cashdrawer connected to it. I want to open the cashdrawer without printing to the printer.

With serial cashdrawers I could sen to the COM port. In this case the printer is connected with USB, and I have no COM port to print to.

In the printerdriver the opening for the drawer is active, after each print the drawer is opened. However, I want to open it also without printing anything to it.

Re: Open cashdrawer on TM88

Posted: Thu Aug 25, 2011 5:16 pm
by BruceN
FINALLY!!! Something I can help with....

To open the cash drawer you send control codes to the printer. For Epson printers use chrs: 27,112,0,40,250.

Herre's what we use for a usb port printer to pop cash drawer:

oPrinterCD:=XbpPrinter():New()
m_ptr:=trim(m_forms[4][16]) // the printer as defines in windows
oPrinterCD:Create(m_ptr)
set printer to OBJECT oPrinterCD
set console off
set print on
?? alltrim(m_forms[4][6]) // thats the pop codes: 27,112,0,40,250 for an epson
set print off
set printer to
set console on
oPrinterCD:destroy()


Thank you for asking something I can help with :D

bruce

Re: Open cashdrawer on TM88

Posted: Fri Aug 26, 2011 12:41 am
by skiman
I'm glad you are glad to help me. :dance:

Re: Open cashdrawer on TM88

Posted: Sat Aug 27, 2011 5:51 am
by John Hohensee
Here is another way to open a serial port cash drawer

Re: Open cashdrawer on TM88

Posted: Mon Aug 29, 2011 3:07 am
by skiman
Hi Bruce,

Implemented with success.

Thanks for the code.

Re: Open cashdrawer on TM88

Posted: Tue Aug 30, 2011 11:04 am
by BruceN
I'm SOOOO glad. It's rare that I can actually return the favors and help someone...just wish it would happen more often. You 'wizards' have been lifesavers on multiple occassions.