Opening of a Cash Drawer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to open a Cash Drawer from my Windows App when the user issues and
prints (Epson Receipt Printer) a Receipt. I beleive I need to pass the
printer a string of (#027 + #112 + #000 + #025 + #250). I would appreciate
any assistance on the code here for.
 
I need to open a Cash Drawer from my Windows App when the user issues and
prints (Epson Receipt Printer) a Receipt. I beleive I need to pass the
printer a string of (#027 + #112 + #000 + #025 + #250). I would appreciate
any assistance on the code here for.

Are those decimal or hex? Why can't you use the Chr function to
convert them into the character representation and send them to the
printer?
 
I need to open a Cash Drawer from my Windows App when the user issues
and prints (Epson Receipt Printer) a Receipt. I beleive I need to
pass the printer a string of (#027 + #112 + #000 + #025 + #250). I
would appreciate any assistance on the code here for.

How are you connected to the cash drawer?

Serial? Keyboard?

Keyboard, you can use send keys. Serial you can use the System.IO.Ports
namespace.
 
Are those decimal or hex? Why can't you use the Chr function to
convert them into the character representation and send them to the
printer?

How would I send this to the printer? I beleive this is a "string" that I need to send"
 
Spam Catcher said:
How are you connected to the cash drawer?

Serial? Keyboard?

Keyboard, you can use send keys. Serial you can use the System.IO.Ports
namespace.

The cash drawer is connected to a port on the pc and then a telephone cable connection to the printer
 
Spam Catcher said:
How are you connected to the cash drawer?

Serial? Keyboard?

Keyboard, you can use send keys. Serial you can use the System.IO.Ports
namespace.

Is this available in 2003 as I don't seem to have the System.IO.Ports namespace?
 
If serial, and you are using VS2003, then download DesktopSerialIO.dll
(free) from my homepage. You code:

Dim Buffer (4) As Byte
Buffer(0) = 27
Buffer(1) = 112
Buffer(2) = 0
Buffer(3) = 25
Buffer(4) = 250

With SerialPort
If .PortOpen = False Then .PortOpen = True
.BitRate = 9600 'for example
.Output(Buffer)
End With

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
If serial, and you are using VS2003, then download DesktopSerialIO.dll
(free) from my homepage. You code:

Dim Buffer (4) As Byte
Buffer(0) = 27
Buffer(1) = 112
Buffer(2) = 0
Buffer(3) = 25
Buffer(4) = 250

With SerialPort
If .PortOpen = False Then .PortOpen = True
.BitRate = 9600 'for example
.Output(Buffer)
End With

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
Seewww.hardandsoftware.netfor details and contact information.

If it's like the Star Micronics receipt printer we just used for our
POS app, the cash drawer is connected directly to the printer and not
to a serial port. The printer itself may be connected to a parallel
port. Our printer had a .Net library and one of the commands was to
pop the drawer. Have you check with Epson to see if they have such a
library?

Chris
 
I have downloaded the dll but am unable to reference it. I get the error:
"this is not a valid assembly or COM component. Only assemblies with the
extension of 'dll' and COM components can be referenced". Please assist.
 
Hi,

It isn't a COM dll. It is a native .NET dll. Use the Project/Add Reference
menu. Keep the tab on .NET. Browse to the location where you placed the
dll. Select it. Click OK. That's it.

There is an example terminal application in the download. Perhaps looking
at it will help?

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Hi,

My other reply showed how to send RAW data to a parallel printer. You don't
really need a .NET library (though, if the vendor offers one, then it
certainly makes sense to use it).

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Back
Top