Api Procedure - Protech Systems PA-3222 User Manual

10.1 inch pos terminal powered by intel celeron j1900 quad-core
Hide thumbs Also See for PA-3222:
Table of Contents

Advertisement

4.10.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
PA-3222 SERIES USER MANUAL
Chapter 4 Software Utilities
Page: 4-90

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents