Connecting Tech Pros Worldwide Forums | Help | Site Map

Opening of a Cash Drawer

=?Utf-8?B?Q29ubnVsbA==?=
Guest
 
Posts: n/a
#1: Apr 18 '07
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.


zacks@construction-imaging.com
Guest
 
Posts: n/a
#2: Apr 18 '07

re: Opening of a Cash Drawer


On Apr 18, 10:28 am, Connull <Conn...@discussions.microsoft.com>
wrote:
Quote:
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?

Spam Catcher
Guest
 
Posts: n/a
#3: Apr 18 '07

re: Opening of a Cash Drawer


=?Utf-8?B?Q29ubnVsbA==?= <Connull@discussions.microsoft.comwrote in
news:12E31369-AEA4-47E1-B899-76A2EC0FBE21@microsoft.com:
Quote:
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.

=?Utf-8?B?Q29ubnVsbA==?=
Guest
 
Posts: n/a
#4: Apr 18 '07

re: Opening of a Cash Drawer




"zacks@construction-imaging.com" wrote:
Quote:
On Apr 18, 10:28 am, Connull <Conn...@discussions.microsoft.com>
wrote:
Quote:
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?
>
How would I send this to the printer? I beleive this is a "string" that I need to send"
=?Utf-8?B?Q29ubnVsbA==?=
Guest
 
Posts: n/a
#5: Apr 18 '07

re: Opening of a Cash Drawer




"Spam Catcher" wrote:
Quote:
=?Utf-8?B?Q29ubnVsbA==?= <Connull@discussions.microsoft.comwrote in
news:12E31369-AEA4-47E1-B899-76A2EC0FBE21@microsoft.com:
>
Quote:
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.
>
The cash drawer is connected to a port on the pc and then a telephone cable connection to the printer
=?Utf-8?B?Q29ubnVsbA==?=
Guest
 
Posts: n/a
#6: Apr 18 '07

re: Opening of a Cash Drawer




"Spam Catcher" wrote:
Quote:
=?Utf-8?B?Q29ubnVsbA==?= <Connull@discussions.microsoft.comwrote in
news:12E31369-AEA4-47E1-B899-76A2EC0FBE21@microsoft.com:
>
Quote:
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.
>
Is this available in 2003 as I don't seem to have the System.IO.Ports namespace?
Spam Catcher
Guest
 
Posts: n/a
#7: Apr 18 '07

re: Opening of a Cash Drawer


=?Utf-8?B?Q29ubnVsbA==?= <Connull@discussions.microsoft.comwrote in
news:F7784516-A5F2-41DC-B696-CE0FCFDA6F79@microsoft.com:

Quote:
Quote:
>Is this available in 2003 as I don't seem to have the System.IO.Ports
>namespace?

..net 2.0 (vs.net 2005)

Dick Grier
Guest
 
Posts: n/a
#8: Apr 18 '07

re: Opening of a Cash Drawer


Hi,

Look at: http://support.microsoft.com/kb/322090

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.


Dick Grier
Guest
 
Posts: n/a
#9: Apr 18 '07

re: Opening of a Cash Drawer


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.


Chris Dunaway
Guest
 
Posts: n/a
#10: Apr 18 '07

re: Opening of a Cash Drawer


On Apr 18, 12:08 pm, "Dick Grier" <dick_grierNOSPAM@.msn.comwrote:
Quote:
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

=?Utf-8?B?Q29ubnVsbA==?=
Guest
 
Posts: n/a
#11: Apr 18 '07

re: Opening of a Cash Drawer


Please provide me with your homepage details as what you have indicated here
sounds perfect.

"Dick Grier" wrote:
Quote:
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.
>
>
>
=?Utf-8?B?Q29ubnVsbA==?=
Guest
 
Posts: n/a
#12: Apr 18 '07

re: Opening of a Cash Drawer


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.

"Dick Grier" wrote:
Quote:
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.
>
>
>
Dick Grier
Guest
 
Posts: n/a
#13: Apr 19 '07

re: Opening of a Cash Drawer


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.


Dick Grier
Guest
 
Posts: n/a
#14: Apr 19 '07

re: Opening of a Cash Drawer


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.


Closed Thread


Similar Visual Basic .NET bytes