Trying to open Cash Drawer connected by printer
Posted on 2004-08-19
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 :
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