Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening a cash drawer

Status
Not open for further replies.

Evbcs

MIS
Sep 17, 2003
18
US
A client has asked that we open a cash drawer from an existing application. (Nothing fancy.)

I assume that we will need to send some kind of control character sequence (provided by the vendor) to it like we used to do in the old days with printers. How is that done from VFP 6 these days?

Thanks, EVBCS
 
It depends lot on how the drawer works.
If it's a matter of sending a control code to a printer, you can use something like:
???CHR(27) + CHR(whatever)

If it's serial, you have to use some sort of serial driver or the MSCOMM control to access the port.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Thanks for the quick reply. Sounds like I should specify that they purchase a drawer that behaves like a printer. Any specific recommendations for type. Whatever would be easiest to implement.

I assume that the foxpro code would be:

SET PRINTER TO XXX
SET PRINT ON

? CHR(???)

SET PRINT OFF

Haven't had to control printers directly for a long time, so the required logic has been kind of forgotten.
 
Actually, that's why I specified ???CHR(whatever). The three ?'s bypasses the printer driver, whereas a single or double question mark utilizes the printer driver.
With newer PC's going USB, it may pay to see what sort of drawers are out there for that connectivity. I don't know.
I can't really recommend any sort of cash drawer, I haven't used those.
But as for communicationg with external devices using VFP, I have communicated via serial and printer ports with hardware such as receipt printers, smart cart reader/writer, and so on.

So you should be able to get something working with any sort of port, especially if they supply a driver.

-Dave Summers-
[cheers]
Even more Fox stuff at:
 
The cash drawers that are bundled with Intuit QB Point of sale are now USB. They require a USB recipt printer to be attached and the drawer is actually attached to the small recipt printer via a regular telephone wire. I dont know the codes that open the drawer, but i do know if my printer driver gets wacked or if someone switches the usb cables etc, the drawer quits working and a reinstall of the printer drivers is required to get it to open again.
wjwjr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top