The text of a manual · part 4 of 5
PA600 Programming Manual, pages 28 to 36
Pages 28 to 36 of 41
The original document is the PDF (301 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Unitech PA600
Page 28
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 Full Code 39 =01H STD Code 39 =02H EAN-13 =03H UPC-A =04H EAN-8 =05H UPC-E =06H I-25 =07H CODABAR =08H 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 version no Function description: This function is used to get DLL version no. Function call: INT PT_DllVersion(void); Return : Integer
4.6. Reset all symbologies to default Function Description: This function call will reset decoder chip's symbologies setting to system default value Function call for VC: int PT_ SetToDefault (VOID) Function call for VB: PT_ SetToDefault
-
Page 29
5. ScanKey3.DLL – Backward compatible API for PT930/PT930S’s ScanKey3.dll Note : For PA600, 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 8 for programming guide.
5.1. Enable Decoder Function Description: This function will open COM4 port, create a thread to get any barcode input from Decoder Chip, and then send scanner data to keyboard buffer. User application can get input data just like standard keyboard input. Function call for VC: int PT_EnableBarToKey(VOID) Return code: =1 Create new thread fail =2 Can not re-enable =3 Can not open COM4 =4 Upload parameter from Hamster fail =0 OK
5.2. Disable Decoder Function Description: This function will close COM4 port and then remove thread which 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: INT PT_Version(void); Return : Integer
5.4. Disable laser trigger key Function Description: This function only stop trigger key to activate laser beam, so COM4 port is still open. This function call is useful when some fields is only allow keyboard input.. Function call for VC: int PT_StopScan (VOID)
5.5. Enable laser trigger key Function Description: This function only stop trigger key to activate laser beam, so COM4 port is still open. This function call is useful when some fields is only allow keyboard input.. Function call for VC:
int PT_StartScan (VOID)
5.6. Reset all symbologies to default Function Description: This function call will reset decoder chip's symbologies setting to system default value Function call for VC: int PT_ SetToDefault (VOID) Function call for VB: PT_ SetToDefault
-
Page 30
6. SysIOAPI.DLL This DLL provide hardware relative API for user to control scanner, LED, back-light and PC card slot. API functions are provided through DLL to assist programmer to write application for PA600. Note : For PA600 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 8 for programming guide.
6.1. Keypad Related Functions 6.1.1. Disable/enable power button Function Description:
To enable / disable power button Function call:
VOID DisablePowerButton (BOOL) Parameter (Input)
TRUE = Disable power button. FALSE = Enable power button. Return code: 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 following function. Function call:
void SetGetVKWorkingMode(int) Parameter (input)
0 = hide the selection window. 1 = show lower case selection window. 2 = show upper case selection window. Return code: None
6.1.3. Get keypad utility input mode Function Description:
This function is used to check alpha key input mode. Function call:
BYTE GetAlphaKeyWorkingMode(void); Return code:
0 = normal . 1 = lower case. 2 = upper case. 6.1.4. Check Alpha key is pressing Function Description:
This function is used to check if alpha key is pressed or not. Function call:
BOOL GetKeypadAlphaKeyStatus(void); Return code:
TRUE = Alpha key is pressed. FALSE = Alpha key is released. -
Page 31
6.1.5. Check Function Key status Function Description:
This function is used to check if function key is enabled or not. Function call:
BOOL GetFnKeyStatus(void) Return code:
TRUE = Function key is enabled. FALSE = Function key is disabled. 6.1.6. Enable/Disable Function Key Function Description:
This function is used to enable/disable function key. Function call:
void SetFnKeyDisable(BOOL bOff) Parameter (Input):
TRUE = Disable function key. FALSE = Enable function key. 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. Function call:
void EnableScannerTrigger(BOOL fOn) Parameter (Input)
fON: BOOL:
TRUE = enable trigger keys. FALSE = disable trigger keys.
Return code:
6.2.2. Turn on/off Scan Engine Function Description:
This function emulates trigger keys to turn scan engine on or off. functions even if trigger keys are disabled. Function call:
void SetScannerOn(BOOL fON) Parameter(Input)
fON: BOOL: Return code:
TRUE = turn scan engine on. False= turn scan engine off.
none
6.2.3. Get Trigger keys Status Function Description:
This function returns enable/disable status of trigger keys. Function call:
BOOL GetScannerTrigger(void) Return code:
TRUE = trigger keys are enabled. FALSE = trigger keys are disabled. -
It
Page 32
6.2.4. Get Scanner Status Function 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 off, or trigger key is released.
-
Page 33
6.2.5. Check Trigger key is pressing Function Description:
This function is used to check if left or right trigger key is pressed or not. Function call:
BOOL TriggerKeyStatus( int key); Parameter(Input)
key:
int:
LEFT_TRIGGER_KEY RIGHT_TRIGGER_KEY
: left trigger key : right trigger key.
Return code:
TRUE = trigger is pressed. FALSE = trigger is released. Example: #define kKeybdTriggerEventName TEXT("KeybdTriggerChangeEvent") #define kKeybdAlphaKeyEventName 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, kKeybdAlphaKeyEventName); while (1) { WaitForMultipleObjects(2, gKeyEvents, FALSE, INFINITE); TriggerKeyStatus(LEFT_TRIGGER_KEY); TriggerKeyStatus(RIGHT_TRIGGER_KEY); }
6.3. LED related function Function Description:
There are two LEDs above the screen of PA600, red and green LEDs. Only the green LED can be controlled by programmer. Function call:
void GoodReadLEDOn(BOOL fON) Parameter(Input)
fON: BOOL:
-
TRUE = turn on LED. FALSE = turn off green LED.
Page 34
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)
fON: BOOL:
TRUE = turn on screen backlight. FALSE= turn off backlight.
Return code:
6.4.2. Get Screen Backlight 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. 6.4.3. Keypad Backlight Control Function Description:
This function turns keyoad backlight on or off. Function call:
void KeypadLightOn(BOOL fON) Parameter(Input)
fON: BOOL:
TRUE = turn on keypad backlight. FALSE = turn off backlight.
Return code:
6.4.4. Get Keypad Backlight Status Function Description:
This function returns the status of keyoad backlight. Function call:
BOOL GetKeypadLightStatus(void) Return code:
TRUE = keypad backlight is on. FALSE = keypad backlight is off.
-
Page 35
6.4.5. Screen Backlight Brightness Control Function Description:
This function adjusts screen backlight brightness. Function call:
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 Function call:
void PowerOnColorLCD(BOOL fON) Parameters(Input)
fON: BOOL: Return
-
None
TRUE FALSE
= Power on LCD screen = Power off LCD screen
Page 36
6.5. SD slot related functions 6.5.1. Inquire SD slot status Function Description:
This function returns SD slot enable/disable status. Function call:
BOOL GetSDStatus() Return BOOL:
TRUE = Slot is enabled. 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 slot. FALSE = disable slot.
6.6. Enable/Disable Vibration Function Description:
This function enables/disables Vibrator. Function call:
void VibrationOn(BOOL fOn) Parameters(Input)
fOn:
-
BOOL:
TRUE FALSE
= ON. = OFF