background image

 

 - 6 

 

1. Introduction 

 

1.1  How to download data from scanner 

The major difference between the PA600 and a standard HPC/PalmPC is barcode input 
capability. The WinCE Reference Manual contains no information regarding barcode input.

 

 

This section will introduce the programming structure of the barcode sub-system and the 
programming utility library for the PA600.    Inside the PA600 there is an advanced decoding 
chip to control SE950 laser engine and to handle barcode decoding.  Below is system 
diagram for the PA600 barcode: 
 

According to the above diagram, the PA600 communicates with Decoder Chip by mean of 
serial port COM4. Its communication parameter is fixed on 38400,N,8.1.  Normally, the 
Decoder Chip is in sleep mode when COM4 is not activated.    When COM4 is activated, the 
Decoder Chip will start working, and it will decode the barcode “signal” from the laser engine 
when the trigger key is pressed.    After decoding, barcode data and its symbology type will 
be sent directly to PA600.   
 
Many programmers find it difficult to control the Decoder Chip via programming language 
alone, especially if they are not familiar with barcode and serial port controls.    Because of 
this, Unitech provides the following utility library and program for the user or application 
programmer to control the Decoder Chip:   

1. Application program “Scan2Key.exe” is a useful application program that can read 

input data from the laser scanner and then directly input the data into PA600’s 
keyboard buffer. “Scan2Key.exe” makes barcode data input simple, and can be 
especially valuable to those programmers not familiar with COM port programming. 
User program simply reads the barcode data from the keyboard. For barcode 
symbologies setting, you can run 

Scanner Setting

 from 

Control Panel

 to define all of 

supporting symbologies and delimiter.   

 
2. Utility  library:   

For programming control, PA600 provides USI.DLL to let user control scanner input, 
symbologies setting and profile controlling. Please refer to 2 for detail API lists. 
 
USI.DLL is Unitech’s new scanner function library on PA600. For backward compatible 
issue, Unitech still provide Scanner3.DLL and ScanKey3.DLL for existing 
PT930/PT930SA user to port their software into PA600, but several APIs on 
Scanner3.DLL and ScanKey3.DLL have already been removed on PA600. User can 
refer to 0and 5 for detail supporting API. 

CPU 

COM1

Advanced 

Decoder 

Chip 

SE950 

Laser 

Engine 

   

Summary of Contents for PA600

Page 1: ...PA600 Programming Manual V 1 6 1 11 2008...

Page 2: ...12 2 10 Clear scan data system buffer 13 2 11 Good read indicator 13 2 12 Wait for acknowledgement of the last sent command 13 2 13 Save setting to profiles 13 2 14 Save scanner setting into specified...

Page 3: ...le for 2D model 19 2 34 Resize image available for 2D model 19 2 35 Save image to file available for 2D model 19 2 36 Get terminator 19 2 37 Set terminator 20 2 38 Get good read sound mode and sound n...

Page 4: ...r trigger key 31 6 2 2 Turn on off Scan Engine 31 6 2 3 Get Trigger keys Status 31 6 2 4 Get Scanner Status 32 6 2 5 Check Trigger key is pressing 33 6 3 LED related function 33 6 4 LCD Backlight rela...

Page 5: ...able Disable Bluetooth Power status 39 7 2 Get BT Power Status 39 8 DYNAMIC LOAD DLL 40 9 USEFUL FUNCTION CALL WITHOUT INCLUDE SYSIOAPI DLL 41 9 1 Warm boot Cold boot and power off 41 9 2 GET DEVICE I...

Page 6: ...are not familiar with barcode and serial port controls Because of this Unitech provides the following utility library and program for the user or application programmer to control the Decoder Chip 1...

Page 7: ...7 1 2 COM definition for PA600 COM 0 USB to serial COM 1 Reserve COM 2 Bluetooth COM 3 IrDAComm COM 4 Scanner Hamster COM 5 BTModem COM 6 USB client COM 7 Reserve COM 8 Reserve COM 9 RawIR...

Page 8: ...ve custom message about msgID and wParam parameter can be one of the followings SM_ERROR_SYS Indicates a system error which is caused by a call to the system function Param contains the error code fro...

Page 9: ...9...

Page 10: ...to the working mode and reset the communication control Function call BOOL USI_Reset Return Always TRUE 2 5 Get error code Function Description Returns the error code SERR_ Function call DWORD USI_Ge...

Page 11: ...le USI H for the predefined data with BCT_ prefix Function call UINT USI_GetData LPBYTE buffer UINT len UINT type UINT USI_GetData2 LPTSTR buffer UINT len UINT type Parameter input len UINT Len specif...

Page 12: ...BAR Codabar BCT_CODE_128 Code 128 BCT_INTERLEAVED_2OF5 Interleaved 2 of 5 BCT_CODE_93 Code 93 BCT_UPC_A UPC A BCT_UPC_A_2SUPPS UPC A with 2 Supps BCT_UPC_A_5SUPPS UPC A with 5 Supps BCT_UPC_E0 UPC E B...

Page 13: ...h America Inc Scanner Settings DLLLEDCONTROL UPI300 DLL The function prototype of GoodReadLEDOn is VOID WINAPI GoodReadLEDOn BOOL fon Turn on when fon is TRUE and turn off when fon is FALSE 2 12 Wait...

Page 14: ...scanning Scan engine will be automatically triggerrd on Function call BOOL USI_StartAutoScan DWORD interval Parameter input interval DWORD Specifies the interval in milli second Note USI will call the...

Page 15: ...n TRUE enabled FALSE disable 2 21 Load Unload Scan2Key exe Function Description Load or unload Scan2Key Function call BOOL S2K_Load BOOL load DWORD timeout Parameter input load BOOL TRUE load Scan2Key...

Page 16: ...mmand decoding chip Function Description Send command to decoder chip This is a variation of command HAM_SendCommand It sends following command to Hamster note only two bytes without BCC Esc 0x80 cmd...

Page 17: ...command has been sent to and got response from scanner USI_WaitForSendEchoTO is not needed before a next continuous send command call BOOL HAM_SendCommand_Get WORD len BYTE cmdID BYTE op BYTE get DWOR...

Page 18: ..._Register to use this function Function call BOOL USI_GetScannerVersion LPTSTR model LPTSTR firmware LPTSTR sdk int blen Parameter output model LPTSTR scanner model firmware LPTSTR firmware version nu...

Page 19: ...esize the bmp to fit the cx cy rectangle and keep the ratio of the original image Return HBITMAP image 2 35 Save image to file available for 2D model Function Description Saves captured image to a fil...

Page 20: ...good read sound mode and sound name Function Description Sets Good Read Echo mode and sound file name Function call BOOL USI_SetGoodReadEcho int mode LPTSTR SoundFileName Parameter input mode int GRE...

Page 21: ...file name Function call BOOL USI_SetGoodReadEcho int mode LPTSTR SoundFileName Parameter input mode int GRE_PLAYSOUND Play pre set sound file GRE_BEEP Play default beep sound GRE_NONE No sound buffer...

Page 22: ...sc 80H ACK 06H It is from Hamster to Host If Hamster receive a command and this command do not need send message back Hamster reply the ACK NAK Esc 80H NAK 15H It is from Hamster to Host Hamster requi...

Page 23: ...pe Esc 0 4 19 m S1 BCC S1 is 0_POSITIVE 1 POSITIVE AND NEGATIVE Aim_fuction Esc 0 4 1a m S1 BCC S1 is 0_DISABLE 1 ENABLE Scan_pre_data Esc 0 L 1b m S1 Si BCC Si can be 1 to 8 CHARACTERS Scan_post_data...

Page 24: ...end 2_no calculation I2of5_ss Esc 0 4 44 m S1 BCC S1 is 0 first digit suppressed 1 last digit suppressed 2_not supressed I25_min Esc 0 4 45 m S1 BCC S1 is 2 64 10 min data len I25_max Esc 0 4 46 m S1...

Page 25: ...71 m S1 BCC S1 is S1 b0 is for Label_c_enable S1 b1 is for Label_code_cd Label_c_enable Esc 0 4 72 m S1 BCC S1 is 0_disable 1 enable Label_code_cd Esc 0 4 73 m S1 BCC S1 is 0 check digit send 1 not se...

Page 26: ...s 0 0 5s 1_1s 2 1 5s 3 2s Exchange data Esc Lh Ll a3 S1 S2 Sn BCC Expect Acknowledge Esc 80H ACK 06H Exchange the data between the host and the ICC Expected return after issuing Execute Enquiry comman...

Page 27: ...input data from the system buffer Function call INT PT_EnableBarcode VOID Return code 1 Create new thread fail 2 Cannot re enable 3 Cannot open COM4 4 Upload parameter from Hamster fail 0 OK 4 2 Disab...

Page 28: ...8H Code 128 09H Code 93 0Ah STD 25 0BH MSI 0CH EAN 128 0DH Code 32 0EH DELTA 0FH LABEL 10H PLESSEY 11H Code 11 12H TOSHIBA Return code TRUE There is barcode input FALSE No Barcode Input 4 5 Get DLL ve...

Page 29: ...ch is created by PT_EnableBarToKey Function call for VC VOID PT_DisableBarToKey VOID 5 3 Get DLL version no Function description This function is used to get DLL version number Function call for VC IN...

Page 30: ...de None 6 1 2 Set keypad utility input mode Function Description In terminal there is a utility to emulate full alpha key input called GetVK The input mode can be switched by pressing alpha key or by...

Page 31: ...e meaningful only if decode IC is enabled 6 2 1 Enable Disable Scanner trigger key Function Description This function enables disables trigger keys Function call void EnableScannerTrigger BOOL fOn Par...

Page 32: ...on Description This function returns the status of scan engine or trigger key Function call BOOL GetScannerStatus void Return code TRUE scan engine is on or trigger key is pressed FALSE scan engine is...

Page 33: ...KeyEventName TEXT KBDAlphaKeyChangeEvent define LEFT_TRIGGER_KEY 1 define RIGHT_TRIGGER_KEY 2 gKeyEvents 0 CreateEvent NULL TRUE FALSE kKeybdTriggerEventName gKeyEvents 1 CreateEvent NULL TRUE FALSE k...

Page 34: ...light Status Function Description This function returns the status of screen backlight Function call BOOL GetBacklightStatus void Return code TRUE screen backlight is on FALSE screen backlight is off...

Page 35: ...void BrightnessUp BOOL fup Parameters Input Fup BOOL TRUE adjust one step up FALSE adjust one step down Return code 6 4 6 Enable Disable LCD screen Function Description Turn on off LCD screen Functio...

Page 36: ...FALSE Slot is disable 6 5 2 Enable Disable SD slot Function Description This function enables disables SD slot Function call void EnableSDSlot BOOL bEnable Parameters Input bEnable BOOL TRUE enable s...

Page 37: ...able disable status Function call BOOL GetWLANStatus Return BOOL TRUE module is enabled FALSE module is disable 6 7 2 Enable Disable WiFi module status Function Description This function enables disab...

Page 38: ...compatible issue 6 8 1 Enable Disable Bluetooth Power status Function Description Enable Bluetooth Module Power ON OFF Function call void BT_PowerEnable BOOL bEnable Parameter Input bON BOOL TRUE Enab...

Page 39: ...status Function Description Enable Bluetooth Module Power ON OFF Function call void BT_PowerEnable BOOL bEnable Parameter Input bON BOOL TRUE Enable FALSE Disable Return code NONE 7 2 Get BT Power Sta...

Page 40: ...R sdk int blen lpfnUSI_GetScannerVersion USI_GetScannerVersion g_hUSIDLL LoadLibrary L Windows USI dll if g_hUSIDLL NULL USI_GetScannerVersion lpfnUSI_GetScannerVersion GetProcAddress g_hUSIDLL TEXT U...

Page 41: ...AR outBuf 512 szProductID 100 stringBuffer 100 BYTE szBuff 255 DWORD bytesReturned char platformID 64 pDeviceID PDEVICE_ID outBuf pDeviceID dwSize sizeof outBuf if KernelIoControl IOCTL_HAL_GET_DEVICE...

Reviews: