EasyManua.ls Logo

protech PA-6225 - API Procedure

protech PA-6225
283 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 3 Software
PA-6225 SERIES USER MANUAL
Page 145
3-3-2. API Procedure
Take VB2005 .NET for example.
1. First you must 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
2. Then 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.

Table of Contents