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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open cash drawer with vfp6

Status
Not open for further replies.

mouradoualha

Programmer
Dec 16, 2008
15
0
0
TN
hello
i have a cash drawer to open in the commandbutton click event
what command i have to use?
 
There is no general way to do such things. Ask the cash system vendor about an interface to the hardware functionalities.

Bye, Olaf.
 
there isn't a command system to do that please i have a problem with the vendor
 
If your vendor can't help you, I don't see how we can. You have given us no information about the make or model of cash register, how it interfaces to your computer system, or what software you are using.

We do our best to answer questions and solve problems here, but you will have to help us to help you.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
If the cash drawer has a standard interface, meaning a serial or parallel port, it's usually very easy. Most cash drawers will open when they receive a chr(7). Create a file, for instance called cashdrawer.open, with this command:
Code:
Strtofile(chr(7),'cashdrawer.open')
To open the cash drawer:
Code:
Copy file cashdrawer.open to Com1:
Replace com1: with the actual name of the port.
 
Is your cash drawer connect to a printer via RJ11?
or is it a USB?

Ez Logic
Michigan
 
OK, finally one info about your system.

If you have trouble getting info from the vendor, it's more or less understandable you ask developers having been there/done that. I am not one of them, but glad you get feedback.

I second Mike (and he seconded me), that we rather need more info. More concrete: It would perhaps be much more and better feedback, if you simply tell the brand, make and model of your system, so we may google for you. As far as I know about electronic scales with USB plug, they internally still use COM, the USB plug&play device installed by plugging in such "USB" scales most often is a serial port, so in the end it's jsut the technical plug being USB, but it just is for convenience of todays PCs not having serial ports anymore.

You surely will need more function than just opening the cash drawer, so if you specify your system you may get much more info. Again in the analogy of scale devices the protocol and commands are very specific to the vendor and model.

Bye, Olaf.
 
My client's cash drawer CD554 came with an installation CD. After installing it, it had an OCX file
here is how I did mine.
Did the Cash drawer came with an installation file?

Code:
FUNCTION OpenUSBDrawer()
	TRY 
		oDrawer = createobject("OPOS.CashDrawer")
		oDrawer.open("CD554")
		oDrawer.DeviceEnabled = .t.
		oDrawer.OpenDrawer()
		oDrawer.DeviceEnabled = .f.
		release oDrawer
	CATCH TO loexp
	ENDTRY 
ENDFUNC

Ez Logic
Michigan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top