background image

 

34 

Appendix A. Sample C++ Cash Drawer Code for Windows 

 

 

NOTE:

 

Requires installation of System Driver. Refer to the System Driver Installation 
section for instructions. 

 

1.

 

Open Cash Drawer 

 
// IOCTL Codes 
#define GPD_TYPE 56053 
#define ADV_OPEN_CTL_CODE CTL_CODE(GPD_TYPE, 0x900, METHOD_BUFFERED, FILE_ANY_ACCESS) 
#define ADV_STATUS_CTL_CODE CTL_CODE(GPD_TYPE, 0x901, METHOD_BUFFERED, FILE_ANY_ACCESS) 
 
void OpenDrawer(UCHAR uWhichDrawer)  

// uWhichDrawer = 1 => CD#1, uWhichDrawer = 2 => CD#2 
HANDLE hFile; 

 

BOOL bRet; 
UCHAR uDrawer = uWhichDrawer; 

 

// Open the driver 
hFile = CreateFile("\\\\.\\ADVSYS", 

    GENERIC_WRITE | GENERIC_READ,  
    FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,  
    OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); 

 

if (m_hFile == INVALID_HANDLE_VALUE) 

AfxMessageBox("Unable to open Cash Drawer Device Driver!"); 
return; 

 

// Turn on the Cash Drawer Output (Fire the required solenoid) 
bRet = DeviceIoControl(hFile, ADV_CD_OPEN_CTL_CODE, 

&uDrawer, sizeof(uDrawer), 
NULL, 0, 
&ulBytesReturned, NULL); 

 

if (bRet == FALSE || ulBytesReturned != 1) 

AfxMessageBox("Failed to write to cash drawer driver"); 
CloseHandle(hFile); 
return; 

 

CloseHandle(hFile); 

 

2.

 

Get Cash Drawer Status 

 
void GetDrawerState()  

HANDLE hFile; 

 

BOOL bRet; 

 

// Open the driver 
hFile = CreateFile(TEXT("\\\\.\\ADVSYS"), 

GENERIC_WRITE | GENERIC_READ,  
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,  
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); 

 

if (m_hFile == INVALID_HANDLE_VALUE) 

AfxMessageBox("Unable to open Cash Drawer Device Driver!"); 
return; 

 

// Read the CD status 
bRet = DeviceIoControl(hFile, ADV_CD_STATUS_CTL_CODE, 

NULL, 0 

 

Summary of Contents for ABOX-110 Series

Page 1: ...www advanpos com ABOX 110 Series Compact POS Box System User Manual Ver 3 0_2010 01 04 Before installing and operating the unit please read this user manual thoroughly and retain for reference ...

Page 2: ... Chapter 3 Mounting procedures for optional devices such as a wall mount kit H 2120 and H 2150 Chapter 4 AMB 6410 main board diagrams locations of jumpers and connectors Chapter 5 Installation instructions for the Intel chip set driver video driver audio LAN AdvanPOS system and OPOS drivers WARNING Text set off in this manner indicates that failure to follow directions could result in bodily harm ...

Page 3: ...encouraged to try to correct the interference by one or more of the following measures Reorient or relocate the receiving antenna Increase the separation between the equipment and the receiver Connect the equipment to an outlet on a circuit different from that to which the receiver is connected Consult the dealer or an experienced radio TV technician for help NOTE Shielded interconnect cables and ...

Page 4: ...ay be photocopied or reproduced in any form without prior written consent from the manufacturer The software described in this guide is furnished under a license agreement or nondisclosure agreement The software may be used or copied only in accordance with the terms of the agreement Product names mentioned herein may be trademarks and or registered trademarks of their respective companies 2010 Al...

Page 5: ...and for the voltage and current marked on the product s electrical ratings label The voltage and current rating of the cord should be greater than the voltage and current rating marked on the product 11 All cautions and warnings on the equipment should be noted 12 If the equipment is not used for a long time disconnect the equipment from the power outlet to avoid damage 13 Never allow any liquid i...

Page 6: ... type Monitor Installation 17 H 2150 Pole type Monitor Installation 18 Chapter 4 AMB 6410 Main Board Configuration 19 Jumper and Connector Locations 19 Connector Allocation 19 Connector Pin Assignments 20 Jumper Settings 23 Chapter 5 Software Setup 25 Driver Software List 25 Intel Chipset Driver Installation 26 Intel Graphics Driver Installation 27 Audio Driver Installation 28 Ethernet Driver Inst...

Page 7: ...C 50 60Hz 5 0A OS Support Windows XP Pro Embedded WEPOS Windows POS Ready 2009 Linux I O Ports USB Ports Supports 7 USB 2 0 ports for future expansion Front x 1 Rear x 6 ABOX 110 5 external COM1 COM2 COM5 COM6 D sub pin 9 with 5V 12V and COM4 Serial Ports ABOX 110 S 3 external COM1 COM2 COM5 3 internal COM3 COM4 for AdvanBUS LVDS port COM6 reserved Parallel Port 1 x bi directional parallel port D ...

Page 8: ...1024 x 768 250 nits expandable functions as below Touch panel COM type Magnetic Stripe Reader MSR Module triple track 2 in 1 Module Magnetic Stripe Reader Fingerprint Reader 2 in 1 Module Magnetic Stripe Reader I Button Reader 3 in 1 Module Magnetic Stripe Reader I Button Reader IC Card Reader Wireless Module WiFi 802 11b g or Bluetooth 2 0 Radio Frequency Identification RFID Module internal 13 56...

Page 9: ...m Before you begin take a few moments to become familiar with the ABOX 110 Exterior I O ports may vary according to model versions USB Port Heat Dissipation Design Housing Power Indicator Power SW 12VDC In HDD Bay ...

Page 10: ...4 Dimensions Unit mm ...

Page 11: ...The ABOX 110 S s connector panel is located at the rear Power SW COM6 RI 5V 12V 4 Port USB HUB COM1 2 5 RI 5V 12V PS 2 12VDC In COM4 RI only 12V Cash Drawer HDD Bay LAN LPT VGA 2 x USB MIC In Line Out LVDS 4 Port USB HUB LPT HDD Bay LAN 12VDC In 12V Cash Drawer COM1 2 5 RI 5V 12V VGA Mic In Line Out Power SW 2 x USB ...

Page 12: ...face controller receptacles Do not disable the power cord grounding plug The grounding plug is an important safety feature Plug the power cord in a grounded earthed outlet that is easily accessible at all times CAUTION Static electricity can damage the electrical components of the computer and or optional equipment Before beginning these procedures ensure that you are discharged of static electric...

Page 13: ...charged of static electricity While handling a drive avoid touching the connector 1 Turn off the system power properly through the operating system then turn off any external devices 2 Disconnect the power cord from the power outlet and disconnect any external devices 3 Use a hexagonal wrench allen key to remove the eight screws indicated on the system box front and rear 4 Place the box upside dow...

Page 14: ...s present on the main board as long as the system is plugged into an active AC outlet The power cord must be disconnected from the power source before clearing the CMOS NOTE All LEDs on the board should be OFF Failure to ensure there is no power in the system may damage the main board You must disconnect the power cord to avoid damage to the internal components of the system 3 Open the system base...

Page 15: ... cord to avoid damage to the internal components of the system 3 Place the main unit upside down Remove the two screws indicated at the bottom of the base and lift off the CF cover in the direction of the arrow 4 Insert the CF card into the socket NOTE Grooves on both sides of the CF card should exactly match those on the socket simplifying CF card installation 5 Replace the CF cover and set the b...

Page 16: ... of both the CF card and hard disk at the same time however the user will need to set the system BIOS for the preferred boot order When either a CF card only or 2 5 inch hard disk only is installed the BIOS will automatically designate it as the master drive and system boot device ...

Page 17: ...xidation resulting from having incompatible metals in contact with each other Static electricity can damage the electronic components of the system or optional cards Before beginning these procedures ensure that you are discharged of static electricity by briefly touching a grounded metal object When handling a memory module be careful not to touch any of the contacts Doing so may damage the modul...

Page 18: ... additional or replacement memory card into the socket almost covering the gold contacts completely then push the card down If the card is fully inserted and properly seated the metal latches will be in the closed position indicated 6 Replace the CF cover then move the box back to an upright position 7 Reconnect the power cord and any external devices then turn on the system The system should auto...

Page 19: ...t were preinstalled on the system 1 Turn off the system power properly through the operating system then turn off any external devices 2 Disconnect the power cord from the power outlet and disconnect any external devices CAUTION Regardless of the power on state voltage is always present on the main board as long as the system is plugged into an active AC outlet You must disconnect the power cord t...

Page 20: ...x and re secure the screws 6 Slide the HDD box back into the panel ensuring that it is pressed all the way in and properly seated 7 Reattach the two screws that secure the HDD box 8 Reconnect the power cord and any external devices then turn on the system ...

Page 21: ...uipped system may weigh up to 2 5 kg 1 Drill four holes in the wall following the rectangular mounting plate layout as shown below The rectangular drill pattern should be 204mm wide horizontal and 76mm high vertical Secure the wall mount holder to the wall with four screws NOTE Wall mounting screws are not supplied as different types of walls require different types of screws Please be sure the mo...

Page 22: ...g the two mounting brackets to the main unit the system box can be slid onto the wall mount plate After the unit is fit to the mount two locking thumb screws supplied should be installed to ensure that the unit is secure ...

Page 23: ...e power on state voltage is always present on the main board as long as the system is plugged into an active AC outlet You must disconnect the power cord to avoid damage to the internal components of the system 3 Connect the VGA cable to the VGA port on the rear of the ABOX 110 or ABOX 110 S 4 Connect the audio cable to the audio line out port on the rear of the ABOX 110 or ABOX 110 S 5 Connect th...

Page 24: ... Regardless of the power on state voltage is always present on the main board as long as the system is plugged into an active AC outlet You must disconnect the power cord to avoid damage to the internal components of the system 3 Connect the VGA cable to the VGA port on the rear of the ABOX 110 S 4 Connect the SCSI cable to the AdvanBUS port on the rear of the ABOX 110 S 5 Connect the H 2150 power...

Page 25: ...ocation Connector Function J3 LCD Inverter power connector J4 BIOS socket J5 SATA1 connector J6 SATA2 connector J7 PS 2 Keyboard Mouse connector J8 System Panel connectors J9 COM6 J10 Parallel Port connector J11 LAN USB1 USB5 connector J12 Line OUT Microphone connector J13 COM1 COM2 connector ...

Page 26: ... Light Adjust Voltage setup JP9 USB2 connector JP10 LCD Backlight Enable Voltage setup JP13 PS 2 Keyboard Mouse setup JP14 COM6 RI Function setup JP15 COM2 RI Function setup JP16 COM1 RI Function setup JP17 COM5 RI Function setup Connector Pin Assignments 12V DC Input DIN Connector PIN No Description 1 VIN 2 GND 3 VIN CG1 GND Cash Drawer Port RJ 11 Connector PIN No Description PIN No Description 1...

Page 27: ... D3 6 D4 7 D5 8 D6 9 D7 10 ACKX 11 BUSY 12 PE 13 SLCT 14 AFDX 15 ERX 16 INITX 17 SLINX 18 GND 19 GND 20 GND 21 GND 22 GND 23 GND 24 GND 25 GND VGA Port D Sub15 Connector PIN No Description PIN No Description 1 RED 2 GREEN 3 BLUE 4 NC 5 GND 6 Reserved 7 GND 8 GND 9 NC 10 GND 11 NC 12 DDC DATA 13 HSYNC 14 VSYNC 15 DDC CLK J10 J17 ...

Page 28: ...Description PIN No Description T1 LAN0 B1 5V T2 LAN0 B2 USBD1 T3 LAN1 B3 USBD1 T4 LAN2 B4 GND T5 LAN2 B5 5V T6 LAN1 B6 USBD4 T7 LAN3 B7 USBD4 T8 LAN3 B8 GND Speaker Out and MIC Connector PIN No Description Top Stereo line out Bottom Microphone input J11 J12 ...

Page 29: ...n 1 2 Short Charge 1 2 Open Clear CMOS CF Master Slave Selection PIN No Function 1 2 Short Master 1 2 Open Slave COM2 Power Select Connector PIN No Function 1 2 3 4 5 6 Short 5V Output Short RI Function Short 12V Output COM1 Power Select Connector PIN No Function 1 2 3 4 5 6 Short 5V Output Short RI Function Short 12V Output COM5 Power Select Connector PIN No Function 1 2 3 4 5 6 Short 5V Output S...

Page 30: ...24 COM6 Power Select Connector PIN No Function 1 2 3 4 5 6 Short 5V Output Short RI Function Short 12V Output JP14 ...

Page 31: ...ist Driver Driver Setup Location Intel Chipset CD Driver MB AMB 6410 Intel INF Intel Graphics CD Driver MB AMB 6410 VGA ABOX 110 IEGD_10_2_Windows Utility RealTek Audio CD Driver MB AMB 6410 Audio WDM_R202 PCI E Ethernet CD Driver MB AMB 6410 GLAN Cash Drawer CD Driver MB AMB 6410 System Driver OPOS CCOs CD Driver OPOS CCOs AdvanPOS OPOS Driver CD Driver OPOS OPOS Driver ...

Page 32: ...n the infinst_autol exe file on the CD in folder CD Driver MB AMB 6410 Intel INF 2 Click Next on the Welcome screen 3 Click Yes on the License Agreement screen 4 Click Next on the Information screen 5 When installation is complete click Finish ...

Page 33: ...file on the CD in folder CD Driver MB AMB 6410 VGA ABOX 110 IEGD_10_2_Windows Utility 2 Click Next on the Welcome screen 3 Click Yes on the License Agreement screen 4 Click Next on the Information screen 5 When installation is complete click Finish and restart the system ...

Page 34: ...er Installation 1 Locate and Run the WDM_R202 exe file on the CD in folder CD Driver MB AMB 6410 Audio WDM_R202 2 Click Next on the Welcome screen 3 When installation is complete click Finish and restart the system ...

Page 35: ...river Installation Locate and Run the setup exe file on the CD in folder CD Driver MB AMB 6410 GLAN 4 Select Modify then click Next 5 Click Default Feature and click Next 6 When installation is complete click Finish ...

Page 36: ...cate and Run the setup exe file in folder CD Driver MB AMB 6410 System Driver 2 Click Next on the Welcome screen 3 Click Install on the Ready to Install screen 4 Click Finish on the Completing installation screen A system restart is required to complete the installation ...

Page 37: ...as been installed 1 Locate and Run the OposCCOs 1_12_000 exe file in folder CD Driver OPOS CCOs 2 Click Next on the Welcome screen 3 Click Next on the ReadMe screen 4 Select the Destination Location and click Next 5 Click Yes to backup the CCO files and select backup file destination directory then click Next 6 Select Common Control Objects and OPOS Include Files then click Next 7 Click Next on th...

Page 38: ...32 8 Click Finish on the Installation Complete screen ...

Page 39: ... Driver Installation 1 Locate and Run the setup exe file in folder CD Driver OPOS OPOS Driver 2 Click Next on the Welcome screen 3 Click Install on the Setup screen 4 Click Finish on the Completing installation screen ...

Page 40: ...ULL OPEN_EXISTING FILE_ATTRIBUTE_NORMAL 0 if m_hFile INVALID_HANDLE_VALUE AfxMessageBox Unable to open Cash Drawer Device Driver return Turn on the Cash Drawer Output Fire the required solenoid bRet DeviceIoControl hFile ADV_CD_OPEN_CTL_CODE uDrawer sizeof uDrawer NULL 0 ulBytesReturned NULL if bRet FALSE ulBytesReturned 1 AfxMessageBox Failed to write to cash drawer driver CloseHandle hFile retur...

Page 41: ...zeof ReadByte ulBytesReturned NULL if bRet FALSE ulBytesReturned 1 AfxMessageBox Failed to Read from cash drawer driver CloseHandle hFile return else AfxMessageBox ReadByte Drawer Open Drawer Closed CloseHandle hFile ...

Page 42: ...l sender As System Object ByVal e As System EventArgs Handles Button1 Click Dim DeviceHandle As Integer 0 iBytesRtn As Integer Dim iRet As Integer iDrawer As Integer iStatus As Integer Const GENERIC_READ As Long H80000000 GENERIC_WRITE As Long H40000000 Const FILE_SHARE_READ As Long H1 FILE_SHARE_WRITE As Long H2 Const OPEN_EXISTING As Long H3 FILE_ATTRIBUTE_NORMAL As Long H80 Const INVALID_HANDLE...

Page 43: ... 0 0 iStatus 4 iBytesRtn 0 If iRet 0 Or iBytesRtn 1 Then Debug Print Error writing to Cash Drawer Driver Error Err LastDllError End If If iStatus 0 Then StatusText Text Cash Drawer s Closed Else StatusText Text Cash Drawer s Open End If CloseHandle DeviceHandle End If End Sub ...

Reviews: