Solved

Trying to open Cash Drawer connected by printer

Posted on 2004-08-19
5
1,844 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
Comment Utility
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
Comment Utility
apart from the printer itself, no
0
 
LVL 6

Assisted Solution

by:mmusante
mmusante earned 100 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

744 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

17 Experts available now in Live!

Get 1:1 Help Now