Unitech PA500 Programming Manual

Unitech PA500 Programming Manual

Unitech pa500: software guide
Hide thumbs Also See for PA500:
Table of Contents

Advertisement

PA500
Programming Manual
V 1.2 1/15/2008

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PA500 and is the answer not in the manual?

Questions and answers

Summary of Contents for Unitech PA500

  • Page 1 PA500 Programming Manual V 1.2 1/15/2008...
  • Page 2: Table Of Contents

    INTRODUCTION... 5 How to download data from scanner ... 5 COM definition for PA500... 6 USI.DLL – UNITECH SCANNER INTERFACE DLL... 7 2.1. Register the application to the USI DLL ... 7 2.2. Unregister the application from the USI.DLL ... 8 2.3.
  • Page 3 2.24. Only send single command decoding chip ... 14 2.25. Send command to decoding chip ... 15 CONTROL COMMAND FOR DECODER CHIP... 16 SCANNER3.DLL – BACKWARD COMPATIBLE API FOR PT930/PT930S’S SCANNER3.DLL... 21 4.1. Enable Decoder... 21 4.2. Disable Decoder... 21 4.3.
  • Page 4 6.4.2. Get Screen Backlight Status ... 27 6.4.3. Screen Backlight Brightness Control ... 27 DYNAMIC LOAD DLL... 28 USEFUL FUNCTION CALL - WITHOUT INCLUDE SYSIOAPI.DLL... 29 8.1. Warm-boot, Cold-boot and power off... 29 8.2. GET DEVICE ID ... 29 UPDATE NOTES ... 30...
  • Page 5: Introduction

    This section will introduce the programming structure of the barcode sub-system and the programming utility library for the PA500. Inside the PA500 there is an advanced decoding chip to control SE900 laser engine and to handle barcode decoding. Below is system...
  • Page 6: Com Definition For Pa500

    1.2 COM definition for PA500 COM 1 Reserve COM2 Scanner (Hamster) COM 3 IrDAComm COM 4 Bluetooth Modem COM 5 RawIR COM 6 BTModem UART...
  • Page 7: Usi.dll - Unitech Scanner Interface Dll

    2. USI.DLL – Unitech Scanner Interface DLL Note : For PA500 programming, it need to dynamically load DLL for using Unitech built-in DLL (Unitech will not provide *.H and *.LIB for compiler for mobile 5.0 OS), please refer to Chapter 7 for programming guide.
  • Page 8: Unregister The Application From The Usi.dll

    "CHECKPARITY"="1" 2.2. Unregister the application from the USI.DLL Function Description: Unregister the application from the DLL. It will close the scanner port, and by Function call: Return code: None 2.3. Enable / Disable Scanner Function Description: To start or stop USI function. This function is useful for application to temporarily Function call: BOOL USI_EnableScan(BOOL bStatus);...
  • Page 9: Get Scan Data

    2.7. Get scan data Function Description: Retrieves the scan data into the buffer. Returns the length of characters. It also returns the barcode type if type is not NULL. Return 0 means that the buffer is too short to hold the data.
  • Page 10: Get Length Of Scanned Data

    UINT 2.8. Get length of scanned data Function Description: Returns the data length of the scan data. When allocate the memory to hold the scan data, add at least one additional byte for string terminator. Function call: UINT Return: UNIT : data length 2.9.
  • Page 11: Clear Scan Data System Buffer

    (UPI300.DLL is an example) to turn on and off the LED. If the DLL is not defined or the function is not found, USI will bypass the call of GoodReadLEDOn. [HKEY_LOCAL_MACHINE\SOFTWARE\Unitech America Inc.\Scanner\Settings] "DLLLEDCONTROL"="UPI300.DLL" The function prototype of GoodReadLEDOn is: VOID WINAPI GoodReadLEDOn(BOOL fon);...
  • Page 12: Save Scanner Setting Into Specified File

    (UPI300.DLL is an example) to start and stop the scanner. If the DLL is not defined or the function is not found, then auto scanning is not available. [HKEY_LOCAL_MACHINE\SOFTWARE\Unitech America Inc.\Scanner\Settings] "DLLSCANNERCONTROL"="UPI300.DLL" The function prototype of SetScannerOn is: VOID WINAPI SetScannerOn(BOOL fon);...
  • Page 13: Stop Auto Scanning Function

    2.17. Stop auto scanning function Function Description: Function call: 2.18. Check if auto scanning is enable Function Description: Function call: Return: 2.19. Check if Scan2Key.exe program is running or not Function Description: Function call: Return: 2.20. Test if Scan2Key is enabled Function Description: Function call: Return:...
  • Page 14: Enable/Disable Scan2Key

    2.22. Enable/Disable Scan2Key Function Description: Function call: Parameter: (input) Parameter: (output) Return: 2.23. Send scanner command to decoding chip Function Description: Parameter: (input) Return: TRUE = Indicates the command has been successfully sent to queue to output. 2.24. Only send single command decoding chip Function Description: Function call: Parameter: (input)
  • Page 15: Send Command To Decoding Chip

    2.25. Send command to decoding chip Function Description: Function call: Parameter: (input) Parameter: (output) Return: TRUE = indicates the command has been successfully sent to queue to output. Send command to decoder chip. This is a variation of command It will read a number of parameters and packet them as in following format and send it to decoder chip.
  • Page 16: Control Command For Decoder Chip

    3. Control command for decoder chip Important: This chapter describes low level command for scanner control function. If you already USI to do scanner programming, you don’t need to care about this chapter. In general, it is not suggested to use level command to control scanner, because there are timing issue on serial communication programming , and it is always need communication expert to do that and it is hard to explain it on document.
  • Page 17 Beep Esc,0,4,3,m,S1,BCC block_delay Esc,0,4,4,m,S1,BCC char_delay Esc,0,4,5,m,S1,BCC Function_code Esc,0,4,6,m,S1,BCC No meaning for you Capslock Esc,0,4,7,m,S1,BCC No meaning for you Language Esc,0,4,8,m,S1,BCC No meaning for you Baud_rate Esc,0,4,0D,m,S1,BCC No meaning for you Parity Esc,0,4,0E,m,S1,BCC No meaning for you Data_bits Esc,0,4,0F,m,S1,BCC No meaning for you Handshake Esc,0,4,10,m,S1,BCC No meaning for you...
  • Page 18 Mterminator Esc,0,4,31,m,S1,BCC No meaning for you Sentinal Esc,0,4,32,m,S1,BCC No meaning for you Track_selection Esc,0,4,33,m,S1,BCC No meaning for you T2_account_only Esc,0,4,34,m,S1,BCC No meaning for you Separator Esc,0,4,35,m,S1,BCC No meaning for you Must_have_data Esc,0,4,36,m,S1,BCC No meaning for you Track1_sequence Esc,0,L,37,m,S1,…Si,BCC No meaning for you Track2_sequence Esc,0,L,38,m,S1,…Si,BCC No meaning for you...
  • Page 19 Msi_pleasey Esc,0,4,5b,m,S1,BCC Msi_p_enable Esc,0,4,5c,m,S1,BCC Msi_pleasey_cd Esc,0,4,5d,m,S1,BCC Msi_p_cdmode Esc,0,4,5e,m,S1,BCC Msi_pleasey_min Esc,0,4,5f,m,S1,BCC Msi_pleasey_max Esc,0,4,60,m,S1,BCC Code93 Esc,0,4,61,m,S1,BCC Code93_min Esc,0,4,62,m,S1,BCC Code93_max Esc,0,4,63,m,S1,BCC Code11 Esc,0,4,64,m,S1,BCC Code11_enable Esc,0,4,65,m,S1,BCC Code11_cdnumber Esc,0,4,66,m,S1,BCC Code11_cdsend Esc,0,4,67,m,S1,BCC Code11_min Esc,0,4,68,m,S1,BCC Code11_max Esc,0,4,69,m,S1,BCC Codabar_set Esc,0,4,6a,m,S1,BCC Codabar_enable Esc,0,4,6b,m,S1,BCC Codabar_ss Esc,0,4,6c,m,S1,BCC Codabar_cd Esc,0,4,6d,m,S1,BCC Codabar_CLSI Esc,0,4,6e,m,S1,BCC Codabar_min Esc,0,4,6f,m,S1,BCC Codabar_max...
  • Page 20 Supplement_two Esc,0,4,88,m,S1,BCC Supplement_five Esc,0,4,89,m,S1,BCC Supplement_mh Esc,0,4,8a,m,S1,BCC Supplement_ssi Esc,0,4,8b,m,S1,BCC Delta_code_set Esc,0,4,8c,m,S1,BCC Delta_c_enable Esc,0,4,8d,m,S1,BCC Delta_code_cdc Esc,0,4,8e,m,S1,BCC Delta_code_cds Esc,0,4,8f,m,S1,BCC Get_version Esc,0,3,90,2,BCC DumpSetting Esc,Lh,Ll,91,m,S1...Si,BC EAN128Brace Esc,0,4,92,m,S1,BCC Remove AimingTime Esc,0,4,93,m,S1,BCC Exchange data Esc,Lh,Ll,a3,S1,S2,...,Sn, Note: Hamster save these commands to buffer and do not execute until it receives an Execute command (Esc,ENQ).
  • Page 21: Enable Decoder

    4. Scanner3.DLL – Backward compatible API for PT930/PT930S’s Scanner3.dll Note : For PA500, it need to dynamically load DLL for using Unitech built-in DLL (Unitech will not provide *.H and *.LIB for compiler), please refer to Chapter 7 for programming guide.
  • Page 22: Read Barcode Data

    4.4. Read barcode data Function Description: Get input barcode data and its type from system buffer. Function call: BOOL PT_GetBarcode( TCHAR *szBarcodeBuffer,TCHAR *cType); Parameter: (output) szBarcodeBuffer : string buffer for storing input data cType : Type of Input data =00H =01H =02H =03H...
  • Page 23: Disable Decoder

    5. ScanKey3.DLL – Backward compatible API for PT930/PT930S’s ScanKey3.dll Note : For PA500, it need to dynamically load DLL for using Unitech built-in DLL (Unitech will not provide “USI.H” and “USI.LIB” for compiler), please refer to Chapter 7 for programming guide.
  • Page 24: Sysioapi.dll

    API functions are provided through DLL to assist programmer to write application for PA500. Note : For PA500 programming, it need to dynamically load DLL for using Unitech built-in DLL (Unitech will not provide *.H and *.LIB for compiler), please refer to Chapter 7 for programming guide.
  • Page 25: Scanner Related Functions

    6.2. Scanner Related Functions To save power, the decoder IC is disabled when scanner is not in use. It can be enabled through USI functions. Following functions are meaningful only if decode IC is enabled. 6.2.1. Enable/Disable Scanner trigger key Function Description: This function enables/disables trigger keys.
  • Page 26: Check Trigger Key Is Pressing

    = CreateEvent(NULL, TRUE, FALSE, kKeybdAlphaKeyEventName); while (1) 6.3. LED related function Function Description: There are two LEDs above the screen of PA500, red and green LEDs. Only the green LED can be controlled by programmer. Function call: void GoodReadLEDOn(BOOL fON)
  • Page 27: Lcd/Backlight Related Function

    6.4. LCD/Backlight related function There are two backlight controls, screen backlight and keypad backlight. They are controlled separately. For screen backlight, you can adjust brightness of backlight also. 6.4.1. Screen Backlight Control Function Description: This function turns screen backlight on or off. Function call: void BacklightOn(BOOL fON) Parameter(Input)
  • Page 28: Dynamic Load Dll

    7. Dynamic Load DLL Compiler would not load the DLL while use dynamic load DLL, it help user to load the DLL if it exists while the application executed. The follow is the example. Note: Even user does not need include the header and lib file but need to know the function definition. ////////////////////////////////////////////////////////////////////////////////////////// HINSTANCE g_hUSIDLL;...
  • Page 29: Useful Function Call - Without Include Sysioapi.dll

    VK_OFF, bScan, KEYEVENTF_SILENT, dwExtraInfo ); keybd_event( VK_OFF, bScan, KEYEVENTF_KEYUP, dwExtraInfo ); 8.2. Get Device ID In PA500, an unique ID had been burnt into terminal, user can check it by pressing “Func”+”9”. The sample code for read device ID as follow, //////////////////////////////////////////////////////////////// HWND hDeviceId = GetDlgItem(hWnd, IDC_DEVICEID);...
  • Page 30: Update Notes

    9. Update notes V1.0 The first version V1.1 COM port error correction on section 1.2 V1.2 Change logo...

Table of Contents