Argox PA-20 Programming Guide Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Ausrüstung Argox PA-20 Programming Guide herunter. Argox PA-20 Programming Guide User Manual Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken

Inhaltsverzeichnis

Seite 1 - PA-20 / PA-2010

Portable Data Terminal PA-20 / PA-2010 PA-21 / PA-2110 Programming Guide Version: 1.07 Copyright © 2012 by ARGOX Informatio

Seite 2 - Preface

PT-20 Programming Guide 8 #include <stdlib.h> The statements listed above will make Compiler and Linker to import all the correlated functi

Seite 3 - Table of Contents

PT-20 Programming Guide 98 Description: This function can get power on status for resume or restart. Returns: 0:Resume 1:Restart SetAutoPWOff Purpos

Seite 4

PT-20 Programming Guide 99 Purpose: To get the SN of PT10/12. Syntax: void SN_Get(char *pssSNBuffer); Example call: SN_Get(SNBuffer); Includes: #inc

Seite 5 - Program Developing

PT-20 Programming Guide 100 Memory Tfree Purpose: Use the Tfree to release an allocated storage block to the pool of free memory. Syntax: void Tfree

Seite 6

PT-20 Programming Guide 101 Purpose: Checking the used heap size. Syntax: int UsedHeapSize(void); Example call: usedsize = UsedHeapSize(); Includes:

Seite 7

PT-20 Programming Guide 102 Vibrate on_vibrator Purpose: Use on_vibrator to set vibrator on. Syntax: void on_vibrator(void); Example call: on_vibrat

Seite 8 - Function Library

PT-20 Programming Guide 103 Other prc_menu_color Purpose: Create a menu-driven interface. Syntax: void prc_menu_color(MENU_COLOR *menu); Example cal

Seite 9 - Standard Function Library

PT-20 Programming Guide 104 call the prc_menu function to build a hierarchy menu-driven user interface. Returns: None prc_menu_Set_SelectWithEnt Pu

Seite 10 - PT-20 Programming Guide

PT-20 Programming Guide 105 Simulator (Only for PC Simulator) CopyFileToTerminal Purpose: Use BackupDataFiletoPC to copy data file to C:\Data direct

Seite 11 - How to Build Your Program

PT-20 Programming Guide 106 Data Conversion __itoa Purpose: Use __itoa to convert an integer value to a null-terminated character string. Syntax: ch

Seite 12 - 4. Development Notice:

PT-20 Programming Guide 107 When radix is 10 and the value is negative, the converted string will start with a minus sign. Returns: The __ltoa funct

Seite 13 - Upgrade System

PT-20 Programming Guide 9 How to Build Your Program 1. Edit Program: Developers may use the Application.c file under Source folder in the PA2-T

Seite 14

PT-20 Programming Guide 108 APPENDIX 1: Scan Module (CCD) Configuration Table Command1 Command2 Value 5 Indication 1 Power on alert 0:On * 1:None 2:

Seite 15 - 3. Execute System:

PT-20 Programming Guide 109 3 Preamble characters settings 0 * 0x00 ~ 0xff ASCII code 22 characters. 4 Postamble characters settings 0 * 0x00 ~ 0xff

Seite 16 - Utility & Others

PT-20 Programming Guide 110 8 Code ID setting <*> 0x00 ~ 0xff ASCII code(1 or 2 bytes) 10 Format 0: Standard * 1: Full ASCII 13 Start/stop tra

Seite 17 - SDK Library

PT-20 Programming Guide 111 8 Code ID setting <#> 0x00 ~ 0xff ASCII code(1 or 2 bytes) 10 Format 0: Standard * 1: UCC.EAN 128 12 UCC/EAN 128 I

Seite 18

PT-20 Programming Guide 112 7 Truncate ending 0 ~ 15 0 * 8 Code ID setting <FF> 0x00 ~ 0xff ASCII code(1 or 2 bytes) 10 Supplement digits 0: N

Seite 19

PT-20 Programming Guide 113 ISBN/ISSN conversion 1: Enable 17 Industrial 2 of 5 1 Read 0:Disable * 1:Enable 4 Max. code length 0 ~ 64 0 * 5 Min. cod

Seite 20

PT-20 Programming Guide 114 Max. code length 0 * 5 Min. code length 0 ~ 64 0 * 6 Truncate leading 0 ~ 15 0 * 7 Truncate ending 0 ~ 15 0 * 8 Code ID

Seite 21

PT-20 Programming Guide 115 Min. code length 0 * 6 Truncate leading 0 ~ 15 0 * 7 Truncate ending 0 ~ 15 0 * 8 Code ID setting <@> 0x00 ~ 0xff

Seite 22

PT-20 Programming Guide 116 10 Supplement digits 0: None * 1: 2 digits 2. 5 digtis 3: 2, 5 digits 4: UCC/EAN 128 5: 2, UCC/EAN 128 6: 5, UCC/EAN 128

Seite 23

PT-20 Programming Guide 117 25 Matrix 25 1 Read 0: Disable * 1: Enable 2 Check-sum verification 0: Disable * 1: Enable 3 Check-sum transmission 0: D

Seite 24

PT-20 Programming Guide 10 Add or Delete Files: When adding or deleting the source files, you can do the adding and removing directly under the

Seite 25

PT-20 Programming Guide 118 bytes) 11 UCC/EAN 128 emulation 0: Disable * 1: Enable 30 RSS Limited 1 Read 0: Disable * 1: Enable 6 Truncate leading 0

Seite 26

PT-20 Programming Guide 119 7 Truncate ending 0 ~ 15 0 * 8 Code ID setting <p> 0x00 ~ 0xff ASCII code(1 or 2 bytes) 10 Leading “A” 0: Disable

Seite 27

PT-20 Programming Guide 120 APPENDIX 2: Scan Module (Laser) Configuration Table Command1 Command2 Value 5 Indication 2 LED indication 0: Disable 1:

Seite 28

PT-20 Programming Guide 121 length #4 14: Configurable code length #5 See Note1 (4 characters) 15: Configurable code length #6 See Note1 (4

Seite 29

PT-20 Programming Guide 122 bytes) 10 Full ASCII 0: Disable * 1: Enable 13 Transmit Start/Stop Characters 0: Disable * 1: Enable 14 Italian Pharmaco

Seite 30

PT-20 Programming Guide 123 14 Codabar 1 Read 0: Disable * 1: Enable 2 Check Digit 0: Disable * 1: Enable 3 Transmit Check Digit 0: Disable * 1: Ena

Seite 31

PT-20 Programming Guide 124 15 ISMN Supplement Required 0: Disable * 1: Enable 17 Industrial 2 of 5 1 Read 0:Disable * 1:Enable 8 Code ID setting 0:

Seite 32 - Calender

PT-20 Programming Guide 125 bytes) 10 Alpha Telepen 0: Disable * 1: Enable 23 UPCA 1 Read 0: Disable 1: Enable * 3 Transmit Check Digit 0: Disable 1

Seite 33

PT-20 Programming Guide 126 Code ID setting 0x20 ~ 0xff ASCII code(1 bytes) 35 UPC/EAN General 1 Supplements Required 0: Disable * 1: Enable 2 Two D

Seite 34

PT-20 Programming Guide 127 Note1: There are seven bar code lock lengths available. Specific code type can be assigned to a lock length. Code type

Seite 35

PT-20 Programming Guide 11 Upgrade System 1. System Requirement: Software: PT-FileManager Hardware: PA-20 / PA-2010 / PA-21 / PA-2110 and PC.

Seite 36

PT-20 Programming Guide 128 Note2: ScanTimeout: The maximum time, in seconds, during which the laser remains on without decoding any barcode. Idl

Seite 37

PT-20 Programming Guide 12 And input password “00000” ->Communication ->Upgrade . Then connect the Cradle to the PC and wait for comm

Seite 38

PT-20 Programming Guide 13 In PTFileManager: Execute PTFileManager and select Tool\F/W Update . Select the Binary file and complete the fir

Seite 39 - File Manipulation

PT-20 Programming Guide 14 Utility & Others 1. AID MAKER Select PA-20 / PA-2010 / PA-21 / PA-2110 in communication mode. Double click “Age

Seite 40

PT-20 Programming Guide 15 SDK Library SDK Functions list Function Description Reader InitScanner1 Initialize respective scanner port. Decode Perfo

Seite 41

PT-20 Programming Guide 16 BT_Close Bluetooth disconnect. BT_Read Read characters from Bluetooth module. BT_Write Write characters to Bluetooth modu

Seite 42

PT-20 Programming Guide 17 DiskD_format Format disk D. DiskC_totalsize Checking the total space in disk C. DiskD_totalsize Checking the total space

Seite 43

Preface To satisfy the user’s customized needs, the PA-20 / PA-2010 / PA-21 / PA-2110 provide users to generate programs for their actual demands. T

Seite 44

PT-20 Programming Guide 18 SearchMultiField_GF Search the designated field. The field’s information include field string and field number.You can wr

Seite 45

PT-20 Programming Guide 19 variables according to specified formats. _scanf_color_DefaultStr Use _scanf_color_DefaultStr to set a default string

Seite 46

PT-20 Programming Guide 20 _putchar Display a character in color black on the LCD display. _putchar_color Display a character in user define color o

Seite 47

PT-20 Programming Guide 21 Remote SetRemoteBaud Setting the RemoteLink baud rate. GetRemoteBaud Getting the RemoteLink baud rate. SetRemoteInterfac

Seite 48

PT-20 Programming Guide 22 number key to select menu. Simulator (Only for PC Simulator) CopyFileToTerminal Use BackupDataFiletoPC to copy data file

Seite 49

PT-20 Programming Guide 23 Reader InitScanner1 Purpose: Initialize respective scanner port. Syntax: void InitScanner1(void); Example call: InitScann

Seite 50

PT-20 Programming Guide 24 Example call: InitScanner1( ); while(1) { if (Decode()) SleepScanner1(TRUE); while(_getchar()==0); SleepScanner

Seite 51

PT-20 Programming Guide 25 Description: This function can reset scan module,if reset OK,this function will return 1,else will return 0. Returns: 0:R

Seite 52

PT-20 Programming Guide 26 Description: This function can send command to set scanner status. You can see “Appendix 2” to know about the command set

Seite 53

PT-20 Programming Guide 27 1: Load OK. Scanner_Version Purpose: Query the scan module version. Syntax: BOOL Scanner_Version(char* Returnbuf); Exampl

Seite 54

PT-20 Programming Guide 1 Table of Contents Program Developing ...

Seite 55

PT-20 Programming Guide 28 Buzzer beeper_status Purpose: To see whether a beeper sequence is under going or not. Syntax: int beeper_status(void); Ex

Seite 56

PT-20 Programming Guide 29 Purpose: Set the buzzer volume. Syntax: void SetBuzzerVol(int slVol); Example call: SetBuzzerVol(0);//Buzzer close. Inclu

Seite 57

PT-20 Programming Guide 30 Calender DayOfWeek Purpose: Get the day of the week information. Syntax: int DayOfWeek(void); Example call: day=DayOfWeek

Seite 58

PT-20 Programming Guide 31 Syntax: int set_time(char *new_time); Example call: set_time(“20030401223035”); Includes: #include “SDK.h ” Description:

Seite 59

PT-20 Programming Guide 32 Bluetooth(For PA-2010 / PA-2110) These functions only for PA-2010 / PA-2110, and our Bluetooth module only support SPP mo

Seite 60

PT-20 Programming Guide 33 BT_CONNECT : Bluetooth has connected, please run BT_Close. BT_OK : Bluetooth connect ok. BT_Close Purpose: Bluetooth disc

Seite 61

PT-20 Programming Guide 34 characters will be writed to other Bluetooth device, and “pslPutSize” will tell you how meny characters send to other Blu

Seite 62

PT-20 Programming Guide 35 char assPinCode[20]; //Set PIN code. }_BT_INFO; Returns: BT_NOMODULE : The terminal is notPA-2010 / PA-2110. BT_OK : Get

Seite 63

PT-20 Programming Guide 36 Returns: BT_NOMODULE : The terminal is notPA-2010 / PA-2110. BT_NOSTART : Bluetooth module power disable, please run BT_S

Seite 64

PT-20 Programming Guide 37 File Manipulation __access Purpose: Check for file existence. Syntax: int __access(char *filename); Example call: if(__ac

Seite 65

PT-20 Programming Guide 2 TextBlock ... 84

Seite 66

PT-20 Programming Guide 38 Purpose: Write a null terminated character string to the bottom (end-of-file position) of a DAT file. Syntax: int appendl

Seite 67

PT-20 Programming Guide 39 fErrorCode: 2:File specified by fd does not exist. 8:File not opened 10:No more free file space for file extension. close

Seite 68

PT-20 Programming Guide 40 9:The value of count is negative. 10:No more free file space for file extension. delete_topln Purpose: Remove a null term

Seite 69 - : Uppercase input

PT-20 Programming Guide 41 Purpose: Get file length information of a DAT file. Syntax: long filelength(int fd); Example call: datasize = filelength(

Seite 70

PT-20 Programming Guide 42 Description: The lseek function moves the file pointer of a DAT file whose file handle is specified in the argument fd to

Seite 71

PT-20 Programming Guide 43 and an error code is set to the global variable fErrorCode to indicate the error condition encountered. Possible error co

Seite 72

PT-20 Programming Guide 44 readln Purpose: Read a line terminated by a null character “\0” from a DAT file. Syntax: int readln(int fd, char *buffer,

Seite 73

PT-20 Programming Guide 45 fErrorCode: 1:filename is a NULL string. 2:File specified by filename does not exist. _rename Purpose: Change file name o

Seite 74

PT-20 Programming Guide 46 fErrorCode: 2:File handle is NULL. 7:fd is not a file handle of a previously opened file. write Purpose: Write a specifie

Seite 75

PT-20 Programming Guide 47 to the file (includes the null character). In case of error, writeln returns an integer value of -1 and an error code is

Seite 76

PT-20 Programming Guide 3 Program Developing Development Environment Folder Structure: When open the SDK folder in the CD provided with the PA-20

Seite 77

PT-20 Programming Guide 48 Example call: DiskD_totalsize ( ); Includes: #include “SDK.h ” Description: The DicskD_totalsize function returns the tot

Seite 78

PT-20 Programming Guide 49 Description: The DicskD_freesize function returns the free space in disk D. Returns: 0xffffffff : Disk C unformatted.

Seite 79

PT-20 Programming Guide 50 Lookup”. Returns: -1 : path error. -2 : disk unformat. upward 0 : When pssBuffer = NULL, it will return buffer size. Wh

Seite 80

PT-20 Programming Guide 51 _fcloseAll Purpose: Use _fcloseAll to close all files opened for buffered input/output with _fopen or tmpfile. Syntax: vo

Seite 81

PT-20 Programming Guide 52 w+ Creates a file and opens it for both reading and writing. If file exists, current contents are destroyed. Returns: If

Seite 82

PT-20 Programming Guide 53 non-zero value. _fwrite Purpose: Use _fwrite to write a specified number of data itmes, each of a given size, from a buff

Seite 83

PT-20 Programming Guide 54 DBMS Ini_Search Purpose: Use “Ini_Search” can initiate the file search function in disk. Syntax: int Ini_Search(_TFILE* f

Seite 84

PT-20 Programming Guide 55 unsigned char *pusFielddlt This argument has two kinds of meanings. When record _ Type is 0, search for regular length.

Seite 85 - UserFont

PT-20 Programming Guide 56 filepoint = _fopen(“c:\\data\\data.txt”,”r+”); Ini_Search(filepoint, &fsearch, ausFielddlt, NULL, 0, 1, 0, 5, 0); Exa

Seite 86 - TextBlock

PT-20 Programming Guide 57 unsigned char *pusFielddlt This argument has two kinds of meanings. When record _ Type is 0, search for regular length.

Seite 87

PT-20 Programming Guide 4 Folder introduction: Upgrade: For Fw upgrade, it has two sub folders, “Ugrade BIN file” and “Upgrade BAT file”.  Ugr

Seite 88

PT-20 Programming Guide 58 Syntax: int Close_Search(_DBMS* F_Search); Example call: Close_Search(&F_Search); Includes: #include “DBMS.h” Descrip

Seite 89

PT-20 Programming Guide 59 recordno, char* R_Buffer, int flag); Example call: char str[8]=”abcdefg”,str_buffer[60]; SearchField_GR(&fsearch, str

Seite 90

PT-20 Programming Guide 60 Description: Search the correctly appointed field. After search success, acquiring another appointed field which includin

Seite 91 - Communication Ports

PT-20 Programming Guide 61 argument description _DBMS* F_Search The file’s searching structure that has been initialized. char* multi_field Stri

Seite 92

PT-20 Programming Guide 62 Syntax: int GetRecordNum(_DBMS* F_Search); Example call: int record_num; record_num= GetRecordNum(&fsearch); Includes

Seite 93

PT-20 Programming Guide 63 Other value: the quantity of the data. WriteField Purpose: Use this function can revise the designated record in the ex

Seite 94

PT-20 Programming Guide 64 Returns: When char * buffer = NULL, functions will pass the data size back. Read defeat: Pass back - 1. When char * buf

Seite 95

PT-20 Programming Guide 65 LED set_led Purpose: To set the LED indicators Syntax: void set_led(int led, int mode, int duration); Example call: set_l

Seite 96

PT-20 Programming Guide 66 Keypad clr_kb Purpose: To clear the keyboard buffer. Syntax: void clr_kb(void); Example call: clr_kb( ); Includes: #inclu

Seite 97

PT-20 Programming Guide 67 Syntax: void set_alpha_mode_state(int status); Example call: set_alpha_mode_state(ALPHA_123); Includes: #include “SDK.h ”

Seite 98

PT-20 Programming Guide 5 For terminal develop environment.  Upgrade SDK Tool: For upgrade App.bin in Force Mode. AID Maker: For set PA-20 / PA-

Seite 99

PT-20 Programming Guide 68 Returns: None get_keypad_BL_Timer Purpose: Get keypad backlight timer. Syntax: int get_keypad_BL_Timer(void); Example

Seite 100

PT-20 Programming Guide 69 Includes: #include “SDK.h ” Description: The function returns an integer indicates the key click staus.The default is ena

Seite 101

PT-20 Programming Guide 70 Includes: #include “SDK.h ” Description: You can check the FN-Key function that is default setting or custom setting. s

Seite 102

PT-20 Programming Guide 71 Returns: FALSE:set fail TRUE:set success GetScanKeyPwOn Purpose: Get state for power on by scan key. Syntax: BOOL GetScan

Seite 103

PT-20 Programming Guide 72 successfully read, converted, and saved in variables. A return value equal to EOF means that an end-of-file was encounter

Seite 104 - Vibrate

PT-20 Programming Guide 73 Syntax: void _scanf_ctrl_ScannerStatus(BOOL bStatus); Example call: _scanf_ctrl_ScannerStatus(TRUE); Includes: #include “

Seite 105

PT-20 Programming Guide 74 Includes: #include “SDK.h ” Description: When use “_scanf_color” function, this function can set auto press ENT key after

Seite 106

PT-20 Programming Guide 75 0 : Input character nomoral display. others : Input character display define word. Returns: none _scanf_ctrl_KeypadLock

Seite 107

PT-20 Programming Guide 76 LCD The following functions clr_eol, clr_rect, clr_scr, fill_rect, fill_rect_color, Get_Cursor, Set_Cursor, gotoxy, where

Seite 108 - Data Conversion

PT-20 Programming Guide 77 system. Returns: None fill_rect Purpose: Fill a white rectangular area on the LCD display. Syntax: void fill_rect(int lef

Seite 109

PT-20 Programming Guide 6 Function Library PA-20 / PA-2010 / PA-21 / PA-2110 Function Library supports user application program to perform the da

Seite 110 - APPENDIX 1:

PT-20 Programming Guide 78 Returns: The Get_Cursor function returns an integer of 1 if the cursor is visible (turned on), 0 if not. Set_Cursor Purpo

Seite 111

PT-20 Programming Guide 79 Example call: wherexy(&x_position,&y_position); Includes: #include “SDK.h ” Description: The wherexy function cop

Seite 112

PT-20 Programming Guide 80 Includes: #include “SDK.h ” Description: The lcd_backlit_Getlv gets LCD backlight level. Returns: LCD backlight level for

Seite 113

PT-20 Programming Guide 81 Syntax: int _putchar_color(int color, char c); Example call: _putchar_color(COLOR_BLACK, ‘A’); Includes: #include “SDK.h

Seite 114

PT-20 Programming Guide 82 Description: The showet_image function displays a rectangular bitmap specified by pat to the LCD display. The rectangular

Seite 115

PT-20 Programming Guide 83 UserFont DispFont_SetFont Purpose: Set user font from font file. Syntax: BOOL DispFont_SetFont(S32 slSelFont, const char

Seite 116

PT-20 Programming Guide 84 TextBlock TextBlock is a floating window printing rectangle area on screen. TextBlock defines it’s activated area anywher

Seite 117

PT-20 Programming Guide 85 Description: The DefineTextBlock function defines font,background graph,size and position. There are total 15 Windows. sl

Seite 118

PT-20 Programming Guide 86 Example call: ResetTextBlock(1); Includes: #include “SDK.h ” Description: When set slngle layer mode, ResetTextBlock will

Seite 119

PT-20 Programming Guide 87 Purpose: Get TextBlock current position. Syntax: POINT GetTextBlockCur(S32 slBlockNo); Example call: pt = GetTextBlockCur

Seite 120

PT-20 Programming Guide 7 Standard Function Library The user application program in the data collector can perform the tasks to combine standard C

Seite 121

PT-20 Programming Guide 88 Includes: #include “SDK.h ” Description: This function can help you to set background color. After use this function, all

Seite 122 - APPENDIX 2:

PT-20 Programming Guide 89 Communication Ports clear_com Purpose: Clear receive buffer Syntax: void clear_com(int port); Example call: clear_com(1);

Seite 123

PT-20 Programming Guide 90 Description: This routine is used to check if prior transmission is still in process or not. Use the argument “port” as t

Seite 124

PT-20 Programming Guide 91 transmitted one by one until the specified number of character is sent. Use the argument “port” as the connect port which

Seite 125

PT-20 Programming Guide 92 i = read_com(1,c); if (i) _printf(“char %c received from COM1”,*c); Includes: #include “SDK.h ” Description: This routine

Seite 126

PT-20 Programming Guide 93 USB_Read Purpose: Read specific number of bytes from USB port. Syntax: int USBRead(unsigned char *rbuf, unsigned int rLen

Seite 127

PT-20 Programming Guide 94 Remote SetRemoteBaud Purpose: Setting the RemoteLink baud rate. Syntax: void SetRemoteBaud(int slBaud); Example call: Set

Seite 128

PT-20 Programming Guide 95 Case 5: _printf_color(COLOR_RED, “RemoteLink baud rate=4800”); Break; } Includes: #include “SDK.h ” Descriptio

Seite 129 - Note1:

PT-20 Programming Guide 96 Returns: 0:RS-232 1:USB RemoteLink Purpose: Use RemoteLink to call the transmission function for user to upload or downlo

Seite 130

PT-20 Programming Guide 97 System Two time variables are declared by the system, which can be used for counting time. As they are updated by system

Kommentare zu diesen Handbüchern

Keine Kommentare