Solved

Opening a Cash Drawer Through Reciept Printer in VB

Posted on 2001-06-17
4
827 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 100 total points
Comment Utility
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
Comment Utility
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 49

Expert Comment

by:Ryan Chong
Comment Utility
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
Comment Utility
Should also consider whether the Rj-11 pinout for the STar printer matches the pin for the MMC cash drawer.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now