Chapter 3 Software Utilities
PA-5822 USER MANUAL
Page: 3-16
3.2.2
API Procedure
Take
VB2005 .NET
for example. Follow the instructions below to perform the API
procedure:
Step 1.
Declare a function. You may create a module in your project and fill in the
function.
Example: Cash drawer
Declare Function GetCashDrawerStatus Lib CashDrawer.dll (ByVal num_drawer as
short) As Boolean
Declare Function CashDrawerOpen Lib CashDrawer.dll (ByVal num_drawer as short)
As Boolean
Step 2.
Create a button to call API Function.
a.)
Call Cash drawer open event:
Private Sub cash_btn1_Click (ByVal Sender As System.Object, ByVal e As
System.EventArgs) Handles cash_btn1.Click
CashDrawerOpen(1), “1” specifies the cash drawer 1 port
CashDrawerOpen(2), “2” specifies the cash drawer 2 port
Timer1.start
b.)
Detect Cash drawer status:
A timer event can be created.
Private Sub Timer1_Tick (ByVal Sender As System.Object,ByVal e As
System.EventArgs) Handles Timer1.Tick
Dim Receive_Status1 as Boolean
Dim Receive_Status2 as Boolean
Receive_Status1 = CashDrawerOpen(&H1)
If Receive_Status1 = true then
Text1.text = “cash drawer1 open” ‘enter text into textbox.
Else
Text1.text = “cash drawer1 close” ‘enter text into textbox.
End if
‘=========================================
Receive_Status2 = CashDrawerOpen(&H2)
If Receive_Status2 = true then
Text2.text = “cash drawer2 open” ‘enter text into textbox.
Else
Text2.text = “cash drawer2 close” ‘enter text into textbox.
End if
‘=========================================
End sub
Summary of Contents for PA-5822 M1
Page 10: ...vii Figure 3 26 Boot Menu Screen 3 52 Figure 3 27 Save Exit Menu Screen 3 54...
Page 32: ...Chapter 2 Hardware Configuration PA 5822 USER MANUAL Page 2 11 Jumper Diagrams Jumper Settings...
Page 119: ...Appendix A System Diagrams PA 5822 SERIES USER MANUAL Page A 2 HDD Tray Disassembly...
Page 120: ...Appendix A System Diagrams PA 5822 SERIES USER MANUAL Page A 3 MSR module Assembly...