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.
Open cashdrawer on TM88
Re: Open cashdrawer on TM88
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
bruce
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

bruce
There are only 10 kinds of people - those who understand binary and those who don't 

Re: Open cashdrawer on TM88
I'm glad you are glad to help me. 

-
- Posts: 26
- Joined: Fri Mar 04, 2011 7:35 am
- Location: San Bernardino, CA USA
- Contact:
Re: Open cashdrawer on TM88
Here is another way to open a serial port cash drawer
- Attachments
-
- CASHDOOR.ZIP
- Open Cash Drawer
- (802 Bytes) Downloaded 905 times
Re: Open cashdrawer on TM88
Hi Bruce,
Implemented with success.
Thanks for the code.
Implemented with success.
Thanks for the code.
Re: Open cashdrawer on TM88
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.
There are only 10 kinds of people - those who understand binary and those who don't 
