Solved

Trying to open Cash Drawer connected by printer

Posted on 2004-08-19
5
1,849 Views
Last Modified: 2013-12-25
Hi everybody, i have a problem, i got a POS Epson printer TM-U220D, i'm able to print my receipts with it, but now i'm going to have a cahs drawer connected to it.  I want to kick the cash drawer out by sending the escape code but i'm not able to open the port where my printer is.  

The printer is connected on my com port, i use a crosswire cable because if not, i can't print on it.  The port from the printer is a RS-232 and the crosswire adapts it to fit on my comport.  I printed the test page from the printer to get the settings of the printer and it gives me :

Baud Rate=9600
Data Bits=8
Parity=none
Stop Bit=1

So in my app, when i use the mscomm control, i can't open the port and i got the error 8012 : Could not set comm state, there may be one or more invalid communication parameters.

My app is running on Winxp, here is an example of my code:

MSComm1.CommPort = 1
MSComm1.Settings = "9600,n,8,1"
MSComm1.PortOpen = True  This is where the error happen
MSComm1.Output = Chr$(27) + "p" + "0" + "zz"
MSComm1.PortOpen = False

Any help would be appreciated
0
Comment
Question by:flyers_pat
  • 3
  • 2
5 Comments
 
LVL 6

Expert Comment

by:mmusante
ID: 11841499
Do you use any program that may lock the serial port? (may be the program you use to print receipts)
0
 
LVL 1

Author Comment

by:flyers_pat
ID: 11841511
apart from the printer itself, no
0
 
LVL 6

Assisted Solution

by:mmusante
mmusante earned 100 total points
ID: 11841667
Somebody else with your problem (without solutions sorry)

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20747351.html

it seems that the printer driver locks the serial port ...
0
 
LVL 6

Accepted Solution

by:
mmusante earned 100 total points
ID: 11841721
Look at here (yes! it's the serial printer driver ...)

http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B318832
0
 
LVL 1

Author Comment

by:flyers_pat
ID: 11841913
Thank you very much for the help, i'll just say that my app can't run with a cash drawer when the printer is connected on the commport
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 code to programmatically convert pdf to excel 21 67
Access 2003, my txt file export is running backwards 4 46
Using "ScreenUpdating" 6 55
Adding to a VBA? 6 61
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 …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

919 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now