Solved

Opening a Cash Drawer Through Reciept Printer in VB

Posted on 2001-06-17
4
833 Views
Last Modified: 2007-12-19
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
0
Comment
Question by:flosoft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
q2eddie earned 100 total points
ID: 6200634
Hi, flosoft.

#Try This
Open "LPT1" For Output As #1
Print #1, Chr(7)
Close #1

Bye. -e2
0
 
LVL 7

Expert Comment

by:q2eddie
ID: 6200665
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
0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 6200892
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.
0
 

Expert Comment

by:mrjoco824
ID: 25607615
Should also consider whether the Rj-11 pinout for the STar printer matches the pin for the MMC cash drawer.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

691 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