Open cashdrawer on TM88

This forum is for general support of Xbase++
Post Reply
Message
Author
skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Open cashdrawer on TM88

#1 Post 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.
Best regards,

Chris.
www.aboservice.be

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: Open cashdrawer on TM88

#2 Post 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
There are only 10 kinds of people - those who understand binary and those who don't :)

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Open cashdrawer on TM88

#3 Post by skiman »

I'm glad you are glad to help me. :dance:
Best regards,

Chris.
www.aboservice.be

John Hohensee
Posts: 26
Joined: Fri Mar 04, 2011 7:35 am
Location: San Bernardino, CA USA
Contact:

Re: Open cashdrawer on TM88

#4 Post by John Hohensee »

Here is another way to open a serial port cash drawer
Attachments
CASHDOOR.ZIP
Open Cash Drawer
(802 Bytes) Downloaded 779 times

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Open cashdrawer on TM88

#5 Post by skiman »

Hi Bruce,

Implemented with success.

Thanks for the code.
Best regards,

Chris.
www.aboservice.be

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: Open cashdrawer on TM88

#6 Post 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.
There are only 10 kinds of people - those who understand binary and those who don't :)

Post Reply