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!

CashDrawer and Clipper 5.2e

Status
Not open for further replies.

inthedark

Technical User
Nov 2, 2001
8
0
0
US
Cash drawer connected to serial port COM1 and the code is:

Set Printer to COM1
Set Device to Printer
Set Printer On
? Chr(7)
.
.

If COMM1 is used instead of COM1 it produces COMM1.PRN which does not happen with COM1 (the signal -> hardware ?) but the drawer remains closed.

Help needed! setubal@oninet.pt
 
I'm not sure what the problem is!

If the device is connected to COM1, then you need to send the command to COM1.

Sending to COMM1 will create a text file on disk as you have said above.

Have I missed something? It appears that it is doing what it should be.
 
Good point HotEye

Could it be that Clipper is just unable to
tackle hardware I/O?

The fact is that the drawer refuses to open.

 
Oh, sorry, so even using COM1 it doesn't work.

Have you tried
?? chr(7)
this will suppress the <cr><lF>.


Also, have you configured the COM port using:
MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s] [RETRY=r]
to match the device settings.

Have you tested the COM port with another device?
Have you tried it on COM2?
Are pins 2 and 3 the correct way round in the cable?

Other than that, I'm stuck as well.

Hope something here helps, or puts you on the right track.
 
Hi,

I think there are two ways to drive a cash drawer.
Whether a cach drawer is driven via a ticketprinter:
In that case mostly the code CHR(7) is sent to the ticketprinter. There is a connector on the ticketprinter to fix the cash drawer. Pay attention, depending on the ticketprinter e.g. Epson, Star, etc., the pin connection is different.

In the other case a cash drawer with built in interface could be driven via the com port.
In that case the port must be initialised and the specific escape code must be sent to the interface.
So then CHR(7) doesn't work at all!!!

Wim
 
I did have problem like thats.

From clipper never open, i have do a .bat file
/// open.bat
Echo ^G > com1:
///eof open.bat


From clipper i call it.

run open.bat

only that work good.
ramonzea@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top