Accessories

Paper Rolls

How to program a cash drawer to open using Escape commands
configuring your Epson printer to open your cash drawer

Need to open a cash drawer every time a document is printed?  Follow these steps to have your program send the right codes to open the drawer and/or sound the print alarm.

 
Drawer Kick  Connector

Most cash drawers are attached to a receipt printer through what looks to be a phone jack. To open the cash drawer the POS software must send "control codes" to your printer which will then send an impulse to the cash drawer to pop it open. You can use escape sequences to tell an Epson printer to open a cash drawer. The following details the correct codes and sequence you need to open the drawer or sound an alarm.

Also see how to open a cash drawer using the Epson driver for Windows

Requirements:

  • A cash drawer connected to an Epson POS printer through the drawer port (see diagram)

Drawer Connection Port on an Epson TM-U220 Printer

Epson provides a Drawer Kick ( DK ) connector on the TM printer line that allows the programmer to control up to two cash drawers. The DK connector on the back of the printer looks like a phone jack (see the green arrow, above).

The DK connector supplies +24VDC to the drawer solenoid(s) [Pin4] and then returns this signal to ground [Pin5 or Pin2] when the printer receives the appropriate control command.

The connector also has provision for the connection of a drawer position switch. This switch, in conjunction with the Automatic Status Back command or similar, can inform the application of drawer position.

 

Controlling the Cash drawer

ESC POS Control

The Epson ESC POS Drawer Kick command enables the control of either 1 or 2 Cash drawers

ESC p m t1 t2

Where

  • ESC p is the drawer kick command

  • m is the DK connector pin to output control signals ( 0 for Pin2/drawer1  or 1 for Pin5/drawer2 )

  • t1 is the ON time of the drawer kick signal. The ON time is 2 mS x t1 value.

  • t2 is the OFF time of the drawer kick signal ( time before the next ON signal can be received ) The OFF time is 2 mS x t2 value.

Programming Examples

ESC p m t1 t2

Decimal Example

MSComm1.Output = ESC + p + 0 + 25 + 250

MSComm1.Output = Chr(27) + Chr(112) + Chr(0) + Chr(25) + Chr(250)

Kick drawer 1 with the following 50mS on / 500mS off pulse

Hexadecimal Example

MSComm1.Output = Chr(&H1B) + Chr(&H70) + Chr(&H0) + Chr$(&H19) + Chr$(&HFA)

Kick drawer 1 with the same 50mS on / 500mS off pulse

 

Decimal Example

Hexadecimal Example

Windows Drivers

Epson supplies a Windows driver for the current range of TM Series printers. Programmers can also use the Generic / Text Only driver to control the cash drawer.

Epson Windows Driver

Epson has provided a ‘control’ font in the Windows driver that sends the appropriate command to the printer when triggered by certain control characters. The control characters listed on the right are provided for cash drawer control.

Programming Examples

cash drawer 1 Kick
Printer.FontName = “control”
Printer.FontSize = 10
Printer.Print “A”

cash drawer 2 Kick
Printer.FontName = “control”
Printer.FontSize = 10
Printer.Print “a”

 

Text Box: Control-Font Character Code 
Function 
Extended character code (on all fontsother than those marked "Ext.") 
A 
Open Drawer 1 (50ms drive pulse width) 
81H 
B 
Open Drawer 1 (100ms drive pulse width) 
82H 
C 
Open Drawer 1 (150ms drive pulse width) 
83H 
D 
Open Drawer 1 (200ms drive pulse width) 
84H 
E 
Open Drawer 1 (250ms drive pulse width) 
85H 
a 
Open Drawer 2 (50ms drive pulse width) 
89H 
b 
Open Drawer 2 (100ms drive pulse width) 
8AH 
c 
Open Drawer 2 (150ms drive pulse width) 
8BH 
d 
Open Drawer 2 (200ms drive pulse width) 
8CH 
e 
Open Drawer 2 (200ms drive pulse width) 
8DH

Epson Printer Control Font

The Epson printer control font is normally installed along with the Epson printer driver. This control font gives you the ability to embed control characters directly in a document.

If the Epson TM Series print driver is installed as the Default Windows print driver additional fonts will appear in the dropdown font combo box in Windows programs such as WordPad and Word. In this font list there will be a number of Epson internal printer fonts added. These fonts allow printing of internal font characters that speed up printing of receipts to the maximum allowable speed. They also allow selection of the control font. Using this font and the special printer control characters listed previously we can easily control the printer operation.

To kick cash drawer 1, we would only need to set the font to control in WordPad, Word, Access or any other Window based program that allows font selection, type the desired control character, and print the data. The Epson print driver would see the control font character and then send the required ESC POS command to the printer. See the programming examples, above, on how to do this.

Also see how to open a cash drawer using the Epson driver for Windows

 

Codabar - Epson Internal Barcode Font

control - Epson printer control font

 

Entering Printer Control Commands

To enter printer control commands into the Generic/Text Only driver you will need to access the correct ASCII characters via the computer’s keyboard. To achieve this you hold down the ALT key, then enter the desired ASCII characters decimal equivalent on the numeric keypad, then release the ALT key.

Example

Use Windows notebook for these examples

To obtain the ASCII character ‘p’ we need to refer to the ASCII Character Code table. In this table we can see the decimal equivalent of ASCII ‘p’ is 112. To enter this character we do the following;

  1. Press and hold the ALT key

  2. Press and release 1 on the numeric keypad, then press and release 1 again, then press and release 2.

  3. Release the ALT key

The ASCII character ‘p’ should now appear.

To obtain the character

  1. Press and hold the ALT key

  2. Press and release 1 on the numeric keypad, then press and release 4, then press and release 6.

  3. Release the ALT key

The ASCII character ‘’ should now appear.

Generic Driver Device Options Example

To enter the cash drawer command, ESC p m t1 t2, we would have entered the following data in the Device Options ‘End print job’ box

  1. Press and release the ESC key

  2. Press and hold the ALT key

  3. Press and release 1 on the numeric keypad, then press and release 1, then press and release 2.

  4. Release the ALT key

  5. Press and hold the ALT key

  6. Press and release 4 on the numeric keypad then press and release 8.

  7. Release the ALT key

  8. Enter { character twice

<ESC> p0{{ should now be showing in the Device Options ‘End print job’ box;

This will cause the Generic/Text Only print driver to output the Epson cash drawer command,

ESC p m t1 t2, after it has finished printing.

 

Epson OPOS Drivers

Epson supplies an OPOS driver (Service Object) for a Standard cash drawer.

In the cash drawer Device Specific Settings area in OPOS you can set the values for m (cash drawer Selection) and t1, t2 (ON / OFF time).

 

 

Cash Drawers
Cash Drawer Alarm

Drawer port tester / indicator
Printer set-up guide
Interface Cards
Cables
Ribbons
Support Page
Troubleshooting




Home |  Printers |  Accessories |  Service |  Support |  About Us |  Contact

 

30-day guarantee on everything we sell

E-Mail: info@beaglehardware.com

Call:
800-253-6407

Copyright© 2012 Beagle Hardware

Beagle Hardware is a BBB Accredited Business. Click for the BBB Business Review of this Computers Software & Services in Minneapolis MN