vfp command to eject a cash drawer  
Author Message
Jason_B.





PostPosted: Visual FoxPro General, vfp command to eject a cash drawer Top

hello,

i would like all you experts to help me out in figuring out how eject a cash drawer after finalizing the transaction. I need it to be done in vfp.

my second question is, what is the command to write the code to print the transactioin in the receipt printer.

thank you in advance

Jason



Visual FoxPro2  
 
 
Alex Feldstein





PostPosted: Visual FoxPro General, vfp command to eject a cash drawer Top

Unfortunately I don't have an exact answer as I do not use the device.

Cash drawers are either RS-232 or USB connections, right You generally access RS-232 through MSComm or some ActiveX and you send the proper command (like CHR(12) to eject paper in most old printers).

Wouldn't the command you are looking for (how to open cash drawer) be in the cash drawer manual I wouldn't be surprised if they use the ASCII form feed CHR(12) mentioned above for this task.

 


 
 
Madix_t





PostPosted: Visual FoxPro General, vfp command to eject a cash drawer Top

hi..

although i am not an expert but just have a little knowledge regarding your problem.

just check your cash drawer if it connected directly to a printer there's a little jack at the back near the printer port cable or somewhere depending on the model, if it has then it is included in the printer driver already. Once you click the rpint button of your form it'll automatically kick-out the drawer.(Printer that hasno problem regarding the connectivety of the drawer is EPSON, STAR.

but if your drawer has a connection for serial port of the PC, here a little code i can share to you, this is what i do, just put in a click event of your button, but dont forget the mSCOMM activex to put in your form, and you dont have to put anything at that active x.

here's the code

LOCAL
lcOpen="OK"

WITH THISFORM.olecontrol1
.portopen=.T.
.Output=lcOpen
.portopen=.F.
ENDWITH
RELEASE lcOpen

if it won't work just e-mail me i have small code from Vbasic for printer specially that ABS-POS printer

i hope this will help