Solved

Controlling the cash drawer opening on an Eclipse EP-T884 coupon printer

Posted on 2013-11-27
3
718 Views
Last Modified: 2013-11-27
Good morning,
At last, I have decided to be part of this community to help me resolve problems or difficulties I encounter building my application. To make a very long story short, I have created a POS system using VBA and now I am converting it into an SQL server database.

I have a coupon printer that I use that is connected on 2 ports, the first port on COM4 and the second on USB001 (Virtual USB port), my problem today is that having an electronic cash drawer connected on an RJ45 behind the printer, I can control easily the opening of this device by COM4, however, for some other report, in this case a kitchen coupon, I do not want to have the cash drawer opens and in order to achieve that, I have to use a generic text only printer and the look of the coupon looks primitive.
So I am looking for the code to be able to disable the opening of that drawer while using the USB001 port.
Here is the code I use on COM4 that opens the cash drawer:

Dim intCOM4 As Integer
intCOM4 = FreeFile
Open "COM4" For Output As #intCOM4
Print #intCOM4, Chr$(16); Chr$(20); Chr$(1); Chr$(0); Chr$(4);
Close intCOM4

Using this is working great, what could be the code to disable that opening of the cash drawer, I have the manual for that printer (the ESC code), but can’t figure it out.

I was thinking that could control the cash drawer as well:

Dim intUSB001 As Integer
intUSB001 = FreeFile
Open " USB001" For Output As #intUSB001
Print #int USB001, Chr$(16); Chr$(20); Chr$(1); Chr$(0); Chr$(4);
Close int USB001

But the signal doesn’t works using the above code, USB001 is a virtual port but it should work, no? Anyway, this is not the reason of this question but if you can add some comments on that, that would be appreciate.

So, my cash drawer being connected directly to my coupon printer, anything I send using the normal driver on USB001, (not generic text only), makes the drawer kick out, so my question is how can I use the normal driver (THERMAL LK-TXXX)  and not have the drawer opens?

I was thinking something like sending some ESC code to disable the RJ45 port of the printer, print the coupon using the normal driver and then sending back some ESC code to enable the RJ45 port. Make any sense?

I have attached a PDF document with technical references regarding that printer.

Thank you
EP-T884-ESC-POS-Command-Manual.pdf
0
Comment
Question by:supportAutoCaisse
  • 2
3 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 39680969
Check the driver settings.   There must be something in the driver causing the drawer to kick out.

I don't see anything in the command structure that allows you to disable the drawer port.

Jim.
0
 

Author Comment

by:supportAutoCaisse
ID: 39681832
Thanks Jim,
At first when I saw your answer I was thinking that it could not be that simple, guess what, it was, the only thing I had to do is creating a new printer, named it Kitchen printer and remove the open cash drawer from the commands, it works now perfectly.

Another proof to take the time to understand the right answer, thank you very much.

Claude
0
 

Author Closing Comment

by:supportAutoCaisse
ID: 39681838
A short answer right to the point, thanks!
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question