The text of a manual · part 3 of 5
PA600 Programming Manual, pages 19 to 27
Pages 19 to 27 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 19
2.33. Get image (available for 2D model) Function Description: Retrieves captured image in bitmap format, and returns image size. Function call: HBITMAP USI_GetImageBitmap(SIZE* imagesize); Parameter: (output) imagesize: SIZE : Bitmap image size Return: HBITMAP : image
2.34. Resize image (available for 2D model) Function Description: Resizes a bitmap. Function call: HBITMAP USI_ResizeBitmap(HBITMAP hbmp, int cx, int cy, BOOL keepratio); Parameter: (input) hbmp: HBITMAP : the bitmap handle needs to be resized. cx: int: : cx define new width dimension of the bmp. cy int: : cy define new height dimension of the bmp. keepratio: BOOL: : If keepratio is true, it will resize 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 file. The image format is determined by the file extension name, which can be .bmp, .jpg, .jpeg, .tif, .tiff or .raw. The compressionfactor is used for jpeg format. Function call: BOOL USI_SaveImageToFile(LPCTSTR filename, int compressionfactor); Parameter: (input) filename: LPCTSTR : File extension name defines format. HHP, SSI support .bmp, .jpg, and .tif. Tohken supports .bmp and .jpg. compressionfactor: int : compressionfactor is used for when format is jpg. Return: Always True.
2.36. Get terminator Function Description: Returns terminator. The returned constant value is defined in USI_SetTerminator. Function call: int USI_GetTerminator(); Return: Int : terminator
-
Page 20
2.37. Set terminator Function Description: Sets terminator. Function call: BOOL USI_SetTerminator(int terminator); Parameter: (input) terminator: int : TERMINATOR_ENTER TERMINATOR_RETURN TERMINATOR_LINEFEED TERMINATOR_NONE TERMINATOR_ENTERENTER Return: Always True.
: enter (CR/LF) : return (CR) : linefeed (LF) : no terminator : double enter (CR/CR)
2.38. Get good read sound mode and sound name Function Description: Returns Good-Read-Echo mode and sound file name. Function call: int USI_GetGoodReadEcho(LPTSTR buffer, UINT blen); Parameter: (input) buffer: LPTSTR : returns sound file name which included path blen: UINT : defines length of the buffer. Return: Int: GRE_PLAYSOUND : Play pre-set sound file GRE_BEEP : Play default beep sound GRE_NONE : No sound.
2.39. Set 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_PLAYSOUND : Play pre-set sound file GRE_BEEP : Play default beep sound GRE_NONE : No sound. buffer: LPTSTR : sound file name which included path Return: It returns true when successful, false if mode is n/a.
2.40. Set previewsize (only for 2D engine) Function Description: Defines how large is the window for image preview. Function call: void USI_SetPreviewSize (SIZE size); Parameter: (input) size: SIZE : Size of image preview window
2.41. Set previewsize time-out (only for 2D engine) Function Description: Set timeout for preview in seconds. When in taking image preview mode, this timeout will stop preview and trigger to capture the image. Function call: void USI_SetPreviewTimeout (DWORD timeout); Parameter: (input) timeout: DWORD : timeout in seconds -
Page 21
2.42. Set 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_PLAYSOUND : Play pre-set sound file GRE_BEEP : Play default beep sound GRE_NONE : No sound. buffer: LPTSTR : sound file name which included path Return: It returns true when successful, false if mode is n/a.
-
Page 22
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. When Host prepare to send a command to hamster, it must first check CTS, if CTS is high, then Host must set the RTS to high then clear RTS to low to wake up the Hamster.
Special Command for control command Control
Format Esc,80H+SOH(01H)
Release Execute/ Enquiry
Esc,80H+EOT(04H) Esc,80H+ENQ(05H)
ACK
Esc,80H+ACK(06H)
NAK
Esc,80H+NAK(15H)
Comment Let Hamster enter slaving status. At this status Hamster just receives commands and executes it until it receives Release command or timeout (about 10s). Otherwise, the timeout is about 1s as the interval of commands. Let Hamster exit from slaving status. Let Hamster execute the previous saved command and check hamster if there is a result of previous executed command to send to Host. If previous saved command have already executed and no result to send, hamster do not reply until there is a result. If Host receive a result but the BCC is wrong, it can re-send ENQ to re-send result again. It is from Hamster to Host. If Hamster receive a command and this command do not need send message back, Hamster reply the ACK. It is from Hamster to Host. Hamster require the Host to re-send command again, normally when received a wrong BCC, it can send the NAK. The Hamster sends back NAK whenever it receives a no sense command.
COMMAND FROM HOST TO HMASTER Command format:Esc,Lh,Ll,n,m,S1,...,Si,BCC Here: Esc is Escape code(H'1B) Lh/Ll is command's length when the Lh.b7 is 0, Lh is high byte, Ll is low byte, count from n to BCC. When Lh.b7=1 it is a two bytes special command. n is command ID m is operation: Normally for setting commands the 0 means setting, 1 default, 2 read current setting, 3 special operation. When m=1 or 2, the S1 should be 0 for bits or one character setting. If the setting is a string, like pre_amble, the read or default command should not contain any Si byte. The special meaning in a command please refers the command definition. Si is setting/read data. BCC: it equals to XOR of all the bytes before the BCC. Conventions: S1.bj means the number j bit of byte S1. The expression 1~64:2 means that the number is between 1 and 64, the default is 2. Notice: Any interval in a command transmit can not exceed 1 second. Command Format Comment Initial/ Warm Esc,0,2,0,BCC Hamster initializes the ports and flags according to the setting start in RAM. Default Esc,0,2,1,BCC Reset setting in RAM and initialize Mpu_idle Esc,0,4,2,m,S1,BCC S1 is 0~3:0 is sleep mode,1 is watch mode, 2_is standby mode. -
Page 23
Beep block_delay char_delay Function_code
Esc,0,4,3,m,S1,BCC Esc,0,4,4,m,S1,BCC Esc,0,4,5,m,S1,BCC Esc,0,4,6,m,S1,BCC
Capslock
Esc,0,4,7,m,S1,BCC
S1 0 none,1 low,2_medium,3 high,4 low/high,5high/low S1 is 0_10ms,1 50ms,2 100ms,3 500ms,4 1s,5 3s S1 is 0_none,1 1ms,2 5ms,3 10ms,4 20ms,5 50ms S1 is 0 off,1_on
No meaning for you
S1 is 0_auto trace,1 lower case,2 upper case
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
S1 is 0_U.S.,1 U.K.,2 Swiss,3 Swedish, 4 Spanish,5 Norwegian,6 Italian,7 German,8 French,9 Alt Key Mode,A Danish S1 is 0 300,1 600,2 1200,3 2400,4 4800, 5 9600,6 19200,7_38400 S1 is 0 EVEN,1 ODD,2 MARK,3 SPACE,4_NONE
No meaning for you
Data_bits
Esc,0,4,0F,m,S1,BCC
S1 is 0 7,1_8BIT
No meaning for you
Handshake
Esc,0,4,10,m,S1,BCC No meaning for you
Ack_nak
Esc,0,4,11,m,S1,BCC
BCC_char
Esc,0,4,12,m,S1,BCC
S1 is 0_IGNORE,1 RTS ENABLE AT POWERUP,2 RTS ENABLE IN COMMUNICATION S1 is 0_OFF,1 ON
No meaning for you
S1 is 0_OFF,1 ON
No meaning for you Data_direction
Esc,0,4,13,m,S1,BCC No meaning for you
Time_out
Esc,0,4,14,m,S1,BCC
S1 is =0_SEND TO HOST,1 SEND TO HOST AND TERMINAL,2 SEND TO TERMINAL S1 is 0_1S,1 3S,2 10S,3 UNLIMITED
No meaning for you
Terminator
Esc,0,4,15,m,S1,BCC
Code_id Scan_mode
Esc,0,4,16,m,S1,BCC Esc,0,4,17,m,S1,BCC Esc,0,4,18,m,S1,BCC
Label_type Aim_fuction
Esc,0,4,19,m,S1,BCC Esc,0,4,1a,m,S1,BCC
Verification
Scan_pre_data
Esc,0,L,1b,m,S1,…Si,BCC
Scan_post_data
Esc,0,L,1c,m,S1,…Si,BCC
Define_code39f
Define_EAN128
Esc,0,4,1d,m,S1,BCC Esc,0,4,1e,m,S1,BCC Esc,0,4,1f,m,S1,BCC Esc,0,4,20,m,S1,BCC Esc,0,4,21,m,S1,BCC Esc,0,4,22,m,S1,BCC Esc,0,4,23,m,S1,BCC Esc,0,4,24,m,S1,BCC Esc,0,4,25,m,S1,BCC Esc,0,4,26,m,S1,BCC Esc,0,4,27,m,S1,BCC Esc,0,4,28,m,S1,BCC Esc,0,4,29,m,S1,BCC Esc,0,4,2a,m,S1,BCC Esc,0,4,2b,m,S1,BCC Esc,0,4,2c,m,S1,BCC Esc,0,4,2d,m,S1,BCC Esc,0,4,2e,m,S1,BCC Esc,0,4,2f,m,S1,BCC Esc,0,4,30,m,S1,BCC
Mterminator
Esc,0,4,31,m,S1,BCC
Define_code39s Define_EAN13
Define_UPCA Define_EAN8 Define_UPCE Define_I25 Define_CDB Define_C128 Define_C93 Define_S25 Define_MSI Define_C11 Define_C32 Define_DELTA Define_LABEL Define_PLESSEY Define_TELEPEN Define_TOSHIBA
-
S1 is B1B0=0_ENTER(CR/LF),1 FIELD EXIT(CR),2 RETURN(LF),3 NONE S1 is 0_OFF,1 ON S1 is 0_OFF,1~7 1 to 7 times verification S1 is 0_TRIGGER MODE,1 FLASH_MODE,2 MULTISCAN MODE,3 ONE PRESS ONE SCAN,4~7 reserved S1 is 0_POSITIVE,1 POSITIVE AND NEGATIVE S1 is 0_DISABLE,1 ENABLE Si can be 1 to 8 CHARACTERS Si can be 1 to 8 CHARACTERS define Code 39 full ASCII ID:Here S1 is 1 CHARACTER define Code 39 standard ID:Here S1 is 1 CHARACTER define EAN13 ID:Here S1 is 1 CHARACTER define UPC A ID: Here S1 is 1 CHARACTER define EAN8 ID:Here S1 is 1 CHARACTER define UPC E ID:Here S1 is 1 CHARACTER define I25 ID:Here S1 is 1 CHARACTER define Codabar ID:Here S1 is 1 CHARACTER define Code128 ID:Here S1 is 1 CHARACTER define Code93 ID:Here S1 is 1 CHARACTER define S25 ID:Here S1 is 1 CHARACTER define MSI ID:Here S1 is 1 CHARACTER define Code11 ID:Here S1 is 1 CHARACTER define Code32 ID:Here S1 is 1 CHARACTER define Delta ID:Here S1 is 1 CHARACTER define Label code ID:Here S1 is 1 CHARACTER define Plessey ID:Here S1 is 1 CHARACTER define Telepen ID:Here S1 is 1 CHARACTER define Toshiba ID:Here S1 is 1 CHARACTER define EAN128 ID:Here S1 is 1 CHARACTER;IF H'FF, THEN USE "]C1" Here S1 is 0_ENTER,1 NONE
Page 24
No meaning for you
Sentinal
Esc,0,4,32,m,S1,BCC
S1 is 0 not send,1 send
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
Separator
Esc,0,4,35,m,S1,BCC
Here S1 is =0_ALL TRACKS,1 TRACK1 AND TRACK2,2 TRACK1 AND TRACK3,3 TRACK2 AND TRACK3,4 TRACK1,5 TRACK2,6 TRACK3 S1 is 0_NO,1 YES
No meaning for you
S1 is 1 CHARACTER
No meaning for you Must_have_data Track1_sequence Track2_sequence
No meaning for you Esc,0,L,37,m,S1,…Si,BCC No meaning for you Esc,0,L,38,m,S1,…Si,BCC No meaning for you
Code39_set
Esc,0,4,39,m,S1,BCC
Code39_enable
Esc,0,4,3a,m,S1,BCC Esc,0,4,3b,m,S1,BCC Esc,0,4,3c,m,S1,BCC Esc,0,4,3d,m,S1,BCC Esc,0,4,3e,m,S1,BCC Esc,0,4,3f,m,S1,BCC Esc,0,4,40,m,S1,BCC
Code39_sandard
Code39_cd: Code39_ss Code39_min Code39_max I2of5_set I2of5_enable
I2of5_cd I2of5_ss
Esc,0,4,41,m,S1,BCC Esc,0,4,42,m,S1,BCC Esc,0,4,43,m,S1,BCC Esc,0,4,44,m,S1,BCC
I25_min I25_max S2of5_set
Esc,0,4,45,m,S1,BCC Esc,0,4,46,m,S1,BCC Esc,0,4,47,m,S1,BCC
S2of5_enable
S2of5_cd
Esc,0,4,48,m,S1,BCC Esc,0,4,49,m,S1,BCC Esc,0,4,4a,m,S1,BCC
S25_min S25_max Code32_set
Esc,0,4,4b,m,S1,BCC Esc,0,4,4c,m,S1,BCC Esc,0,4,4d,m,S1,BCC
Code32_enable
Esc,0,4,4e,m,S1,BCC Esc,0,4,4f,m,S1,BCC Esc,0,4,50,m,S1,BCC Esc,0,4,51,m,S1,BCC
I2of5_fixlength
S2of5_fixlength
Code32_sc Code32_lc Telepen Telepen_enable Telepen_charset
Ean128 Ean128_enable
Ean128_id Ean128_func1
Code128 Code128_min Code128_max Msi_pleasey -
Esc,0,4,36,m,S1,BCC
Esc,0,4,52,m,S1,BCC Esc,0,4,53,m,S1,BCC Esc,0,4,54,m,S1,BCC Esc,0,4,55,m,S1,BCC Esc,0,4,56,m,S1,BCC Esc,0,4,57,m,S1,BCC Esc,0,4,58,m,S1,BCC Esc,0,4,59,m,S1,BCC Esc,0,4,5a,m,S1,BCC Esc,0,4,5b,m,S1,BCC
S1 is 0 YES,1_NO Si can be 1 to 16 CHARACTERS Si can be 1 to 8 CHARACTERS S1.B0 is for Code39_enable,S1.B1 is for Code39_standard,S1.B3B2 for Code39_cd,S1.B4 Code39_ss S1 is 0 disable,1_enable S1 is 0_full ASCII,1 standard S1 is 0 calculate&send,1 calculate¬ send,2_not calculate Here S1 is 0 SS send,1_SS not send S1 is 0~48:0 (min<=data len) S1 is 0~48:48 (data len<=max) S1 is S1.B0 is for I2of5_enable,S1.B1 is for I2of5_fixlength,S1.B3B2 is for I2of5_cd,S1.B5B4 is for I2of5_ss S1 is =0 disable,1_enable S1 is =0 on,1_off (record first 3 record len) S1 is =0 calculate&send,1 calculate¬ send,2_no calculation S1 is 0 first digit suppressed,1 last digit suppressed,2_not supressed S1 is 2~64:10 (min<=data len) S1 is 2~64:64 (data len<=max) S1 is S1.b0 is for S2of5_enable,S1.b1 is for S2of5_fixlength,S1.b3b2 is for S2of5_cd S1 is 0_disable,1 enable S1 is 0_on,1 off (record first 3 record len) S1 is 0 calculate&send,1 calculate¬ send, 2_not calculate S1 is 1~48:4 (min<=data len) S1 is 1~48:48 (data len<=max) S1 is S1.b0 is for Code32_enable,S1.b1 is for Code32_sc,S1.b2 is for Code32_lc S1 is 0_disable,1 enable S1 is 0_leading char send,1 not send S1 is 0_tailing char send,1 not send S1 is S1.b0 is for Telepen_enable,S1.b1 is for Telepen_charset S1 is 0_disable,1 enable S1 is 0_standard,1 numeric S1 is S1.b0 is for Ean128_id, S1.b1 is for Ean128_id S1 is 0 disable,1_enable S1 is 0 ID disable,1_ID enable S1 is 1 char S1 is 0 disable,1_enable S1 is 1~64:1 (min<=data len) S1 is 1~64:64 (data len<=max) S1 is S1.b0 is for Msi_p_enable,S1.b1 is for Msi_pleasey_cd,
Page 25
Msi_p_enable
Esc,0,4,5c,m,S1,BCC
Msi_pleasey_cd
Esc,0,4,5d,m,S1,BCC Esc,0,4,5e,m,S1,BCC
Msi_p_cdmode Msi_pleasey_min Msi_pleasey_max
Code93 Code93_min Code93_max Code11 Code11_enable Code11_cdnumber Code11_cdsend
Code11_min Code11_max Codabar_set Codabar_enable
Codabar_ss Codabar_cd Codabar_CLSI
Codabar_min Codabar_max Label_code Label_c_enable Label_code_cd
Upc_a_set Upc_a_enable
Upc_a_ld Upc_a_cd Upc_e_set Upc_e_enable
Upc_e_ld Upc_e_cd Upc_e_expand
Upc_e_nsc Ean_13_set Ean_13_enable
Ean_13_ld Ean_13_cd Ean_13_bookland
Ean_8_set Ean_8_enable
Ean_8_ld Ean_8_cd Supplement_set
-
Esc,0,4,5f,m,S1,BCC Esc,0,4,60,m,S1,BCC Esc,0,4,61,m,S1,BCC Esc,0,4,62,m,S1,BCC Esc,0,4,63,m,S1,BCC Esc,0,4,64,m,S1,BCC Esc,0,4,65,m,S1,BCC Esc,0,4,66,m,S1,BCC Esc,0,4,67,m,S1,BCC Esc,0,4,68,m,S1,BCC Esc,0,4,69,m,S1,BCC Esc,0,4,6a,m,S1,BCC Esc,0,4,6b,m,S1,BCC Esc,0,4,6c,m,S1,BCC Esc,0,4,6d,m,S1,BCC Esc,0,4,6e,m,S1,BCC Esc,0,4,6f,m,S1,BCC Esc,0,4,70,m,S1,BCC Esc,0,4,71,m,S1,BCC Esc,0,4,72,m,S1,BCC Esc,0,4,73,m,S1,BCC Esc,0,4,74,m,S1,BCC Esc,0,4,75,m,S1,BCC Esc,0,4,76,m,S1,BCC Esc,0,4,77,m,S1,BCC Esc,0,4,78,m,S1,BCC Esc,0,4,79,m,S1,BCC Esc,0,4,7a,m,S1,BCC Esc,0,4,7b,m,S1,BCC Esc,0,4,7c,m,S1,BCC Esc,0,4,7d,m,S1,BCC Esc,0,4,7e,m,S1,BCC Esc,0,4,7f,m,S1,BCC Esc,0,4,80,m,S1,BCC Esc,0,4,81,m,S1,BCC Esc,0,4,82,m,S1,BCC Esc,0,4,83,m,S1,BCC Esc,0,4,84,m,S1,BCC Esc,0,4,85,m,S1,BCC Esc,0,4,86,m,S1,BCC Esc,0,4,87,m,S1,BCC
S1.b3b2 is for Msi_p_cdmode S1 is 0_disable,1 enable S1 is 0 check digit send,1_not send S1 is 0 check digit double module 10,1 check digit module 11 plus 10,2 check digit single module 10 S1 is 1~64:1 (min<=data len) S1 is 1~64:64 (data len<=max) S1 is 0 disable,1_enable S1 is 1~48:1 (min<=data len) S1 is 1~48:48 (data len<=max) S1 is S1.b0 is for Code11_enable,S1.b1 is for Code11_cdnumber,S1.b2 Code11_cdsend S1 is 0_disable, 1 enable S1 is 0 one check digit,1_two check digits S1 is 0 check digit send,1_not send S1 is 1~48:1 (min<=data len) S1 is 1~48:48 (data len<=max) S1 is S1.b0 is for Codabar_enable, S1.b1 is for Codabar_ss, S1.b3b2 is for Codabar_cd, S1.b4 is for Codabar_CLSI S1 is 0_disable,1 enable S1 is 0 start&stop char send,1_not send S1 is 0 check digit calculate&send,1 check digit calculate but not send,2_check digit not calculate S1 is 0 CLSI format on,1_off S1 is 3~48:3 (min<=data len) S1 is 3~48:48 S1 is S1.b0 is for Label_c_enable,S1.b1 is for Label_code_cd S1 is 0_disable,1 enable S1 is 0 check digit send,1 not send S1 is S1.b0 is for Upc_a_enable,S1.b1 is for Upc_a_ld,S1.b2 is for Upc_a_cd S1 is 0 disable,1_enable S1 is 0_leading digit send,1 not send S1 is 0_check digit send,1 not send S1 is S1.b1 is for Upc_e_enable,S1.b2 is for Upc_e_ld,S1.b3 is for Upc_e_cd,S1.b4 is for Upc_e_expand,S1.b0 is for Upc_e_nsc S1 is 0 disable,1_enable S1 is 0_leading digit send,1 not send S1 is 0 check digit send,1_not send S1 is 0 zero expansion on,1_off S1 is 0_disable,1 enable S1 is S1.b0 is for Ean_13_enable,S1.b1 is for Ean_13_ld,S1.b2 is for Ean_13_cd,S1.b3 is for Ean_13_bookland S1 is 0 disable,1_enable S1 is 0_leading digit send,1 not send S1 is 0_check digit send,1 not send S1 is 0 bookland EAN enable,1_ disable S1 is S1.b0 is for Ean_8_enable,S1.b1 is for Ean_8_ld,S1.b2 is for Ean_8_cd S1 is 0 disable,1_enable S1 is 0_leading digit send,1 not send S1 is 0_check digit send,1 not send S1 is S1.b0 is for Supplement_two, s1.b1 is for Supplement_five,S1.b2 is for Supplement_mh, S1.b3 is for
Page 26
Supplement_ssi. Supplement_two
EAN128Brace Remove AimingTime
Esc,0,4,92,m,S1,BCC
S1 is 0_off,1 on S1 is 0_off,1 on S1 is 0_transmit if present,1 must present S1 is 0 Space been inserted, 1_Space not been inserted S1 is S1.b0 is for Delta_c_enable,S1.b1 is for Delta_code_cdc,S1.b2 is for Delta_code_cds S1 is 0_disable,1 enable S1 is 0_check digit calculate,1 not calculate S1 is =0 check digit send,1_not send Get firmware version. Lh/Ll is command length. Si is in the range of s1 to S255.m=0 is download setting, m=1 is reset the setting area into FF. m=2 is upload setting. Actually you just need the format as bellow: Download: Esc,1,02,91,0,s1,...,s255,BCC Upload: Esc,0,3,91,2,BCC S1 is =0_disable,1 enable(Remove the brace)
Esc,0,4,93,m,S1,BCC
S1 is =0 0.5s,1_1s,2 1.5s 3 2s
Exchange data
Esc,Lh,Ll,a3,S1,S2,....,Sn, !" BCC !" !"
Supplement_five Supplement_mh Supplement_ssi Delta_code_set Delta_c_enable Delta_code_cdc Delta_code_cds
Get_version DumpSetting
Esc,0,4,88,m,S1,BCC Esc,0,4,89,m,S1,BCC Esc,0,4,8a,m,S1,BCC Esc,0,4,8b,m,S1,BCC Esc,0,4,8c,m,S1,BCC Esc,0,4,8d,m,S1,BCC Esc,0,4,8e,m,S1,BCC Esc,0,4,8f,m,S1,BCC Esc,0,3,90,2,BCC Esc,Lh,Ll,91,m,S1...Si,BC C
Expect Acknowledge (Esc,80H+ACK(06H)) Exchange the data between the host and the ICC. Expected return after issuing Execute/Enquiry command are: Esc,Lh,Ll,0xa3,AH,data,BCC Here: AH=0 Success =1 Timeout =2 No card present data: Response data and status word Note: Hamster save these commands to buffer and do not execute until it receives an Execute command (Esc,ENQ). Hamster execute the command after receive an “Esc,ENQ” then send back a reply. The Max. Length of data is 264. The m and the reply define as following:
DATA TO HOST FROM HAMSTER Data format: Code_number,Lh,Ll,string Here: The Lh/Ll is string length, Lh is high byte, Ll is low byte, The string length is excluded the Code_number and Lh/Ll. The string contains the Code ID, pre_amble, scanned data,post_amble, and terminator. Code_number is equal to following number plus H’80. 0 Code 39 full ASCII 1 Code 39 standard or EDP Code 2 EAN 13 3 UPC A 4 EAN 8 5 UPC E 6 I25 7 Codabar 8 Code 128 9 Code 93 10 S25 11 MSI 12 EAN 128 13 Code 32 14 Delta 15 Label 16 Plessey 17 Code 11 18 Toshiba 19 reserved 20 Track 1 21 Track 2 22 Track 3 23 More than 1 track 24 reserved 25 RS232 26 reserved 27 reserved 28 reserved 29 reserved 30 reserved 31 reserved 32 reserved 33 reserved
-
Page 27
4. Scanner3.DLL – Backward compatible API for PT930/PT930S’s Scanner3.dll Note : For PA600, 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.
4.1. Enable Decoder Function Description: This function will open COM4 port, create a thread to get any barcode input from Decoder Chip, and then store input data in the system buffer. Application can use function call PT_GetBarcode() to get input data from the system buffer. Function call: INT PT_EnableBarcode(VOID); Return code: =1 =2 =3 =4 =0
Create new thread fail Cannot re-enable Cannot open COM4 Upload parameter from Hamster fail OK
4.2. Disable Decoder Function Description: This function will close COM4 port and then remove thread which is created by PT_EnableBarcode() Function call: VOID PT_DisableBarcode( VOID );
4.3. Check barcode input Function Description: This function is used to check whether there is available barcode data on system buffer which is successfully decoded by decoder chip. Function call: BOOL PT_CheckBarcode( VOID ); Return code: TRUE = There is input data on system buffer. FALSE = There is no data on system buffer.
-