Solved

Trying to open Cash Drawer connected by printer

Posted on 2004-08-19
5
1,852 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Paint/Redraw window while dragging 16 82
A macro to Count the number of rows across all worksheets 3 124
MS Date Picker 64 bit 32 bit issue 12 59
How to make an ADE file by code? 11 94
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

791 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