Cash Drawer Control; Advanced Printer Driver - Epson TM-U330 Technical Reference Manual

Hide thumbs Also See for TM-U330:
Table of Contents

Advertisement

5.2 Cash Drawer Control

5.2.1 Advanced Printer Driver

5.2.1.1 Drawer Open
When you control a drawer which is connected to this printer using APD, you have 2 methods to open the
drawer. The first method is using "Control font," second is using "Status API."
Below is as example of a program (Visual Basic) to open a cash drawer using Control font.
'Execute open cash drawer1.
Printer.Font.Name = "control"
Printer.Print "A"
Below is as example of a program (Visual Basic) to open a cash drawer using Status API.
'call api to open the drawer1
rtn = BiOpenDrawer(m_hApi, EPS_BI_DRAWER_1, EPS_BI_PULSE_100)
Note: Program needs to call "BiOpenMonPrinter" before calling "BiOpenDraewer."
5.2.1.2 Checking Drawer Status
You can get drawer status by using Status API. Below is examples of program which checks the drawer
status.
'get the current printer status
rtn = BiGetStatus(m_hApi, getstatus)
If rtn < 0 Then
ErrMsg (rtn) 'Error handling
Exit Sub
End If
If (getstatus And ASB_DRAWER_KICK) = ASB_DRAWER_KICK Then
MsgBox("Drawer is opened")
Else
MsgBox("Drawer is closed")
End If
There are the other checking method (Bi BiSetStatusBackFunction, BiSetStatusBackWnd) in Status API.
Refer to the Status API User's Manual and the sample programs for detail.
'This calling means "open the drawer1 with 100msec pulse."
'Pin No.3 is high
'This"A" means "open the drawer1 with 50msec pulse."
Application Development Information 5-4
TM-U330 Technical Reference Guide

Advertisement

Table of Contents
loading

Table of Contents