Solved

Open a cash drawer

Posted on 2006-10-28
3
1,303 Views
Last Modified: 2009-04-18
Hi, i have a Point of sale program that use a epson tmu200 printer. also it usea a cash drawer. the cash drawer is connected to the printer epson by a rj11 cable, the pirnter epson send a pulse and open the cash drawer. the printer epson is a paraler port

i use this code

Open "LPT1:" & strcommNumber For Output As #1
Print #1, Chr(27) + Chr(112) + Chr(0)
Close #1

if i use a serial , or a usb port printer, it don,t  open the cash drawer, the code is just for pararel port printers.

The question is some body know the code to open tha cash drawer with a usb port printer ?
0
Comment
Question by:cano63
3 Comments
 
LVL 1

Accepted Solution

by:
ogog earned 250 total points
ID: 17830019
i used to do this by using the "virtual" com ports. Scince the USB is always associated with a com: port.

try replacing LPT1: by COM1:, COM2... etc. try them all. In my PC i've got a total of 9 COM: ports!

here is what i used, it's working fine:

        Open "COM1:" For Output As #1
            Print #1, Chr$(27); Chr$(112); Chr$(0)
        Close #1

it's just like yours but i'm using the coms. try all numbers untill you get it right. (see in the harware panel how many you've got)

tell me how it goes.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

786 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