Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 773
  • Last Modified:

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

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
supportAutoCaisse
Asked:
supportAutoCaisse
  • 2
1 Solution
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
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
 
supportAutoCaisseAuthor Commented:
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
 
supportAutoCaisseAuthor Commented:
A short answer right to the point, thanks!
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now