Download - E-POS
Transcript
Here is the BASIC code for doing this. Let's assume that the control code you must send to your printer to have it open your cash drawer is 27,112,0,50,250. First you must convert it into a string using this BASIC code... POPOPEN$ = CHR$(27) + CHR$(112) + CHR$(0) + CHR$(50) + CHR$(250) Now all you have to do to open your cash drawer (assuming that your printer and cash drawer are properly connected and turned on) is to send the string to the printer using... LPRINT POPOPEN$ If this does not work then you can test your program code by changing the control code to 65, 66, 67, 68, 69. This is not intended to try to open the cash drawer but will instead print ABCDE on your printer. If ABCDE is not printed then either your printer is not connected properly, or your computer code for creating the string and then sending it to the printer is incorrect. To test your printer setup, load your word processing software, type in some text, and then print it. Event though it is a receipt printer this test will print if your printer is properly set up and Windows is configured to your printer. If ABCDE is printed but when you send your "pop open" code your drawer does not open then either your cash drawer is not set up correctly or the "pop open" code you are using is incorrect. It is also possible (another programmer, another program, magic) to store the ASCII string with the codes you need to a computer file. Then all you have to do is to read the file into a string variable and then print the string to your printer. If the program you are writing will be required to be able to make several different printers open a cash drawer then you have to either have a way for the user to enter in the proper "open cash drawer" code for a specific printer or you will have to have all possible codes in your software and the user will then be able to select the printer. Receipt Printer - What is a "near end" sensor and what does it do? It's a sensor on some printers to tell you when the paper is getting close to the end of the roll. Basically, it's the electronic equivalent of the red line that runs down the side of the paper when you're about to run out of paper. Drawer Does Not Open •Drawer is not connected firmly. Verify the status of connecting the drawer. Connect the drawer correctly and try printing.