Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Determine If Cash Drawer Is Open
Message
From
04/12/2001 15:16:28
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00586805
Message ID:
00589482
Views:
25
>Hi All!
>
>I have this project regarding a POS system and like all POS systems, it uses a cash drawer. I know already how to programmatically open the cash drawer, but my dilemna now is how do i determine if it has already been closed. I was able to open the drawer by opening a communication port (COM1) using FOPEN and "wrote" some character data to open it using FWRITE. Question is, how do i know if the cash drawer was closed already? When the cash drawer closes, does it "write" back something? If so, what?
>
>Thanks in advance.

Most 'smart' cash drawers have a drawer status switch. After printing your receipt, you send a control code to the printer requesting drawer status, then wait a few milliseconds and the receipt printer sends a code back to your app usually a chr(0) or chr(1), 0 meaning closed, 1 meaning open. FREAD() may be an option. OPOS is an option if you are using an OPOS printer. I use WriteData() and ReadData() functions in CommTools instead of using FWRITE() and FREAD().
Previous
Reply
Map
View

Click here to load this message in the networking platform