General information
Category:
Coding, syntax & commands
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only