[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Opening a Cash Drawer Through Reciept Printer in VB

Posted on 2001-06-17
4
Medium Priority
?
838 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
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
q2eddie earned 400 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 54

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

873 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