Link to home
Start Free TrialLog in
Avatar of flosoft
flosoft

asked on

Opening a Cash Drawer Through Reciept Printer in VB

Hi,
I can't seem to get this to work - I am using a Star SP200 Reciept Printer and a MMC ECD200 Cash Drawer.

The Star Documentation states to send this:
<BEL> or Hex - 07

I am not farmiliar with sending data through a printer, just to it - I tried

Printer.Print "<BEL>"
Printer.EndDoc

and about every other possible variation I can think of and the documentation doesn't offer a VB example.
Any help will be appreciated.

Thanks,
Tom
ASKER CERTIFIED SOLUTION
Avatar of q2eddie
q2eddie
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi, again.

or use the MSComm control...

Dim Codes2Send As String
MSComm1.Settings = "9600, N, 8, 1"
'example
MSComm1.CommPort = 1
MSComm1.RTSEnable = True
If MSComm1.PortOpen = False Then
  MSComm1.PortOpen = True
End If
Codes2Send = Chr$(7)
'etc.
MSComm1.Output = Codes2Send

#Links
1. "Re: Open a Cash Drawer Sending Special Characters to th Receipt Printer"
http://news.devx.com/cgi-bin/dnewsweb.exe?cmd=article&group=vb.getting.started&item=19963&utag=

2. "Testing a Cash Drawer that is connected to the receipt printer"
http://www.pcamerica.com/tech/answers/prntest.txt

3. "I would like to know if there is any way to send a single line of text to the printer..."
http://members.aol.com/ymwymw/vbmain.htm#Q0189

Bye. -e2
Avatar of Ryan Chong
Ya, as g2eddie mentioned, use MSComm Control. Some cash box accept the command as 10 "0"s, so the output should be:

MSComm1.Output = "0000000000"


Hope this make help too.
Avatar of mrjoco824
mrjoco824

Should also consider whether the Rj-11 pinout for the STar printer matches the pin for the MMC cash drawer.