Home
BASIC Programming Guide
Contents
1. 40 5 4 4 Searching for Strings E EE 40 5 4 5 Retrieving Part of Stings seis 41 5 4 6 Converting for Strings sc 2 cc cccsccssseestdeeedecks svececetsnceuecssduss cites 43 5 4 7 Creating Strings of Repeating 8 16 5 46 5 5 Commands for Event Trapping ienser iiini iieii iiie E iE EAEE E a i 47 SS Event 1 1 2 e n a a A e E ii 47 5 5 2 Lock and 17010 peiie E E E EE A AA E oiai 57 5 6 System Command EEE E E E R A 59 57 6 1110 1 15 2 5957 956777 59 5 6 2 Formatiof Device Hee ech os Re ae i ee es 65 5 7 Barcode Reader Commands ee Sh ces eon sags obec Re eI SR Res RO eS 68 Sc fel 6 1 0 1 Soho eee ee 68 SAD COde Py pe ae sd tts ee ee 73 S13 Reader Seti 89 oc cxi ics a aes eh 77 5 8 RFID Reader Commands 2 2 i3 teach ivi ee ae ee 79 D285 I Wart COM 80 5 8 2 Data Formate nonnai E A
2. 10 3 2 Pdt Men 825 567 957777 7 a 12 3 3 Configure Memb 5 799 14 34 Compil M nu 8 16 3S Helps Menu inten tees 18 CHAPTER 4 Basics of the CipherLab BASIC Language 19 Al Constants esi eerste ain Seen ee a 19 r Dd sg 10 ei Re eee eee eee 19 4 V2 1111118915 5 east ees ite win ce ein ii an aah atone eine cilia ae eae 19 42 Variables sick aren 20 4 2 1 Variable Names and Declaration Characters 5 55 45995 20 4 2 2 Array Variables 1 iii 22 E 20 4 3 Expression and Operators sss 2 eiei ieri EEE ae i O e 21 4 3 Assignment Operator veccccsccccecsi cca Ea EE Sae 295294 21 4 3 2 Arithmetic Operator 8 22 4 3 3 1 1191171611 1 E eas eee enschede 22 43A Logi
3. E a Actelion 127 5 18 Communication Ports 2 is 129 SVS 1 1 8 7 1 141511 1 A 129 5 18 2 Receive amp Transmit 89 129 5 18 3 RS 232 Serial IR and IrDA Communications 134 5 19 IR RS 232 6 0 11 139 5 19 FPPP 11 11 97 139 5 192 Ethernet vi IR sisine rein nri 141 5 20 RF Communications nieis e eeri es iE cctcesseten ava NE 142 5 20 1 RF Models amp Specifications seserinis 142 5 20 2 RF System Requirement cad 85 55 143 5 20 3 RF Topology amp Roaming nrinn iK E E
4. A AE 102 DASE NIC E N E ETT A N 52 2221227222 2252222222 104 5 1 LED Commande e lt sntsgccscveecagtesszecscchlcdsgdase 105 DPS 1 16415 18 1 EE 105 18 1 CUTSOT 108 5 15 3 1315 1 R EEEa 8 110 MEEO r E 113 59 5 2141111 7 556 meas ha 114 5 15 6 8 165 3 nei aE EEE 117 INST POMS 577 5 NN 120 Contents iii 5 16 Touch Screen Commands 123 5 17 Battery Commands 55 1
5. rats 20050401140506 32 lt 0x0d gt lt 0x0a gt 886920123456 0 09 gt lt 0 08 gt HelloHello Date Time rin Sender Number r n Length Data Time Zone Indicator gt WRITE_COM data format For sending a message the maximum length is limited to 255 characters For long messages see Message Type Concatenated Message above data will be sent successfully by using NWRITE_COM and then each message will be separated into sections intentionally The data format for sending a message is as shown below Example 0920123456 lt 0x0d gt lt 0x0a gt lt 0x0A gt HelloHello Receiver Phone An Data Number Length 1 byte 0920123456 lt 0x0d gt lt 0x0a gt lt Ox0A gt HelloHello Receiver Number rin Length Data Indicator Chapter 5 BASIC Commands PIN PUK Procedure Incorrect PIN code during initialization 3 attempts allowed PIN BEEP WRONG 2 seconds PIN BEEP NO Cir WRONG YES 2 seconds PIN SUCCESS 2 seconds PIN ea PIN code WRONG BEEP OL ES 2 seconds PN SUCCESS PIN Locked BEEP 2 seconds 2 seconds PIN Unlock 197 198 BASIC Programming Guide For Use with CipherLab BASIC Compiler PIN Unlock Procedure 10 attempts allowed PUK PUK Personal Unblocking Key Again WRONG 2 seconds SUCCESS 2 seconds Chapter 5 BASIC Commands 199 5 22 File Manipulation This sec
6. TT 253 1 ree A 77 253 RSS Fann ye 5 ceccc5 eecsesec n R 254 161 6 27 9 8157 1111111 255 2D Scan Engine Only Ss 259 11 5 150108168 22 iE E 259 Composite 8 0 1 55 ds Ta ts 260 PAD SymbologiesS eee 262 APPENDIX Scanner Parameters 265 Scan Modes tea ag a a 265 Comparison of Scam Modessa 8 266 Read Red ndanc y 268 Time 0 111 2 0 7 9229 56 97207 5177557777677579 7 269 APPENDIX IV Run Time Error Table 271 APPENDIX V Debugging Messages 273 APPENDIX VI Cradle Commands 283 select Modem Ethernet san ccience ohne en ohana Bann Ay ae eR ae 284 ELEC RS 23 2 E S E AN EO
7. Stop Exit The Serial to Keyboard Converter program lets users convert data to keyboard input via IR IrDA RS 232 in general wedge functions such as SEND_WEDGE SET_WEDGE and WEDGE_READYV This utility helps develop a keyboard key in application without any serial port input function It supports multiple regions 1 6 an application can make use of this tool for varying keyboard layout Alternatively you may apply Bluetooth SPP or HID for wedge applications on the Bluetooth enabled terminals Refer to section 5 20 6 Bluetooth for examples Wedge Options Available Functions Remarks Keyboard Wedge WedgeSetting array SEND_ WEDGE 711 8300 Interface SET_WEDGE WEDGE READY Wedge Emulator via OPEN COM SET_COM SET_COM_TYPE 8000 8300 8500 IR IrDA RS 232 CLOSE COM SEND_WEDGE SET WEDGE WEDGE READY Wedge Emulator via SEND _ WEDGE SET_WEDGE 8061 8360 8500 Bluetooth SPP WEDGE_READY Bluetooth HID WedgeSetting array OPEN COM SET_COM 8061 8360 8500 SET_COM_TYPE CLOSE_COM GET_NET_ STATUS WRITE_COM 90 BASIC Programming Guide For Use with CipherLab BASIC Compiler Purpose Syntax Remarks Example See Also To send data to the host via keyboard wedge interface SEND_WEDGE DataString DataString is the data string to be sent via the keyboard wedge interface DataString CHR 9 TESTING Tab TESTING Tab CHR 9 SEND_WEDGE DataString SET WEDGE
8. 0 Disable Code 128 EAN 128 CCD Laser fn 0 Disable UPC E Addon 2 CCD Laser 1 Enable UPC E Addon 2 0 Disable UPC E Addon 5 CCD Laser 1 Enable UPC E Addon 5 ro 10 0 Disable UPC E CCD Laser 1 Enable UPC E 224 BASIC Programming Guide For Use with CipherLab BASIC Compiler 0 Disable EAN CCD Laser 0 Disable EAN 8 Addon 2 CCD Laser 1 Enable EAN 8 Addon 2 pe 0 Disable EAN 8 Addon 5 CCD Laser 1 Enable EAN 8 Addon 5 0 Disable EAN 13 UPC A CCD Laser 1 Enable EAN 13 UPC A 0 Disable EAN 13 UPC A Addon 2 CCD Laser 1 Enable EAN 13 UPC A Addon 2 0 Disable EAN 13 UPC A Addon 5 CCD Laser 1 Enable EAN 13 UPC A Addon 5 m 0 Disable MSI CCD Laser 1 Enable MSI 0 Disable Plessey CCD Laser 1 Enable Plessey Reserved NOT transmit Code 39 Start Stop Character Laser smit Code 39 Start Stop Character NOT verify Code 39 Check Digit CCD Laser ify Code 39 Check Digit NOT transmit Code 39 Check Digit CCD Laser 1 Transmit Code 39 Check Digit ee 0 Standard Code 39 CCD Laser er NOT transmit Italian Pharmacode Check Digit CCD Laser smit Italian Pharmacode Check Digit ee NOT transmit CIP 39 Check Digit CCD Laser mit CIP 39 Check Digit a NOT verify Interleaved 25 Check Digit CCD Laser ify Interleaved 25 Check Digit ee NOT transmit Interleaved 2 Check Digit CCD Laser smit Interleaved 2
9. 80 5 8 3 RFID Authentication ien a a a E Wan 81 5 9 Keyboard Wedge Commands ie e 83 5 9 1 Definition of the WedgeSetting Array eccccccssesssesscessceesceeeceecesecesecaeecaeecaeeeseeseeeneeenreerens 83 5 9 2 Composition of Output String Ena 87 5 2 1 241 12 641111 1 9 88 89 5 10 Buzz r Commands se 2 0 06 kta 6 8 s 92 5 11 1 810 001818 05 e e a ie ER 94 5 12 Calendar and Timer Commands 95 5811218151 8 762 61141111 111 19998 A 98 58 11 1 1 14 1 9 16041 114 11 9 9 9 99 EWEEN 0 1 95 80 99 DAD ATER EIALK CV
10. Negated in the space state Asserted in the mark state N is an integer variable indicating on which COM port to get CTS level Example A GET_ CTS 1 See Also SET RTS 156 BASIC Programming Guide For Use with CipherLab BASIC Compiler SET_RTS 711 8100 8300 Purpose To set RTS level on the direct RS 232 port Syntax SET _RTS N1 N2 Remarks N is an integer variable indicating on which COM port to set RTS level N2 is an integer variable indicating the RTS state 0 Negated in the space state 1 Asserted in the mark state Example SET RTS 1 1 set COM1 RTS to the mark state See Also GET CTS Chapter 5 BASIC Commands 139 5 19 IR RS 232 Networking 9 19 1 PPP via IR RS 232 PPP short for Point to Point Protocol is a method of connecting a terminal to the Internet over serial links PPP sends the computer s TCP IP packets to a server that puts them onto the Internet PPP Connection via IR It is supported on the 8000 8300 8500 series when making use of the proprietary modem cradle For baud rate setting any value other than 57600 bps default must be configured through the DIP switch of the IR control board Phone Line Internet Note For the 8000 8300 series the version of IR control board on the modem cradle must be greater than SV3 01 140 BASIC Programming Guide For Use with CipherLab BASIC Compiler PPP Connection via RS 232
11. Symbology Mapping Table Il 65 A 2D Extra Long Range Laser mo h o wo FA E N 13 2D Extra Long Range Laser N 13 with Addon 2 2D Extra Long Range Laser wo E Reserved 9D RSS 14 2D Extra Long Range Laser 74 J 75 K 76 L 77 M 78 79 O 80 P 82 R 83 5 84 T 85 U 86 V 87 W 88 X 89 Y 90 2 91 Chapter 5 BASIC Commands 75 wo mea i UPC E1 Addon 2 CO 114 r UK Postal 115 5 Japan Postal 116 t Australian Postal Note IATA stands for International Air Transport Association and this barcode type is used on flight tickets 76 BASIC Programming Guide For Use with CipherLab BASIC Compiler CODE_TYPE Purpose 10 get the type of symbology being decoded upon a successful scan Syntax A CODE TYPE Remarks 4 is an integer variable to be assigned to the result Refer to the above table for code types Example CheckCodeType IF CODE_TYPE 65 THEN BerType Code 39 ELSE IF CODE_TYPE 66 THEN BerType Italian Pharmacode END IF PRINT Code Type BerType RETURN See Also GET READER SETTING READER SETTING 5 7 3 Reader Settings Chapter 5 BASIC Commands 77 Refer to Appendix I for two tables that describe the details of the reader settings Table I is for the use of CCD or Laser scan engine Table II is for the use of 2D or Extra Long Range Laser
12. THEN DEL_RECORD DBFNum IDXNum ELSE See Also ADD RECORD EMPTY FILE EMPTY FILE Purpose To remove all the records from a specified DBF file Syntax EMPTY FILE file Remarks file is an integer variable in the range of 1 to 5 indicating which DBF file to be accessed Note that if this function is called at the beginning of the program data will be deleted after the battery is replaced or the System Menu is launched Example ON COM 1 GOSUB HostCommand HostCommand Cmd READ_COMS 1 Cmdldentifier LEFT Cmd 1 DBFNum VAL MIDS Cmd 2 1 IDXNum VAL MID Cmd 3 1 CardID RIGHT Cmd LEN Cmd 3 IF Cmdldentifier THEN EMPTY_FILE DBFNum ELSE See Also DEL RECORD FIND_RECORD Purpose To search for records in a specified DBF file that matches the key string with respect to a specified IDX Syntax A FIND RECORD jile index key Remarks Example Chapter 5 BASIC Commands 209 4 is an integer variable to be assigned to the result file is an integer variable in the range of to 5 indicating which DBF file to be accessed index is an integer variable in the range of 1 to 3 indicating which IDX file to be accessed key is a string variable representing the character string which indicates the matching string to be found If any record member in the DBF file matches the key string with respect to the IDX file FIND RECORD will return 1 and the f
13. Chapter5 BASIC Commands discusses all the supported BASIC functions and statements More than 200 BASIC functions and statements are categorized according to their functions and discussed in details The CipherLab BASIC Compiler has been modified and improved since its first release in November 1997 Users can refer to RELEASE TXT for detailed revision history 2 BASIC Programming Guide For Use with CipherLab BASIC Compiler Chapter 2 Development Environment 3 CHAPTER 2 Development Environment In This Chapter 2A Directory Structure soiin neiii 3 2 2 System Requirements 0 ccccccecsseesseesteesteeeteeeteeseeees 6 2 3 BASIC Run time 8 6 4 99 6 2 4 Development FIOW ccccccceesseetseeteeteesecsecnteenseens 7 2 1 Directory Structure The CipherLab BASIC Compiler Kit contains two directories namely BC and DOWNLOAD The purposes and contents of each directory are listed below To set up the BASIC programming environment on your PC simply copy these two directories from the CD ROM to your local hard disk 2 1 1 BC Directory This directory contains the BASIC Compiler and the BASIC programs BC exe The BASIC Compiler program BC chm The on line help file for the BASIC Compiler Synload exe The download program for downloading the Basic object files syn and in1 to the CipherLab terminals Release txt The revision history of the BASIC compiler Samp
14. 242 Italian French 8 186006 242 le E NA 242 Nepative Barcoders icc te8 cusses 243 PICSSC Ys oh tls ge BLS Be tad 244 MRS GE Ann 24 602 estes tad 244 Teleph nni eee 245 iv Contents WIPC EAN Famili esis fo 5253 E heat lace lac T 246 Scan Engine 2D or Extra Long Range Laset cccccecccssessseescessceesceecesecesecnaecseecseecaeeeaeeneeeeeeeseeneeenreees 249 WOd aD E ss cles xcs cic T E si eed ale sos E afte ned a Ue etek 249 5076297200 ESAE A eee eee ee eee 250 COME 3 Oe T E 251 Code 252 6 1 A A S E AE A AAE S E
15. Example REMOVE2 10 delete a record from the 2nd transaction file See Also CLEAR Purpose To get the current system time Syntax A TR Remarks A is a string variable to be assigned to the result which is in the form of yyyymmddhhnnss Otherwise it returns NAK for any format error Example TR See Also TW Chapter 5 BASIC Commands 221 Purpose To set new system time Syntax A TWyyyymmddhhnnss Remarks 4 is a string variable to be assigned to the result The command is processed successfully Any format error occurs Format of system time yyyy 4 digits for year mm 2 digits for month dd 2 digits for day 2 digits for hour in 24 hour format nn 2 digits for minute SS 2 digits for second Example TW20050520103000 set system time 85 2005 May 20 10 30 00 See Also TR 222 BASIC Programming Guide For Use with CipherLab BASIC Compiler 223 APPENDIX I Reader Settings Symbology Parameter Table noni vier andossciptonqsy 1 0 Disable Code 39 CCD Laser O kemas 2 0 Disable Italian Pharmacode CCD Laser 3 0 Disable CIP 39 French Pharmacode CCD Laser a eer 4 0 Disable Industrial 25 CCD Laser 5 0 Disable Interleaved 25 CCD Laser 0 Disable Matrix 25 CCD Laser O ee 0 Disable Codabar NW7 CCD Laser 1 0 Disable Code 93 CCD Laser
16. WEND 5 38 WRITE_COM 133
17. Item 15 a string variable indicating the menu items that are separated and ended by carriage return CR 0800 62 Example BASIC Programming Guide For Use with CipherLab BASIC Compiler This command lets user select an item by using 1 the UP DOWN arrow keys and then the ENTER key to confirm the selection or 2 the shortcut keys Note that the following features are for the 8000 8300 8500 series only Shortcut key amp It is restricted to only one character next to amp Menu title The title can be put anywhere in the menu string Display the Up Down arrow icons Below is an illustrative example MENU_STR 1 INFORMATION CHR 13 MENU_STR MENU_STR SYSTEM MENU CHR 13 MENU_STR MENU_STR amp 2 SETTINGS CHR 13 MENU_STR MENU_STR amp 3 TESTS CHR 13 MENU_STR MENU_STR 4 LOAD PROGRAM CHR 13 MENU_STR MENU_STR amp 5 BLUETOOTH MENU CHR 13 S MENU MENU_STR System Menu Title Information Settings Tests Load Program Bluetooth Menu Shortcut key 2 3 and5 Up Down arrows for 8000 8300 Up Down arrows for 8500 POWER_ON Purpose Syntax Remarks Example See Also To determine whether to restart or resume the program upon powering on POWER_ON N N can be 0 or 1 0 Resume POWER _ON 0 set to resume mode AUTO_OFF RESTART Chapter 5 BASIC Commands 63 RESTART Purpose Synta
18. REMOTE any 1 6 3 1 1 7 jo sn sma p fro eaa 1 DNS_SERVER string 0 0 0 0 SYSTEM SCALE Medium LOCAL NAME 33 S N DEFAULT WEP KEY 7 es Oe 9 ao 1 peoa 66 Por mac 3 1 2 3 4 5 7 to 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Chapter 5 BASIC Commands 163 2 1 56 8 2 25 ome 2 a 7 5 e 6 2 7 8 emo ao 2 8088 APNAME DO wea passeras f woa oon 87 8600 89 ove GET_NET SET_NET PARAMETER PARAMETER oa e je s 60 1 GSM MODEM DIAL NUM 21 GET_NET SET_NET PARAMETER PARAMETER PPP _DIALUPPHONE 20 SET COM Note The number in a pair of square brackets indicates the length of a string e g GPRS_AP 21 means the maximum length of the string for remote IP address is 21 characters 164 BASIC Programming Guide For Use with CipherLab BASIC Compiler GET_NET_PARAMETER 8000 8300 8500 Purpose To get network settings Syntax A GET NET PARAMETERS index Remarks A is a string variable
19. Syntax Remarks Example To update the record which the file pointer of a specified DBF and IDX files is pointing to UPDATE_RECORD file index data file is an integer variable in the range of to 5 indicating which DBF file to be accessed index is an integer variable in the range of 1 to 3 indicating which IDX file to be accessed If it is not specified the default IDX file which keeps the original data sequence will be used data is a string variable representing the character string to replace the old data ON COM 1 GOSUB HostCommand HostCommand Cmd READ COM 1 Cmdldentifier LEFT Cmd 1 DBFNum VAL MIDS Cmd 2 1 IDXNum VAL MID Cmd 3 1 CardID RIGHT Cmd LEN Cmd 3 IF Cmdldentifier amp THEN UPDATE_RECORD DBFNum IDXNum CardID ELSE See Also GET RECORDS Chapter 5 BASIC Commands 213 5 22 3 Error Code The command GET FILE ERROR returns the error code which is a number that indicates the result of the last file manipulation A value other than 0 indicates error GET_FILE_ERROR Purpose To get the error code of the previous file manipulation command Syntax A GET_ FILE ERROR Remarks 4 is an integer variable to be assigned to the result If there is no error it returns 0 If it returns a value other than 0 possible error code and its interpretation will be listed as follows Error Code Interpretation No free memory for file ext
20. Wedge Parameters Values Remarks N 1 0 2 Indicates which COM port is to be set Baudrate 1 115200 bps Specifies the baud rate of the COM port 2 76800 bps 3 57600 bps 4 38400 bps For acoustic coupler setting 1 4 is 5 19200 bps ce indicate its volume low to 6 9600 bps 7 4800 bps 8 2400 bps asterisk Not applicable to Serial IR Parity 1 None Specifies the parity of the COM port 2 Odd 3 Even 4 Cradle commands Refer to Appendix VI for cradle commands 152 BASIC Programming Guide For Use with CipherLab BASIC Compiler Example See Also Data 1 7 data bits Specifies the data bits of the COM port 2 8 data bits Handshake 1 None Specifies the method of flow control for direct RS 232 2 CTS RTS Set 1 for Serial IR or IrDA P For the 8000 8300 series to disable 4 Wedge Reserved Host Commands add 16 to the value of Handshake see table below For the 8300 series to enable URPower 5V add 32 to the value of Handshake see table below For acoustic coupler 5 9 is used to 5 9 2 stop indicate the character delay for 2 stop bits bits 5 for 0 character delay 6 for 1 character delay 7 for 3 characters delay 8 for 5 characters delay 9 for 10 characters delay Value Handshake Reserved Host Commands URPower 5V 1 None Enabled Disabled 17 1 16 Disabled Disabled 33 1 32 Enabled Enab
21. AUTO_OFF N Indicating the command AUTO_OFF is processed N is the assigned time interval BACK LIGHT DURATION N Indicating the command BACK_LIGHT_DURATION is processed N is the assigned time interval 84 66 5 PIT OPERATOR the selection of the speed CHR ORELEL CLOSE_COM N Indicating the command CLOSE_COM is processed N is the number of the COM port CLR_KBD Indicating the command CLR_KBD is processed 274 BASIC Programming Guide For Use with CipherLab BASIC Compiler TR RETO DATES X Indicating the system date is updated X is the new system date DAY OF WEEK Indicating the command DAY OF WEEK is processed DEL RECORD file index Indicating the command DEL_RECORD is processed DEL_TRANSACTION DATAU N Indicating the command DEL_ TRANSACTION _DATA is processed N is the number of records to be deleted DEL_TRANSACTION DATA E Indicating the command DEL TRANSACTION DATA EX is X file N processed DISABLE _READER N Indicating the command DISABLE READER is processed N is the number of the reader port DISABLE TOUCHSCREEN Indicating the command DISABLE TOUCHSCREEN is processed DIV N1 N2 Indicating a division is processed DNS_RESOLVER A Indicating the command DNS_RESOLVER is processed EMPTY_FILE file Indicating the command EMPTY _ FILE is processed file is the number of the DBF file EMPTY_TRANSACTION Indicating the command EMPTY_TRANSACTION is processed EMPTY_TRANSAC
22. Below are the two types of RF communications and their specifications A base refers to a base station either for Narrow Band 433 MHz or Spread Spectrum 2 4 GHz 8110 8310 8150 8350 Base Station 3510 3550 Narrow Band also referred to as 433 MHz RF Frequency Range 433 12 434 62 MHz Data Rate 9600 bps Programmable Channels 4 Coverage 200 meters line of sight Max Output Power 10 mW 10 dbm Spread Spectrum None Modulation FSK Frequency Shift Keying Spread Spectrum also referred to as 2 4 GHz RF Frequency Range 2 4000 2 4835 GHz unlicensed ISM Band Data Rate 19200 bps Programmable Channels 6 Coverage 1000 meters line of sight Max Output Power 100 mW Spread Spectrum Frequency Hopping Spread Spectrum FHSS Modulation GFSK Frequency Control Direct FM Note All specifications are subject to change without prior notice Chapter 5 BASIC Commands 143 5 20 2 RF System Requirements Basics Base to Host RS 232 connection Base Baud Rate Up to 115 200 bps Base to Base RS 485 connection Number of Bases per System Maximum 16 433 MHz RF System Number of Terminals per Base Maximum 15 Number of Terminals per System Maximum 45 2 4 GHz RF System Number of Terminals per Base Maximum 99 Number of Terminals per System Maximum 99 IDs and Groups An ID to a terminal or a base is like a name to a person Each terminal base in the same RF system must have a unique ID so that the syst
23. Meaning No reader CCD scan engine Laser scan engine 2D scan engine Long Range Laser scan engine Extra Long Range Laser scan engine No wireless module GSM GPRS Bluetooth 802 11b Bluetooth Bluetooth module only 802 11b GSM GPRS Bluetooth No RFID RFID module 67 68 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 7 Barcode Reader Commands The CipherLab terminals are able to read barcode data from the reader ports This section describes the BASIC commands that are related to the reader ports of the terminals Commands for triggering the READER event OFF READER 1 ON READER 1 GOSUB The reader module supports a number of scan engines to meet your needs CCD scan engine Laser scan engine Long Range Laser scan engine available for the 8300 8500 series Extra Long Range Laser scan engine available for the 8500 series only 2D scan engine available for the 8500 series only Note 1 CCD and Laser scan engines support 9 scan modes 2 2D and Extra Long 5 7 1 General Range Laser scan engines support Laser and Aiming modes only To enable barcode decoding capability in the system the first thing is that the scanner port must be initialized by calling ENABLE READER After the scanner port is initialized call ON READER 1 GOSUB to trigger the barcode decoding event For CCD or Laser scan engine the barcode decoding routines consist of 5 functions ENABLE READER GET_READER_DA
24. Op 2 KK KKK 0 1 Sye Oy cd 123 124 BASIC Programming Guide For Use with CipherLab BASIC Compiler SET SCREENITEMS 1 2 ITEMSTRS ON TOUCHSCREEN GOSUB GetTouch GetTouch A GETSCREENITEM IF AS 1 THEN PRINT OK ELSE IF A 2 THEN PRINT CLEAR END IF LOOP GOTO LOOP 5 5 155 120 DISABLE_TOUCHSCREEN 8500 Purpose 10 disable the touch screen Syntax DISABLE TOUCHSCREEN Remarks To restart the touch screen function ENABLE_TOUCHSCREEN must be called Example DISABLE TOUCHSCREEN See Also ENABLE TOUCHSCREEN GET SCREENITEM SET SCREENITEMS SET _SIGNAREA ENABLE_TOUCHSCREEN 8500 Purpose To enable the touch screen Syntax ENABLE TOUCHSCREEN Remarks The touch screen won t work until it is initialized by this command Example Chapter 5 BASIC Commands 125 ENABLE TOUCHSCREEN See Also DISABLE TOUCHSCREEN GET SCREENITEM OFF TOUCHSCREEN ON TOUCHSCREEN GOSUB SET SCREENITEMS SET_SIGNAREA GET_SCREENITEM 8500 Purpose Syntax Remarks Example See Also To detect and return an item number when an item is selected A GET_SCREENITEM 4 is an integer variable assigned to the result This function has to be called constantly to maintain its functionality The number of a selected item will be returned When no item is detected it will return 0 TouchItem GET_SCREENITEM
25. Portable Series BASIC Programming Guide Version 3 05 16 Ciprer EO Printed on 10 April 2007 Copyright Notice Copyright 2007 CIPHERLAB CO LTD All rights reserved The software contains proprietary information of CIPHERLAB CO LTD it is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law Reverse engineering of the software is prohibited Due to continued product development this information may change without notice The information and intellectual property contained herein is confidential between CIPHERLAB and the client and remains the exclusive property of CIPHERLAB CO LTD If you find any problems in the documentation please report them to us in writing CIPHERLAB does not warrant that this document is error free No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or by any means electronic mechanical photocopying recording or otherwise without the prior written permission of CIPHERLAB CO LTD For product consultancy and technical support please contact your local sales representative Also you may visit our web site for more information The CipherLab logo is a registered trademark of CIPHERLAB CO LTD Other product name mentioned in this manual may be trademarks or registered trademarks of their respective companies and are hereby acknowledged The editorial use of these nam
26. Two strings can be compared with the relational operators see section 4 3 3 A single character is greater than another character if its ASCII value is greater For example the ASCII value of the letter 8 is greater than the ASCII value of the letter A so the expression B gt is true When comparing two strings BASIC looks at the ASCII values of corresponding characters The first character where the two strings differ determines the alphabetical order of the strings For example the strings aaabaa and aaaaaaaa are the same up to the fourth character in each b and a Since the ASCII value of b is larger than that of a the expression aaabaa gt aaaaaaaa is true If there is no difference between the corresponding characters of two strings and they are the same length then the two strings are equal If there is no difference between the corresponding characters of two strings but one of the strings is longer the longer string is greater than the shorter string For example abc abc and aaaaaaaa gt aaaaa are both true expressions Leading and trailing blank spaces are significant in comparing strings For example the string abc is less than the string abc since a blank space is less than an a on the other hand the string abc is greater than the string abc 40 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 4 3 Getting the Length of a String LEN Purpose Synta
27. is an integer variable indicating a specific category of information index Meaning 1 Library Version C library 2 BASIC Version BASIC runtime 3 Kernel Version 4 Hardware Version 5 Manufacture Date 6 Serial Number 7 Original Serial Number 8 Device Type modular components in hardware 9 RFID Version Example LIBVER SYSTEM_INFORMATION 1 PRINT Library LIBVER SYSTEM_PASSWORD Purpose 10 set the password protection for entering the System Menu Syntax SYSTEM PASSWORD 4 Remarks A is a string constant or variable representing the password Example SYSTEM PASSWORD 12345 VERSION Purpose To write version information to the system Syntax Remarks Example Chapter 5 BASIC Commands 65 VERSION 4 A is a string variable indicating program name date etc This command is used to write information of program version to the system Such information can be checked in the System Menu gt Information gt USR Note that this command must be on the first line of the program otherwise it will be ignored The string for version information cannot exceed 15 characters VERSION CipherBASIC 2 0 5 6 2 Format of Device ID Being one category of system information the device type is displayed as xxx0 where each is a digit from 0 to 9 The last digit 0 is reserved for future use It is also referred to as Device ID Digits x x x x Types Reader Module W
28. will be shown on the screen Click the Yes button if you want to download the program Refer to the Download command for downloading operation Download Function Operation Chapter 3 Using CipherLab BASIC Compiler 17 To download a compiled BASIC program to the target terminal Click Compile on the menu bar and select Download In the pop up window select the BASIC object file syn to be downloaded and then click Open Select the correct COM port properties and then click OK to download For 711 user may select to download the BASIC program via Serial IR transceiver Note that the associated system initialization file ini has to be in the same directory as the BASIC object file is otherwise the default system settings will be downloaded instead 18 BASIC Programming Guide For Use with CipherLab BASIC Compiler 3 5 Help Menu Three commands are provided on this menu lolx File Edit Configure Compile Help ojja aja Displays the table of contents for the online documentation Command To Do Contents Function To display a table of contents for the BASIC online documentation Operation Click Help on the menu bar and select Contents The online help file will be opened Click on any topic for more detailed information Index Function To display the help file index Operation Click Help on the menu bar and select Index The online
29. 0 Disable UCC EAN 128 2D Extra Long 10 1 10 1 0 Disable RSS Expanded 2D Extra Long 1 Enable RSS Expanded Range 10 0 Disable RSS Limited 2D Extra Long 1 Enable RSS Limited Range 10 0 Disable RSS 14 2D Extra Long 1 Enable RSS 14 Rance 1 0 Disable UPC A depends 2D Extra Long 1 Enable UPC A Range 10 0 Disable UPC E1 depends 2D Extra Long 1 Enable UPC E1 0 No conversion 2D Extra Long 1 Convert RSS to UPC EAN Range 0 01 2 03 4 5 06 8 234 BASIC Programming Guide For Use with CipherLab BASIC Compiler 11 or 12 or 14 or 15 or 17 or 18 or 107 or 109 0 Disable Only Addon 2 amp 5 of UPC amp EAN Families 2D Extra Long It requires ALL of the indexes to be set 0 nae Enable Only Addon 2 amp 5 of UPC amp EAN Families It requires ANY of the indexes to be set 1 UPC Never Linked UPC Always Linked Autodiscriminate UPC Composite Disable Composite CC A B Enable Composite CC A B Disable Composite CC C Enable Composite CC C Code 93 Length Limitation in Fixed Length Format 2D Extra Long Code 93 Length Limitation in Max Min Length Format Range Code 93 Max Code Length Fixed Length 2D Extra Long Range Code 93 Min Code Length Fixed Length2 2D Extra Long Length must be greater than Length2 Range 0 Code 11 Length Limitation in Fixed Length Format 2D 1 Code 11 Length Limitation in Max Min Length Format Pd Code 11
30. 000 SET _COM_TYPE PEN COM 2 ET_COM_TYPE IF W BEEP CLS EDGE READ 4400 PRINT LOOP 4 OK 2 55 _COM 2 1 1 1 4 2 5 o Connect O And then use the normal wedge functions to send data Y 0 THEN GOTO 00 000 Try to Send KeyData INKEYS THEN GOTO LOOP IF KeyDataS F IF KeyData 0 THEN IF WEDGE READY 1 PRINT READY ELSE PRINT NOT READY END IF ELSE IF KeyData 1 SEND_WEDGE Hello ELSE IF KeyData 2 PRINT Hello END IF GOTO LOOP THI THE 5 lt 188 BASIC Programming Guide For Use with CipherLab BASIC Compiler gt HID Note Bluetooth HID makes use of the WedgeSetting array to govern the HID operations All definitions of WedgeSetting remain the same except that HID supports only 11 keyboard types which is provided by Wedge_1 0 Null DataNot Transmitted Null Data Not Transmitted 0 Not Transmitted e 73 Eo S Wedge_3 can be ignored for an inter character delay is not applicable to Bluetooth HID Set WedgeSetting Call SET_COM_TYPE 2 5 to set COM2 to Bluetooth communication Call SET_COM 2 6 1 1 1 to initialize Bluetooth HID Ca
31. 59 chr 186 chr 139 chrs 5 icon_11 chrS 48 chrs 84 chr 72 chr 24 chrs 58 chr 104 chrS 5 icon _12 chrS 96 chr 86 chr icon_13 Chapter 5 BASIC Commands 115 2 40 chrs 186 chr 107 chr 5 chrS 192 chr 83 chr 200 75 chr 130 1 39 5 icon_14 chr 0 chr 0 icon_15 chr 0 chr 0 icon_16 chr 0 chr 0 show_image 2 show_image 2 show_image 2 show_image 2 show_image 2 show_image 2 show_image 2 show_image 2 show_image 2 show_image 2 show_image 2 show_image 2 show_image 2 show_image 2 show_image 2 show_image 2 0 1 2 3 4 5 6 7 8 9 10 11 7 1 1 37 14 13 chr 0 chr 0 56 56 56 36 56 56 56 256 56 56 56 56 56 DO 56 206 T e re PP PB chr 0 chr 254 chr 255 chr 7 chrs 0 254 chr 255 chrS 1 chr 0 chr 0 chr 254 chrs 255 1 4 0 152 icon 25 icon_3 icon_4 icon_5 icon_6 icon_7 icon_8 icon_9 icon_10 icon_11 icon_12 icon_13 icon_14 icon_15 icon_16 GET_IMAGE To read a bitmap pattern or capture signature from a rectangular area on the LCD DataCount GET_IMAGE file_index x y
32. 8500 Purpose To get network status Syntax A GET WLAN STATUS index Remarks This command is to be replaced by GET_NET_STATUS Example nQuality GET WLAN STATUS 2 check communication quality See Also GET NET STATUS TCP_ERR CODE 170 BASIC Programming Guide For Use with CipherLab BASIC Compiler 9 21 5 WLAN 802 11b Here are the BASIC functions and statements related to TCP IP networking Commands for triggering the TCPIP event OFF TCPIP ON TCPIP GOSUB DNS_RESOLVER 8000 8300 8500 Purpose Syntax Remarks Example See Also To get the remote IP address by remote name IP DNS_RESOLVER A Note that it is necessary to define the DNS server IP before running this command IP is a string variable to be assigned to the result A is a string variable indicating a specific remote name GetIP DNS RESOLVER www cipherlab com TCP_ERR_ CODE GET_TCPIP_MESSAGE 8000 8300 8500 Purpose Syntax Remarks To get the message of TCPIP event trigger A GET_TCPIP_ MESSAGE This command can also be called in normal program to detect the TCP IP status by polling method Once it is fetched the message will be cleared by the system When entering TCPIP event trigger the first thing is to call this routine so that the trigger message will be cleared out 4 is an integer variable to be assigned to the result Connection 0 overflow Connection 1 overflow Connection 2 overflow Connection 3
33. 8500 Purpose To open a TCP IP connection Syntax TCP_OPEN N IP RP LP Protocol Delimiter Remarks Note that the function must be called before using any socket read write commands N is an integer variable in the range of 0 to 3 indicating the connection number JP is a string variable indicating the IP address of the remote port If it is set to 0 0 0 0 the connection will become server mode and the LP must be defined RP is an integer variable indicating the port number of the remote port which is to be connected If it is 0 none any remote port is available However it has to be set to 0 when in server mode LP is an integer variable indicating the port number of the local port If it is 0 none the port number will be defined by the system However it has to be set to 0 when in client mode Server mode Client mode C Protocol is an integer variable indicating the networking protocol in use This parameter is optional and it is set to 0 by default using TCP IP protocol If it is set to 1 the system will use UDP IP protocol Delimiter is an integer variable indicating whether to transmit the delimiter or not This parameter is optional and it is set to 0800 Carriage Return by default 176 BASIC Programming Guide For Use with CipherLab BASIC Compiler Example See Also The valid values range from 0 to 255
34. String1 String2 john thomas OCT Purpose To convert a decimal numeric expression to a string that represents the value of the numeric expression in octal notation Syntax A OCT N Remarks A 15 a string variable to be assigned to the result N is a numeric expression in the range 0 to 2 147 483 647 it is rounded to an integer before OCT N is evaluated Example A OCT 24 A 30 STR Purpose To convert a numeric expression to a string Syntax A STR N Remarks A 15 a string variable to be assigned to the result N is a numeric expression Example String STR 123 UCASE Purpose To return a copy of a string in which all lowercase letters will be converted to uppercase letters Syntax AS UCASE X3 Remarks A is a string variable to be assigned to the result X may be a string variable string expression or string constant Example String1 John Thomas String2 UCASE String1 String2 JOHN THOMAS Purpose To return the numeric value of a string expression in long integer form Syntax A amp VALS XS Remarks Example Chapter 5 BASIC Commands 45 A amp is an integer or long integer variable to be assigned to the result X is a string that includes numeric characters If the first character is not numeric this command returns 0 The command VAL will strip leading blanks tabs and linefeeds from the argument string The return numeric value
35. WEDGE READY SET_WEDGE Purpose Syntax Remarks Example See Also WEDGE_READY To configure the keyboard wedge interface SET_WEDGE WedgeSetting WedgeSetting is a 3 element character array describing the characteristics of the keyboard wedge interface Wedge_1 CHR 1 terminal type PCAT US Wedge_2 CHRS 1 auto detection disabled capital lock off case sensitive use numeric keypad to transmit digits Wedge 35 CHR 5 inter char delay 5 ms WedgeSetting Wedge_1 Wedge 25 Wedge SET_WEDGE WedgeSetting SEND_WEDGE DataString SEND WEDGE WEDGE READY Purpose Syntax Remarks To check if the keyboard wedge cable is well connected and ready to send data state WEDGE READY state is an integer variable to be assigned to the result Chapter 5 BASIC Commands 91 Note that it takes approximately 110 ms to detect the status of the keyboard wedge connection Therefore for continuous and fast data transmission simply call this function once DO NOT call this function repeatedly Example IF WEDGE READY 1 THEN SEND WEDGE DATAS END IF See Also SEND WEDGE SET WEDGE 92 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 10 Buzzer Commands This section describes the commands related to the buzzer Purpose To specify a beep sequence of how a buzzer works Syntax BEEP freq duration freq duration Remarks freq 15 an integer variab
36. becomes Min Length while Length2 becomes Max Length In either length format when both of the values are configured to 0 it means no limit in length 260 BASIC Programming Guide For Use with CipherLab BASIC Compiler Postal Code Family omua 0 DO NOT transmit US Postal Check Digit Lae 129 0 Disable US Planet 2D 130 0 Disable US Postnet 2D 134 0 Disable Japan Postal 2D 135 0 Disable Australian Postal 2D ieam OOOO 136 0 Disable Dutch Postal 2D ewean O 137 0 Disable UK Postal Check Digit 2D 138 0 Disable UK Postal 2D a Transmit Check Digit If this parameter is enabled the check digit will be included in the data being transmitted Composite Codes CC A B C No N1 Values and Description N2 9 111 0 Disable Composite CC A B 2D 1 Enable Composite CC A B 112 0 Disable Composite CC C 2D 1 Enable Composite CC C Appendix Symbology Parameters 261 TLC 39 No Values and Description N2 0 Disable TCIF Linked Code 39 1 Enable TCIF Linked Code 39 UPC Composite No N1 Values and Description N2 0 UPC Never Linked 1 UPC Always Linked 2 Autodiscriminate UPC Composite Select UPC Composite Mode UPC barcode can be linked with a 2D barcode during transmission as if they were one barcode There are three
37. happens FUNCTION 12 EVENT Indicating the ESC EVENT happens Indicating an exponentiation is processed Indicating the IF statement or the WHILE statement is processed PASH TENAS Indicating the happens 276 BASIC Programming Guide For Use with CipherLab BASIC Compiler GE N1 N2 Indicating the decision IF N1 gt N2 is processed GET_ALPHA LOCK Indicating the command GET ALPHA LOCK is processed GET_CTS N Indicating the command GET_CTS is processed N is the number of the COM port 68 GET ALPHA LOCK processed GET_NET PARAMETER G index Indicating the command GET NET PARAMETERS is processed GET_NET STATUS index Indicating the command GET _NET STATUS is processed GET_READER_DATAS N Indicating the command GET READER _DATAS is processed N is the number of the reader port GET READER SETTING N Indicating the command GET READER SETTING is processed N is the setting number GET_RECORD file index Indicating the command GET_RECORDS is processed GET_ RECORD NUMBER file Indicating the command GET READER NUMBER is 1 16854 processed GET_TARGET MACHINE Indicating the command GET TARGET MACHINES is processed GET_TCPIP_ MESSAGE Indicating the command GET_TCPIP_MESSAGE is processed GET_TRANSACTION DATA _ Indicating the command GET_TRANSACTION_DATA is N processed N is the ordinal number of the record to be read GET_ TRANSACTI
38. is an integer variable indicating the alpha input status Default Input ALPHA State 711 8100 Numeric mode Unlocked 711 8100 Alpha mode Locked 711 8100 Numeric mode Locked Default input ALPHA Stat 8000 8300 8500 Numeric mode nlocked 8000 8300 8500 Alpha mode upper case nlocked 8000 8300 8500 Alpha mode lower case nlocked nlocked 8000 8300 8500 Alpha mode upper case Locked 8000 8300 8500 Alpha mode lower case Locked U U 8000 8300 8500 Numeric mode Locked U U 8000 only Function mode 8000 only Function mode Locked ALPHA LOCK 1 GET ALPHA LOCK GET_ALPHA_LOCK Purpose Syntax Remarks To get information of the ALPHA state for input mode A GET_ALPHA LOCK 4 is an integer variable to be assigned to the result Chapter 5 BASIC Commands 103 Example Alpha lock GET_ALPHA_ LOCK See Also ALPHA LOCK 104 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 14 3 FN Key The function FN key serves as a modifier key 1 To enable this modifier key press the function FN key on the keypad and the status icon F will be displayed on the terminal screen 2 Now press another key to get the value of key combination say F1 and then the status icon will go off That is this modifier key can work one time only 3 To get the value of another key combination modified by the function FN key repeat the above steps However on condition that the function
39. 0 Disable Discrete 25 Industrial 25 2D Extra Long 1 Enable Discrete 25 Rance 119 0 Discrete 25 Length Limitation in Fixed Length Format 2D Extra Long 1 Discrete 25 Length Limitation in Max Min Length Format Range 120 Discrete 25 Max Code Length Fixed Length1 2D Extra Long Range 121 Discrete 25 Min Code Length Fixed Length2 2D Extra Long Range Length must be greater than Length2 Length Qualification Because of the weak structure of the 2 of 5 barcodes it is possible to make a short scan error To prevent the short scan error user can define the Length Qualification settings to ensure that the correct barcode is read by qualifying the allowable code length Refer to Codabar Interleaved 25 No N1 Values and Description N2 6 5 0 Disable Interleaved 25 2D Extra Long 1 Enable Interleaved 25 Range 0 DO NOT transmit Interleaved 25 Check Digit 2D Extra Long Range 1 Transmit Interleaved 25 Check Digit 61 0 Interleaved 25 Code Length Limitation in Fixed Length 2D Extra Long Format Range 1 Interleaved 25 Code Length Limitation in Max Min Length Format Interleaved 25 Max Code Length Fixed Length 1 2D Extra Long Range Interleaved 25 Min Code Length Fixed Length 2 2D Extra Long Length must be greater than Length2 Range 140 0 DO NOT verify Interleaved 25 Check Digit 2D Extra Long 1 Verify Interleaved 25 USS Check Digit Range 2 Verify
40. 160 characters total length gt 160 characters Using 8 bit total length lt 140 octets total length gt 140 octets Using 16 bit total length lt 70 characters _ total length gt 70 characters Single Message The diagram below shows the data format for a single message received by calling READ_COM The data length is the number of octets of data Example 20050401 140506 32 lt 0x0d gt lt 0x0a gt 886920123456 lt 0x0d gt lt 0x0a gt lt 0x0A gt Hello Hello EEE fe a Sender Phone Data ee ee 1 byte it 20050401140506 32 lt 0x0d gt lt 0x0a gt 886920123456 lt oxad gt lt tx0a gt HeloHeto Date Time r n Sender Number Length Data Time Zone Indicator Concatenated Message The whole data will be separated into several sections The diagram below shows the data format for a concatenated message received by calling READ_COM The data length is the number of octets of data Example 196 BASIC Programming Guide For Use with CipherLab BASIC Compiler lt 0x40 gt lt 0x02 gt lt 0x02 gt lt 0x0d gt lt 0x0a gt 20050401140506 32 lt 0x0d gt lt 0x0a gt 886 920123456 lt 0x0d gt lt 0x0a gt lt 0x0A gt HelloHello 1 byte 1 byte 1 byte Message Total Number of Sequence in Reference Number Messages Number Sender Phone Data 85 ETTA Reference No Total Number 27 Message
41. 6 Converting for Strings Several commands are available for converting strings to uppercase or lowercase letters as well as converting strings to numbers and vice versa ASC Purpose To return the decimal value for the ASCII code for the first character of a given string Syntax A4 ASC X Remarks 4 is an integer variable to be assigned to the result X is a string variable consisting of characters Example A ASC John Thomas A 74 CHR Purpose To return the character for a given ASCII value Syntax A CHR N Remarks A 15 a string variable to be assigned to the result N is a numeric expression in the range of 0 to 255 Example A CHR 65 AS HEX Purpose To return a string that represents the hexadecimal value base 16 of the decimal argument Syntax 45 HEX N Remarks A is a string variable to be assigned to the result N is a numeric expression in the range of 0 to 2 147 483 647 it is rounded to an integer before HEX N is evaluated Example A HEX 140 A 8C LCASE Purpose To return a copy of a string in which all uppercase letters will be converted to lowercase letters Syntax 448 LCASES X 44 BASIC Programming Guide For Use with CipherLab BASIC Compiler Remarks 4 is a string variable to be assigned to the result X may be a string variable string expression or string constant Example String1 John Thomas String2 LCASE
42. A pe No conversion CCD Laser Convert UPC A to EAN 13 No conversion CCD Laser Enable ISBN Conversion No conversion CCD Laser Enable ISSN Conversion a DO NOT transmit UPC E Check Digit CCD Laser Transmit UPC E Check Digit DO NOT transmit UPC A Check Digit CCD Laser Transmit UPC A Check Digit 1 DO NOT transmit EAN 8 Check Digit CCD Laser Transmit EAN 8 Check Digit oe DO NOT transmit EAN 13 Check Digit CCD Laser Transmit EAN 13 Check Digit DO NOT transmit UPC E System Number CCD Laser Transmit UPC E System Number a DO NOT transmit UPC A System Number CCD Laser Transmit UPC A System Number fo No conversion CCD Laser Convert EAN 8 to EAN 13 ee 0 Disable Negative Barcode CCD Laser 1 Enable Negative Barcode 0 No Read Redundancy for Scanner Port 1 CCD Laser 1 One Time Read Redundancy for Scanner Port 1 2 Two Times Read Redundancy for Scanner Port 1 3 Three Times Read Redundancy for Scanner Port 1 a Not for portable terminals 58 0 Industrial 25 Code Length Limitation in Fixed Length Format CCD Laser 1 Industrial 25 Code Length Limitation in Max Min Length Format Appendix Reader Settings 227 Industrial 25 Max Code Length Fixed Length 1 CCD Laser Industrial 25 Min Code Length Fixed Length 2 CCD Laser 0 Interleaved 25 Code Length Limitation in Fixed Length CCD Laser Format 1 Interleaved 25 Code Len
43. Base is present No base found 1 Example IF CHECK RF BASE 1 THEN END IF See Also SEARCH RF CHANNEL CHECK_RF_SEND 8110 8310 8150 8350 Purpose To check if data has been sent successfully or not 146 BASIC Programming Guide For Use with CipherLab BASIC Compiler Syntax Remarks Example See Also A CHECK RF SEND A is an integer variable to be assigned to the result 0 Fail to send Sent successfully RESEND WRIT_COM 2 A IF CHECK_RF_ SEND 0 THEN GOTO RESEND END IF GET_RF_CHANNEL 8110 8310 8150 8350 Purpose Syntax Remarks Example See Also GET_RF_ID To get the channel number assigned to the terminal A GET_RF CHANNEL 4 is an integer variable to be assigned to the result channel GET_ RF CHANNEL SET_RF_ CHANNEL 8110 8310 8150 8350 Purpose Syntax Remarks Example See Also To get the terminal ID A GET_RF ID 4 is an integer variable to be assigned to the result Id GET_RF ID SET_RF ID GET_RF_POWER 8110 8310 8150 8350 Purpose Syntax Remarks Example See Also To get the level of the RF output power applicable to 433 MHz only A GET_RF POWER 4 is an integer variable to be assigned to the result level GET_RF POWER SET_RF_ POWER Chapter 5 BASIC Commands 149 SEARCH_RF_CHANNEL 8110 8310 8150 8350 Purpose To automatically search for available channels when not being connected to a base for a specific
44. ELSE 2 Remarks condition is a logical expression action is a BASIC statement Example IF Datal gt Data2 THEN Temp Datal ELSE Temp Data2 IF THEN ELSE IF ELSE END IF Purpose To provide a decision structure for multiple line conditional execution Syntax IF condition THEN Statementblock1 ELSE IF condition2 THEN Statementblock2 34 BASIC Programming Guide For Use with CipherLab BASIC Compiler ELSE StatementblockN END IF Remarks condition is a logical expression Statementblock can be multiple lines of BASIC statements Example IF LEFT String1 1 A THEN PRINT String is led by A ELSE IF LEFT String1 1 B THEN PRINT String is led B ELSE PRINT String is not led by A nor B END IF IF THEN END IF Purpose To provide a decision structure for a conditional execution with multiple lines of actions Syntax IF condition THEN action1 action2 END IF Remarks condition is a logical expression action is a BASIC statement Example IF Datal gt Large THEN BEEP 800 30 Large Datal PRINT Current Largest Number 15 Datal END IF ON GOSUB Purpose To call one of the several specified subroutines depending on the value of the expression Syntax ON N GOSUB SubName SubLabel 1 SubName SubLabel Remarks Example Chapter 5 BASIC Commands 35 N is a numeric expression that is rounded to an integer The val
45. Example See Also To send a string to the host through a specified COM port WRITE _COM N A N is an integer variable indicating which COM port the data is to be sent to A is a string variable representing the string to be sent ON READER 1 GOSUB BerData_1 BerData_1 BEEP 2000 5 Data GET READER DATAS 1 WRITE_COM 1 Data CLOSE_COM OPEN_COM READ_COM SET COM TYPE 134 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 18 3 RS 232 Serial IR and IrDA Communications RS 232 Parameters Baud Rate 115200 76800 57600 38400 19200 9600 4800 2400 Data Bits 7 or 8 Parity Even Odd or None Stop Bit 1 Flow Control RTS CTS XON XOFF or None Serial IR Parameters Baud Rate 115200 57600 38400 19200 9600 Data Bits 8 Parity Even Odd or None Stop Bit 1 Flow Control None IrDA Parameters Baud Rate 115200 76800 57600 38400 19200 9600 4800 2400 Data Bits 7 or 8 Parity Even Odd or None Stop Bit 1 Flow Control None Note For IrDA settings parameters are required for compatibility in coding In fact they are don t care parameters COM_DELIMITER Purpose To change delimiter of sending and receiving string for a specified COM port Syntax COM DELIMITER N C Remarks The default COM DELIMITER is 0x0d N is an integer variable indicating which COM port is to be set C is an integer variable representing the ASCII code of the delim
46. Files Barcode Setting Function Operation Function Operation Function Operation Function Operation Chapter 3 Using CipherLab BASIC Compiler 15 To set the properties of the secondary COM port Click Configure on the menu bar and select Secondary COM Port Setting Select the desired settings for each property in the pop up window To define the transaction files up to 6 to be used and the data length for each transaction file Once the data length is defined the system will reserve space for the program If the space is larger than needed it would be a waste On the other hand when space is insufficient data will be truncated to fit in Share file space with other applications is enabled by default which means the same transaction file will not be deleted after new program is downloaded If disabled user can get larger file system size Click Configure on the menu bar and select Configure Transaction Files In the pop up window check the box to enable the use of a transaction file and type the data length for each enabled transaction file To define the DBF files up to 5 to be used and the IDX files for each DBF file Click Configure on the menu bar and select Create DBF Files In the pop up window type the total record length for each DBF file and define the offset and length for the IDX files To configure the system parameters for barcode symbologies and scanner performa
47. GOSUB is called N is the line number of the subroutine to branch to ON_KEY N Indicating the command ON KEY GOSUB is called N is the line number of the subroutine to branch to ON_MINUTE_ SHARP N Indicating the command ON MINUTE_SHARP GOSUB is called N is the line number of the subroutine to branch to ON_ POWER _ON N Indicating the command ON POWER_ON GOSUB is called N is the line number of the subroutine to branch to Appendix V Debugging Messages 279 ON_READER N1 N2 Indicating the command ON READER GOSUB 15 called N1 is the number of the reader port N2 is the line number of the subroutine to branch to ON_TCPIP N Indicating the command ON TCPIP GOSUB is called N is the line number of the subroutine to branch to ON_TIMER N1 N2 Indicating the command ON TIMER GOSUB is called ON_TOUCHSCREEN N Indicating the command ON TOUCHSCREEN GOSUB is called N is the line number of the subroutine to branch to OPEN _COM N Indicating the command OPEN_COM is processed N is the number of the COM port R Indicating the logical operation OR is processed POWER _ON N Indicating the command POWER _ON is processed N is the value of the setting PUT PEL PUTKEA RANLSIZE READ _COM N Indicating the command READ _COMS is processed N is the number of the COM port READER CONFIG Indicating the command READER CONFIG is processed READER SETTING N1 N2 _ Indicating the command READER_ SETTI
48. If it is set to 1 the system will not transmit any delimiter TCP_OPEN 0 0 0 0 0 0 23 TCP_OPEN 1 0 0 0 0 0 24 TCP_OPEN 2 0 0 0 0 0 25 1 TCP_OPEN 3 0 0 0 0 0 26 0 59 GET_TCPIP_MESSAGE NCLOSE NREAD NWRITE OFF TCPIP ON TCPIP GOSUB SOCKET CAN SEND SOCKET HAS DATA SOCKET OPEN START TCPIP STOP TCPIP TCP_ERR CODE Chapter 5 BASIC Commands 177 WLAN Example Note Network Configuration Generally network configuration has to be done in advance by calling GET_NET_PARAMETERS and SET_NET_PARAMETER Initialization of Networking Protocol Stack amp Wireless Module The wireless module such as of 802 11b Bluetooth or GSM GPRS will not be powered until START TCPIP is called Model WLAN PAN GPRS DUN GPRS 8061 e STARTTCPIP START TCPIP 3 8360 dhs STARTTCPIP START TCPIP 3 8071 STARTTCPIP 8370 STARTTCPIP o sh 8330 START TCPIP START te START START TCPIP 1 TCPIP 3 TCPIP 0 8500 START TCPIP START START START START TCPIP 1 TCPIP 2 TCPIP 3 TCPIP 0 For IR RS 232 networking use START TCPIP 4 for PPP via IR START TCPIP 5 for PPP via RS 232 and START TCPIP 6 for Ethernet via IR Network Status GET_TCPIP_MESSAGE The START TCPIP routine does the first stage of the initialization process and it will generate a system task to finish the rest of the process When START TCPIP returns the initialization proces
49. Interleaved 25 OPCC Check Digit Code 39 Appendix Symbology Parameters 251 0 No conversion 2D Extra Long 1 Convert Interleaved 25 to EAN 13 Range Transmit Check Digit If this parameter is enabled the checksum character will be included in the data being transmitted Length Qualification Because of the weak structure of the 2 of 5 barcodes it is possible to make a short scan error To prevent the short scan error user can define the Length Qualification settings to insure that the correct barcode is read by qualifying the allowable code length Refer to Codabar Verify Check Digit If this parameter is enabled the terminal will perform checksum verification when decoding barcodes If the checksum is incorrect the barcode will not be accepted Convert to EAN 13 Interleaved 25 barcode must have a leading zero and a valid EAN 13 check digit Note Convert Interleaved 25 to EAN 13 cannot be enabled unless its checksum verification is disabled 0 noni vaesandossciptonqsy Senne 0 Disable Code 39 2D Extra Long 2 0 Disable Code 32 Italian Pharmacode 2D Extra Long Se 23 0 DO NOT verify Code 39 Check Digit 2D Extra Long 24 0 DO NOT transmit Code 39 Check Digit 2D Extra Long ee ee 0 Standard Code 39 2D Extra Long r 0 Code 39 Length Limitation in Fixed Length Format 2D Extra Long Range 1 Code 39
50. Min Code Length Fixed Length2 2D Length must be greater than Length2 0 Discrete 25 Length Limitation in Fixed Length Format 2D Extra Long Range 1 Discrete 25 Length Limitation in Max Min Length Format Discrete 25 Max Code Length Fixed Length 2D Extra Long Range Discrete 25 Min Code Length Fixed Length2 2D Extra Long Length must be greater than Length2 0 Codabar Length Limitation in Fixed Length Format 2D Extra Long 1 Codabar Length Limitation in Max Min Length Format Range Codabar Max Code Length Fixed Length1 2D Extra Long Range Codabar Min Code Length Fixed Length2 2D Extra Long Length must be greater than Length2 Range 0 DO NOT transmit US Postal Check Digit 1 Transmit US Postal Check Digit Appendix Reader Settings 235 0 Disable Maxicode 2D 0 Disable Data Matrix 1 Enable Data Matrix 0 Disable QR Code 1 Enable QR Code 0 Disable US Planet 1 Enable US Planet 0 Disable US Postnet 1 Enable US Postnet 0 Disable MicroPDF417 1 Enable MicroPDF417 0 Disable PDF417 1 Enable PDF417 0 Disable MicroPDF417 Code 128 Emulation 1 Enable MicroPDF417 Code 128 Emulation 0 Disable Australian Postal 1 Enable Australian Postal 0 Disable Dutch Postal 1 Enable Dutch Postal 0 Disable UK Postal Check Digit 1 Enable UK Postal Check Digit 0 Disable UK Postal 1 Enable UK Postal 0 Disable Joint Configuration 2D Extra Long 1 Enable J
51. ON READER 2 GOSUB GetSlotReader 27 CHAPTER 5 BASIC Commands This chapter provides detailed descriptions of the commands supported by the CipherLab BASIC Compiler In addition to the commands commonly used in traditional versions of BASIC a number of commands that deal with specific hardware features of the CipherLab portable terminals are supported These commands are within user s BASIC programs to perform a wide variety of tasks such as communications LCD buzzer scanner file manipulation etc They are categorized and described in this chapter by their functions or the resources they work on Some commands are postfixed with a dollar sign which means a string is returned with the command The compiler will accept these commands with or without the dollar sign However the dollar sign will be postfixed to these commands in this manual and the sample program The description for each BASIC command consists of five parts Purpose Syntax Remarks Example and See Also which are further described below Purpose The purpose of the command is briefly explained Syntax According to the following conventions the command syntax is described CAPS BASIC keywords are indicated by capital letters Italics Items in Italics represent variable information to be supplied by user Square brackets indicate optional parameters Braces indicate an item may be repeated as many times as necessary Vert
52. RSS Expanded Code ID CCD Laser 1 Transmit RSS Expanded Code ID 1 0 Disable Telepen CCD Laser 0 Disable Telepen CCD Laser 1 0 Enable UPC E0 CCD Laser epe 0 Disable GTIN CCD Laser 0 Disable UPC E1 Triple Check CCD Laser 1 Enable UPC E1 Triple Check Appendix Reader Settings 229 Symbology Parameter Table II Note Those marked with asterisks are further explained in each symbology of Appendix II No N1 Values and Description N2 1 0 Disable Code 39 2D Extra Long 1 Enable Code 39 Range 0 Disable Code 32 Italian Pharmacode 2D Extra Long 1 Enable Code 32 Range N A 0 Disable Interleaved 25 2D Extra Long 0 Disable Codabar NW7 2D Extra Long 0 Disable Code 93 2D Extra Long 0 Disable Code 128 2D Extra Long 10 0 Disable UPC EO depends 2D Extra Long 13 0 Disable EAN 8 depends 2D Extra Long 16 0 Disable EAN 13 depends 2D Extra Long 11 0 12 0 0 Disable Only Addon 2 amp 5 of UPC amp EAN Families 2D Extra Long z T a It requires ALL of the indexes to be set 0 Range 107 or 109 1 Enable Only Addon 2 amp 5 of UPC amp EAN Families It requires ANY of the indexes to be set 1 19 0 Disable MSI 2D Extra Long 1 Enable MSI Race 5 gt 0 230 BASIC Programming Guide For Use with CipherLab BASIC Compiler Reserved ee 0 DO NOT v
53. Syntax Remarks Example See Also To move the file pointer of a specified DBF and IDX files one record forward MOVE TO NEXT file index file is an integer variable in the range of to 5 indicating which DBF file to be accessed index is an integer variable in the range of 1 to 3 indicating which IDX file to be accessed If it is not specified the default IDX file which keeps the original data sequence will be used MOVE TO NEXT 1 1 MOVE TO MOVE TO PREVIOUS MOVE_TO_PREVIOUS Purpose Syntax Remarks Example See Also To move the file pointer of a specified DBF and IDX files one record backward MOVE _TO_ PREVIOUS file index file is an integer variable in the range of to 5 indicating which DBF file to be accessed index is an integer variable in the range of 1 to 3 indicating which IDX file to be accessed If it is not specified the default IDX file which keeps the original data sequence will be used MOVE TO PREVIOUS 1 1 MOVE MOVE TO NEXT RECORD_COUNT Purpose Syntax To get the total number of the records in a specified DBF file A RECORD_COUNT file 212 BASIC Programming Guide For Use with CipherLab BASIC Compiler Remarks Example 4 is an integer variable to be assigned to the result file is an integer variable in the range of to 5 indicating which DBF file to be accessed TotalRecord_1 RECORD_ COUNT 1 UPDATE_RECORD Purpose
54. TCPIP must be called to shut down the network as well as the modules so that power can be saved To enable the network again START TCPIP must be called again Note Any previous network connection and data will be lost after calling STOP TCPIP 166 BASIC Programming Guide For Use with CipherLab BASIC Compiler START TCPIP 8000 8300 8500 Purpose 10 enable TCP IP communication Syntax START TCPIP START TCPIP V Remarks 15 routine is used to perform general initialization It must be the first network function call and cannot be called again unless STOP TCPIP has been called N is an integer variable indicating which wireless module is to be used 802 11b default Bluetooth PAN GPRS Mobile s GPRS via Bluetooth DUN PPP Connection via IR PPP Connection via RS 232 Ethernet Connection via IR Example START TCPIP this is hardware dependent See Also OFF TCPIP ON TCPIP GOSUB STOP TCPIP TCP_ERR_ CODE TCP_OPEN STOP TCPIP 8000 8300 8500 Purpose To disable TCP IP communication Syntax STOP TCPIP Remarks Example STOP TCPIP See Also START TCPIP TCP_OPEN Chapter 5 BASIC Commands 167 5 21 4 Network Status Once the network has been initialized there is some status information can be retrieved from the system It will be periodically updated by the system User program must explicitly call GET_NET_STATUS to get the latest status Configuration Item Return Value 1 WLAN State Disabled c
55. are provided on this menu lolx File Edit Configure Compile Help New Ctrl N Open Ctrl 0 Save s Print Ctrl P Alt F4 Exit Saves the active document Ui Command To Do New Function To create a new BASIC program Operation Click File on the menu bar and select New For the same function press hot key CTRL N or click the New icon on the tool bar Open Function To open an existing BASIC program Operation Click File on the menu bar and select Open For the same function press hot key CTRL O or click the Open icon on the tool bar Save Function To save the current editing BASIC program Operation Click File on the menu bar and select Save For the same function press hot key CTRL S or click the Save icon on the tool bar Save As Function To save the current editing BASIC program with a new name Operation Click File on the menu bar and select Save As Enter a new name in the pop up window Then click the Save button to save this program with the new file name Print Exit Function Operation Function Operation Chapter 3 Using CipherLab BASIC Compiler 11 To print the current editing BASIC program Click File on the menu bar and select Print For the same function press hot key CTRL P or click the Print icon on the tool bar To quit the BASIC Compiler Click File on the menu bar and select Exit Fo
56. bps Parity Specifies the parity of the COM port 1 7 data bits Specifies the data bits of the COM port 2 8 data bits 1 None Specifies the method of flow control for the 2 88 8 Pott 3 XON XOFF If a certain COM port has been used in the BASIC program it is better to use another COM port for debugging to avoid conflicts Example START DEBUG 1 1 1 2 1 use COMI to send debug messages the COM port properties are 115200 None 8 No handshake See Also STOP DEBUG STOP_DEBUG Purpose To terminate the debug function Syntax STOP DEBUG Remarks This is the counter command of START DEBUG Example STOP DEBUG See Also START DEBUG Chapter 5 BASIC Commands 219 5 25 Reserved Host Commands There are some commands reserved for the host computer to read remove data of the transaction file or to adjust the system time User s BASIC program does not need to do any processing because these tasks will be processed by the background routines of the BASIC run time Note Each reserved command is ended with a carriage return which can be changed by COM_DELIMITER If any format error occurs the terminal would return NAK CLEAR Purpose Syntax Remarks Example See Also To erase data of a specified transaction file 48 CLEAR A CLEAR file The command CLEAR will clear data of the first transaction file which is the default one A is a string variable to be
57. characters two characters will be transmitted together with data Convert to UK Plessey If this parameter is enabled the terminal will change each occurrence of the character A to character X in the code RSS Family No Ja Values and Description N2 pene 0 Disable RSS Limited CCD Laser 1 Enable RSS Limited 75 0 Disable RSS Expanded CCD Laser Te ol 0 Disable RSS 14 CCD Laser NOT transmit RSS 14 Code ID CCD Laser smit RSS 14 Code ID NOT transmit RSS 14 Check Digit CCD Laser mit RSS 14 Check Digit NOT transmit RSS Limited Code ID CCD Laser 1 Transmit RSS Limited Code ID NOT transmit RSS 14 Application ID CCD Laser mit RSS 14 Application ID Appendix Symbology Parameters 245 0 DO NOT transmit RSS Limited Application ID CCD Laser 1 Transmit RSS Limited Application ID ica 0 DO NOT transmit RSS Limited Check Digit CCD Laser 1 Transmit RSS Limited Check Digit eee 0 DO NOT transmit RSS Expanded Code ID CCD Laser 1 Transmit RSS Expanded Code ID Transmit Code ID If this parameter is enabled the default Code ID 0 will be included in the data being transmitted Transmit Application ID If this parameter is enabled the Application ID will be included in the data being transmitted Transmit Check Digit If this parameter is enabled the check digit will be included in the data being transmitted Telepen No Value
58. elapsed since the terminal is powered on A amp TIMER 4 amp is a long integer variable to be assigned to the result Note that the TIMER is a read only function The system timer cannot be set by this command StartTime amp TIMER Loop IF EndTime amp lt gt TIMER THEN EndTime amp TIMER TimerElapsed amp EndTime amp StartTime amp CLS PRINT TimerElapsed amp IF TimerElapsed amp gt 100 THEN GOTO NextStep END IF GOTO Loop NextStep OFF TIMER ON TIMER GOSUB WAIT Purpose Syntax Remarks Example See Also To put the system on hold for a specified duration In the interval the system will be running in a rather low power consumption mode WAIT duration duration is a positive integer variable indicating the time duration for a hold This argument is specified in units of 5 milliseconds When the application is waiting for events in a loop the power consumption will be dramatically reduced by calling this function Note that WAIT is more efficient than CHANGE SPEED PRINT CipherLab BASIC WAIT 200 the system is on hold for 1 second CHANGE_SPEED 98 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 13 LED Command The LED can be used to indicate terminal status for example Good Read or No Good when scanning a barcode LED Purpose 10 specify the LED lighting behavior Syntax LED number mode duration Remarks number 15 a positive integ
59. group 1 3 set 0 to get the Base s group Return GPbbGoGn r bb Base ID 01 16 Go Original group 1 3 Gn New group 1 3 Header of Data Packets HD RF Base Purpose To enable or disable the header of a data packet By default the data received will be prefixed with DTbbtt where bb refers to Base ID and tt refers to Terminal ID If the header is disabled there will be no prefix at all 154 BASIC Programming Guide For Use with CipherLab BASIC Compiler Syntax HDbbce r bb Base ID 01 16 set 0 to disable the header set 1 to enable the header default enable Return HDbbCoCn r bb Base ID 01 16 Co Original setting 1 4 Cn New setting 1 4 Change ID ID RF Base Purpose To change the Base ID Syntax IDbbBB r bb Original Base ID 01 16 BB New Base ID 01 16 Return IDbbBB r bb Original Base ID 01 16 BB New Base ID 01 16 Set Get Mode ME RF Base Purpose To set or get the Base s mode Syntax MEbbm r bb Base ID 01 16 m Base mode 1 3 set 0 to get the Base s mode Get info Standalone Slave Master Return MEbbmomn r bb Base ID 01 16 mo Original mode 1 3 mn New mode 1 3 Chapter 5 BASIC Commands 155 Change Output Power PW RF Base 433 MHz only Purpose Syntax Return To change the Base s output power PWbbp r bb Base ID 01 16 p Power level 1 5 set 0 to get the Base s output powe
60. help file will be opened Type a string for searching or directly click on the listed index entry for viewing further information About Function To display the ownership and version of the program Note that the version information is necessary when tracing a programming problem Operation Click Help on the menu bar and select About The pop up message box declares the ownership and version information of the program 19 CHAPTER 4 Basics of the CipherLab BASIC Language In This Chapter AM Comstaints oie ioeetees este tee 19 4 2 Var ables 3253 2 Achocsetessavavh aie 20 4 3 Expression and Operators 59 99 21 4 4 Operator 16 6 eeceesceeseesteeeteeetseeseesteeeens 23 AS abel ss asses 23 4 6 Subroutines 4 4 443443 5435544594659 24 4 7 Programming 58 106 5 5 09559 555 095999599959999999999 96 26 4 1 Constants Constants are the actual values that BASIC uses during execution There are two types of constants String Numeric 4 1 1 String A string constant is a sequence of up to 255 alphanumeric characters or symbols enclosed in a pair of double quotation marks Hello 20 000 00 12 students 4 1 2 Numeric Numeric const
61. interval between each triggering does not exceed one second The reader is always scanning will decode once for the same barcode and allow for re transmission when triggering within one second Momentary Mode Hold down the scan trigger to start scanning The scanning continues until the trigger is released Appendix Ill Scanner Parameters 267 Alternate Mode Press the scan trigger to start scanning The scanning continues until the trigger is pressed again Aiming Mode This mode best applies when two barcodes are printed too close to each other It is necessary to take aim first to make sure the correct barcode will be scanned Press the scan trigger to aim at a barcode Within one second press the trigger again to decode the barcode The scanning continues until one of the events happens 1 A barcode is read 2 The preset timeout expires Note The system global variable AIMING TIMEOUT can be used to change the default one second timeout interval for aiming The unit for this variable is 5 ms Laser Mode This mode is most often used on laser scanners Hold down the scan trigger to start scanning The scanning continues until one of the events happens 1 A barcode is read 2 The preset timeout expires 3 The trigger is released Auto Off Mode This is the default mode The reader will start to scan once the scan trigger is pressed The scanning continues until
62. is decided through programming but no less than two seconds x y are integer variables indicating the x y coordinates of the upper left point of a hourglass type is an integer variable indicating the size of a hourglass 24 x 23 pixels 112 BASIC Programming Guide For Use with CipherLab BASIC Compiler Example WAIT HOURGLASS 68 68 1 show a 24 x 23 pixels hourglass at 68 68 5 15 4 Clear Chapter 5 BASIC Commands 113 CLR_RECT Purpose Syntax Remarks Example See Also CLS Purpose Syntax Remarks Example See Also To clear a rectangular area on the LCD CLR_RECT x y size_x size_y x y are integer variables indicating the x y coordinates of the upper left point of the rectangular area size_x is an integer variable indicating the width of the rectangle in pixels size_y is an integer variable indicating the height of the rectangle in pixels CLR_RECT 1 1 20 20 CLS FILL_RECT To clear everything on the LCD CLS After running this command whatever is being shown on the LCD will be erased and the cursor will be move to 1 1 ON TIMER 1 200 GOSUB ClearScreen TIMER 1 2 second ClearScreen OFF TIMER 1 CLS RETURN CLR_RECT PRINT 114 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 15 5 Image The command SHOW_IMAGE can be used to display images on the LCD User needs to allocate a string variable to store the bitmap data of the i
63. is defined as COM4 Thus OPEN COM 4 enable the RFID module CLOSE COM 4 disable the RFID module A READ 0 45 4 read data from an RFID tag WRITE COM 4 write data to an RFID tag ON COM 4 GOSUB and OFF COM 4 5 8 2 Data Format Before reading and writing operations the parameters of RFID must be specified The 4 of format are described below 9296 Description Reserved ISO 58176 ISO Icode Tagit ISO 14443B 14443A 15693 start Specify the starting byte of data for the read write operation MaxLen Read Specify the maximum data length 1 255 Set 0 so that it reads UID data only Write Write Reserved Any integer value is acceptable When an RFID tag is read the data string includes Tag Type UID and Data The data format for READ 3 45 4 is as follows Byte 1 Byte 2 18 Byte 19 xx Tag Type TAG_ISO15693 Tag UID SN Data TAG Tagit TAG _Icode TAG _MifareISO14443A TAG SRI176 TAG ISO14443B Chapter 5 BASIC Commands 81 SET_RFID_READ 8300 8500 Purpose Syntax Remarks Example See Also To set the reading parameters of RFID SET_RFID_READ TagType amp start MaxLen The RFID reader cannot read until the parameters are specified SET_RFID_READ 1 0 20 read tag type ISO 15693 starting from byte 0 of data data length 20 bytes A READ _COM 4 CLOSE_COM OPEN _COM READ COM SET _RFID_ WRITE WRITE COM SET_RFID_WRITE 8300 850
64. is in the range of 2 147 483 648 to 2 147 483 647 ON HOUR_SHARP GOSUB OnHourAlarm OnHourAlarm Hour VAL LEFT TIME 2 FOR Counter 1 TO Hour BEEP 800 50 WAIT 200 NEXT RETURN VALR Purpose Syntax Remarks Example To convert a string expression to a real number A VALR X A is a real number variable to be assigned to the result X is a string that includes numeric characters The precision of the converted result is governed by the command SET_PRECISION A VALR 123 45 PRINT A A REM A 123 45 46 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 4 7 Creating Strings of Repeating Characters STRING Purpose Syntax Remarks Example To return a string containing the specified number of the requested character A STRINGS N J A STRINGS N X A is a string variable to be assigned to the result N is a numeric expression in the range of 0 to 255 indicating the number of a character J is a numeric expression in the range of 0 to 255 indicating the ASCII code of a character X may be a string variable or string constant IDX_LENGTH 20 Data Name STRING UIDX_LENGTH LEN Name ADD_RECORD 1 Data padding with space if the length of Name 15 less than IDX_LENGTH Chapter 5 BASIC Commands 47 5 5 Commands for Event Trapping An event is an action recognized by the terminal such as a function keystroke is det
65. it by one record at a time Be aware that whenever you need to write data to any used record the whole memory bank needs to be erased otherwise this command will fail err FLASH _WRITE 1 data number 1 err FLASH _WRITE 256 data number 256 FLASH _READ Purpose Syntax Remarks Example See Also To get the size of the whole flash memory in kilo bytes A ROM SIZE 4 is an integer variable to be assigned to the result PRINT Flash size ROM_ SIZE FREE MEMORY RAM SIZE 216 BASIC Programming Guide For Use with CipherLab BASIC Compiler 9 23 2 SRAM The File System keeps user data in SRAM which is maintained by the backup battery However data loss may occur during low battery condition or when the battery is drained It is necessary to upload data to a host computer before putting away the terminal FREE_MEMORY Purpose To get the size of free data memory SRAM in bytes Syntax A amp FREE MEMORY Remarks A amp 15 a long integer variable to be assigned to the result Example PRINT Free memory FREE MEMORY See Also RAM _ SIZE ROM SIZE Purpose To get the size of the whole data memory SRAM in kilo bytes Syntax A RAM SIZE Remarks A is an integer variable to be assigned to the result Example PRINT SRAM size RAM SIZE See Also FREE MEMORY ROM SIZE Chapter 5 BASIC Commands 217 5 24 Debugging Commands The command START_DEBUG will write the activities happening on the system to a
66. its location This is called roaming If the terminal is set to be able to auto search available channels nearby whenever it cannot find the base that it is registered to it will change its channel and try to connect to another base inside the system With this auto switching capability the virtual working area for one terminal is not restricted to the coverage one base but to the overall coverage of the whole system 5 20 4 RF System Deployment Before deploying an RF system these tasks need to be carried out site survey and planning installation and testing Site Survey amp Planning Below are the guidelines for site surveying and planning Test the base station s coverage The coverage may be affected by several environmental factors such as Background noise from other equipment Interference from other RF systems nearby Shielding by metallic or concrete structures of the building Humidity and other wave absorption materials Estimate the number of base stations as needed Estimate the number of terminals as needed Determine the base station s deployment topology Installation If possible always install the RF base close to the center of the working floor to deliver better coverage For the antenna to access as much free space as possible install the base to a higher position 146 BASIC Programming Guide For Use with CipherLab BASIC Compiler Testing Select the maximum output power 10 dbm to te
67. keypad this setting is meaningless To set Lower Position add 16 to the value of the second element of WedgeSetting Wedge 25 To set Upper Position add 24 to the value of the second element of WedgeSetting Wedge 25 66 BASIC Programming Guide For Use with CipherLab BASIC Compiler Shift Capital Lock Keyboard This setting can force the command SEND_WEDGE to treat the keyboard type to be a shift lock keyboard or a capital lock keyboard This setting will be effective only when the keyboard type selected is PCAT all available languages PS2 30 PS55 or Memorex Telex To set Capital Lock add 4 to the value of the second element of WedgeSetting Wedge 25 To set Shift Lock add 6 to the value of the second element of WedgeSetting Wedge 25 Digit Transmission This setting instructs the command SEND_WEDGE which group of keys is used to transmit digits whether to use the digit keys on top of the alphabetic keys or use the digit keys on the numeric keypad To set Use Numeric Keypad to Transmit Digits add 2 to the value of the second element of WedgeSetting Wedge 25 Note DO NOT set Digits Position and Shift Capital Lock Keyboard unless you are certain to do so 3 Element Inter Character Delay A millisecond inter character delay in the range of 0 to 255 can be added before transmitting each character This is used to provide some response ti
68. may be a combination of constants and variables with operators to produce a single value Operators perform mathematical or logical operations The operators provided by the CipherLab BASIC Compiler may be divided into four categories namely Assignment Operator Arithmetic Operators Relational Operators and Logical Operators 4 3 1 Assignment Operator The CipherLab BASIC Compiler supports an assignment operator 22 BASIC Programming Guide For Use with CipherLab BASIC Compiler For example Length 100 PI 3 14159 Company CipherLab Co Ltd 4 3 2 Arithmetic Operator The arithmetic operators are Operator Operation A Exponentiation Negation unary Multiplication Division integer Division real Addition Subtraction MOD Modulo arithmetic 4 3 3 Relational Operator Sample Expression A 943 A B 1 B C 1 A B C A B C A B MOD C Relational operators are used to compare two values The result of the comparison is either True or False This result may then be used to make a decision regarding program flow Operator Operation Equality lt gt Inequality gt lt Inequality gt Greater than lt Less than gt Greater than or equal to lt Less than or equal to Sample Expression A B A lt gt B A gt lt B A gt B A lt B A gt B A lt B 4 3 4 Logical
69. options for these barcodes UPC Never Linked To transmit UPC barcodes regardless of whether a 2D barcode is detected UPC Always Linked To transmit UPC barcodes and the 2D portion e Autodiscriminate UPC Composite To transmit UPC barcodes as well as the 2D portion if present Note If UPC Always Linked is enabled either CC A B or CC C must be enabled Otherwise it will not transmit even there are UPC barcodes UCC EAN Composite Code No se Values and Description N2 eae 0 Disable UCC EAN Code 128 Emulation Mode for UCC EAN 2D Composite Code 1 Enable UCC EAN Code 128 Emulation Mode for UCC EAN Composite Code 262 BASIC Programming Guide For Use with CipherLab BASIC Compiler 2D Symbologies Data Matrix No N1 Values and Description N2 127 0 Disable Data Matrix 2D 1 Enable Data Matrix Maxicode No N1 Values and Description N2 126 0 Disable Maxicode 2D 1 Enable Maxicode PDF417 onr 131 132 33 0 Disable MicroPDF417 2D 0 Disable PDF417 2D D 1 0 Disable MicroPDF417 Code 128 Emulation 2 1 Enable MicroPDF417 Code 128 Emulation Index No 131 for MicroPDF417 is required to be 1 146 Macro PDF Transmit Decode Mode 2D 0 Passthrough all symbols 1 Buffer all symbols Transmit Macro PDF when complete 2 Transmit any symbol in set No particular order 0 Disable Macro PDF Escape Characters 2D 1 Enable
70. overflow Abnormal break during connection Networking initialization error Port initialization error Connection 0 connected Connection 1 connected Connection 2 connected Example See Also IP_CFG or IP_CONFIGURE Connection 3 Connection 0 Connection 1 Connection 2 Connection 3 Connection 0 Connection 1 Connection 2 Connection 3 Chapter 5 BASIC Commands 171 connected disconnected disconnected disconnected disconnected data is coming data is coming data is coming data is coming IP is ready ON TCPIP GOSUB TCPIP_ Trigger TCPIP_ Trigger MSG GET_TCPIP_ MESSAGE OFF TCPIP ON TCPIP GOSUB TCP_OPEN 8000 8300 8500 Purpose Syntax Remarks Example See Also NCLOSE To configure the TCP IP setting IP_CFG index IP or IP_CONFIGURE index IP This command is to be replaced by SET_NET_PARAMETER Note that it is not necessary to configure the setting every time index is an integer variable indicating a specific configuration item JP is a string variable indicating the IP address that is to be configured IP_CFG 1 192 168 1 241 IP_CFG 2 255 255 255 0 IP_CFG 3 192 168 1 250 set IP of default gateway IP_CFG 4 168 95 1 1 set IP of DNS server SET_NET PARAMETER TCP_ERR CODE set local IP set IP of subnet mask Purpose Syntax Remarks 8000 8300 8500 To close a TCP IP connection NCLOSE N N is an in
71. program data will be deleted after the battery is replaced or the System Menu is launched Example Chapter 5 BASIC Commands 201 PRINT Remove all the transaction data Y N Loop KeyData INKEY IF KeyData THEN GOTO Loop ELSE IF KeyData Y THEN EMPTY TRANSACTION END IF See Also DEL TRANSACTION DATA EMPTY TRANSACTION EX EMPTY_TRANSACTION_EX Purpose Syntax Remarks Example See Also To remove all the transaction data from a specified transaction file EMPTY TRANSACTION EX file file is an integer variable in the range of 1 to 6 indicating which transaction file the command is to affect The command EMPTY TRANSACTION EX 1 works the same as the command EMPTY TRANSACTION Note that if this function is called at the beginning of the program data will be deleted after the battery is replaced or the System Menu is launched EMPTY TRANSACTION EX 6 DEL TRANSACTION DATA EX EMPTY TRANSACTION GET_TRANSACTION_DATA Purpose Syntax Remarks Example To read a transaction record from the default transaction file A GET_TRANSACTION DATAS N A is a string variable to be assigned to the transaction data N is an integer variable indicating the ordinal number of the record to be read from the first transaction file WHILE TRANSACTION_COUNT gt 0 TransactionData GET TRANSACTION DATA 1 WRITE _COM I TransactionData DEL_TRANSACTION DATA 1 202 BASIC Programming Guide For
72. size_x size_y Purpose Syntax Remarks DataCount is an integer variable to be assigned to the result it is the total data count stored in the specified transaction file file_index is an integer variable in the range of 1 to 6 indicating which transaction file is to store the bitmap data x y are integer variables indicating the x y coordinates of the upper left point oft the rectangular area 116 BASIC Programming Guide For Use with CipherLab BASIC Compiler size_x is an integer variable indicating the width of the rectangle in pixels size_y is an integer variable indicating the height of the rectangle in pixels Example GET IMAGE 3 12 32 60 16 See Also GET TRANSACTION DATA GET_TRANSACTION DATA EX SET _SIGNAREA SHOW_IMAGE Purpose To put a bitmap pattern to a rectangular area on the LCD Syntax SHOW _IMAGE x y size_x size_y image Remarks x y are integer variables indicating the x y coordinates of the upper left point of the rectangular area size_x is an integer variable indicating the width of the rectangle in pixels size_y is an integer variable indicating the height of the rectangle in pixels image is a string variable containing the bitmap data of the image Example icon chr 0 chr 0 chr 0 chr 0 chr 254 chr 255 chr 1 show_image 2 0 56 1 icon See Also GET IMAGE 5 15 6 Graphics Chapter 5 BASIC Commands 117 Factors to Monochro
73. specified If Max Min Length is selected the maximum length and the minimum length must be specified The terminal will only accept those barcodes with lengths that fall between max min lengths specified Interleaved 25 Refer to Industrial 25 No N1 Values and Description N2 Gae 5 0 Disable Interleaved 25 CCD Laser 1 Enable Interleaved 25 1 Verify Interleaved 25 Check Digit 0 DO NOT verify Interleaved 25 Check Digit CCD Laser 240 BASIC Programming Guide For Use with CipherLab BASIC Compiler 29 0 DO NOT transmit Interleaved 2 Check Digit CCD Laser 1 Transmit Interleaved 25 Check Digit Select Interleaved 25 Start Stop Pattern CCD Laser 0 Use Industrial 25 Start Stop Pattern 1 Use Interleaved 25 Start Stop Pattern 2 Use Matrix 25 Start Stop Pattern 0 Interleaved 25 Code Length Limitation in Fixed Length CCD Laser Format 1 Interleaved 25 Code Length Limitation in Max Min Length Format 62 Interleaved 25 Max Code Length Fixed Length 1 CCD Laser 63 Interleaved 25 Min Code Length Fixed Length 2 CCD Laser Matrix 25 Refer to Industrial 25 Monna 6 0 Disable Matrix 25 CCD Laser 1 Enable Matrix 25 ee 0 DO NOT verify Matrix 25 Check Digit CCD Laser 1 Verify Matrix 25 Check Digit ae 0 DO NOT transmit Matrix 25 Check Digit CCD Laser 1 Transmit Matrix 25 Check Digit Pe 0 Matrix 25 Code Length Limitation in Fixed
74. the communication ports Model COM1 COM2 COM3 COM4 8000 Serial IR IrDA Acoustic Coupler N A Bluetooth 8300 RS 232 Serial IR IrDA RF Bluetooth N A N A N A N A N A Note The Bluetooth profiles supported on the 8000 8300 8500 series include SPP DUN and HID The same command set is provided for the above interface OPEN_COM CLOSE_COM READ_COM and WRITE_COM Commands for triggering the COM event OFF COM ON COM GOSUB 5 18 2 Receive amp Transmit Buffers Receive Buffer A 256 byte FIFO buffer is allocated for each port The data successfully received is stored in this buffer sequentially if any error occurs e g framing parity error etc the data is simply discarded However if the buffer is already full the incoming data will be discarded and an overrun flag is set to indicate this error 130 BASIC Programming Guide For Use with CipherLab BASIC Compiler Transmit Buffer The system does not allocate any transmit buffer It simply records the pointer of the string to be sent The transmission stops when a null character 0x00 is encountered The application program must allocate its own transmit buffer and not to modify it during transmission The rest communication related commands are grouped by different communication types and described separately in the following sections CLOSE_COM Purpose To terminate communication and disable a specified COM port Syntax CLOSE_COM N R
75. the system Example SET RF TIMEOUT 5 See Also SEARCH RF CHANNEL Chapter 5 BASIC Commands 151 5 20 6 RF Base Properties The RF terminals must communicate with the RF base stations Below are the RF properties on base stations 433 MHz Base Properties 3510 Mode 1 standalone 2 slave 3 master Channel 1 4 ID 01 16 Group 1 3 Timeout 1 99 seconds duration of retries for sending data Output Power 1 5 levels 10 5 4 0 5 dbm Baud Rate 115200 57600 38400 19200 9600 2 4 GHz Base Properties 3550 Mode 1 standalone 2 slave 3 master Channel 1 6 ID 01 16 Group 1 Timeout 1 99 seconds duration of retries for sending data Output Power 1 level 100 mW Baud Rate 115200 57600 38400 19200 9600 Note Ifmore than two base stations are connected together the one connected to the host computer needs to be set to master mode while the rest to slave mode RS 232 Host Commands Set Automatically Update Status AT RF Base Purpose To update information of bases and terminals automatically Note that there will be no return of BSbbgc if only one base exists Syntax AT r Return BSbbgc r bbgce may repeat bb Base ID 01 16 g Group number 1 3 152 BASIC Programming Guide For Use with CipherLab BASIC Compiler c Channel number 1 4 TMbbtt r tt may repeat bb Base ID 01 16 tt Terminal ID 01 45 Broadcast Data BC RF Base Purpose S
76. time interval is specified in units of second ranging from 0 to 255 It is set 10 seconds by default CCD or Laser scan engine Aiming mode Laser mode Auto Off mode Auto Power Off mode Extra Long Range Laser scan engine Aiming mode only No a Values and Description N2 Scanner Time out Duration in seconds for Scanner Port 1 CCD Laser applicable to Aiming mode Laser mode Auto Off mode and Auto Power Off mode Scanner time out duration in seconds for Aiming mode Extra Long Range 0 No time out 1 255 sec Aiming time out 270 BASIC Programming Guide For Use with CipherLab BASIC Compiler APPENDIX IV 271 Run Time Error Table Error Code 1 Explanation Unknown operator Operand count mismatch Type mismatch Can t perform type conversion No available temp string Illegal operand Not an L value Float error nt AJI wy nvn Bad array subscript Unknown function Illegal function call Return without GOSUB 272 BASIC Programming Guide For Use with CipherLab BASIC Compiler 273 APPENDIX V Debugging Messages Debugging messages indicate the activities happening on the system The common debugging messages are listed as follows ARVO ASCO ASGN A Indicating that the value A is assigned to the variable A could be an integer long integer character string or any type
77. 0 Purpose Syntax Remarks Example See Also To set the writing parameters of RFID SET_RFID_WRITE TagType amp start MaxLen The RFID reader cannot write until the parameters are specified OPEN _COM 4 SET _RFID_WRITE 63 6 32 all supported tag types are enabled write starting from byte 6 of data any value for data length WRITE _COM 4 W_STR CLOSE_COM OPEN _COM READ COM SET RFID READ WRITE_COM 5 8 3 RFID Authentication GET_RFID_KEY 8300 8500 Purpose Syntax Remarks To get the security key of some specific tags A GET _RFID KEY TagType This function is used to get the security key for some specific tags such as Mifare Standard 1K 4K and 51 6635 tags A is a string variable to be assigned to the result 82 BASIC Programming Guide For Use with CipherLab BASIC Compiler TagType is an integer variable indicating a specific tag type that the security key is applied to Example MKEY GET_RFID KEY 4 get the security key for MifareISO14443A tags See Also SET RFID KEY SET_RFID_KEY 8300 8500 Purpose To set the security key of some specific tags Syntax SET_RFID_KEY TagType KeyString KeyType Remarks This function is used to set security key for some specific tags such as Mifare Standard 1K 4K and SLE66R35 tags TagType is an integer variable indicating a specific tag type that the security key is applied to 1 TAG_ISO15693 TAG Tagit TAG _Icode TAG MifareISO144
78. 01 KEY CLICK Purpose To enable disable the key click sound Syntax KEY CLICK status Remarks status is an integer variable indicating the key click status Disable mute All Enable 711 8100 Each represents a different tone 8000 8300 8500 The key click is enabled by default Example KEY CLICK 0 disable the key click PUTKEY 8500 Purpose To put one character to the keyboard buffer Syntax PUTKEY N Remarks N is an integer variable indicating the ASCII code of a character It provides the capability of simulating the keypad operation For example it can be implemented with touch screen operation The key value of a touched item which is designed as a key on the screen by SET_SCREENITEMS can be put to the keyboard buffer by using PUTKEY and then be detected by using INKEY Example PUTKEY 27 put ESC key value to the buffer See Also CLR KBD INKEY 102 BASIC Programming Guide For Use with CipherLab BASIC Compiler 9 14 2 ALPHA Key By default the input mode is numeric and can be modified by the ALPHA key When the ALPHA key is pressed it will take turns to show alphabet and numeric for the same keystroke For example the 2ABC key can generate 2 A B and C by turns Note For the 8500 series the ALPHA key is available on the 24 key terminal only ALPHA_LOCK Purpose Syntax Remarks Example See Also To set the ALPHA state for input mode ALPHA_LOCK status status
79. 1 0 GOTO MainLoop MainSc GetMoreDa G Reader Da EP 4000 8 El ENS E ER_DATA 1 Data lt gt 0 THEN check if there are valid data GOSUB MainScreen for power saving DataS Reader Testing CO CodeTypes Code Length CodeLEN s Co Da EN Dat 5 CodelLl PRINT Datas Count Data ER_DATA 1 check if there are more data lt gt 0 THEN if yes meaning totally the data is longer than 255 bytes must be 2D code CodeLEN LEN Data GOTO GetMoreData ND IF ETURN ta Opa 4 1 Code Length CodeLEN s DE CodeTypes THI EN J E Code 39 IF CO CodeType IF CO CodeType IF CODE CodeType 66 THEN CLP 3 9 talian Pharmacode 67 THEN 68 THEN Industrial 25 72 BASIC Programming Guide For Use with CipherLab BASIC Compiler 2 5 2 5 ELSE IF CODE TYPE 69 THEN CodeTypes Interleave 25 ELSE IF CODE TYPE 70 THEN CodeType Matrix 2
80. 10 10 120 10 1 draw a horizontal line LINE 80 120 10 10 1 draw an oblique line See Also CIRCLE CLS PUT PIXEL RECTANGLE PUT_PIXEL 8500 Purpose To mark a pixel or a dot on the LCD Syntax PUT PIXEL x y mode Remarks x y are integer variables indicating the x y coordinates of a pixel mode is an integer variable indicating the state of a pixel DOT_REVERSE DOT_CLEAR Chapter 5 BASIC Commands 119 Example PUT PIXEL 80 120 1 mark a pixel at 80 120 See Also CIRCLE CLS LINE RECTANGLE RECTANGLE 8500 Purpose To draw a rectangle on the LCD Syntax RECTANGLE x1 y1 x2 y2 type mode Remarks 7 56 y1 are integer variables indicating the x y coordinates of where a diagonal starts x2 y2 are integer variables indicating the x y coordinates of where a diagonal ends type is an integer variable indicating the type of a circle DOT_REVERSE DOT_CLEAR DOT MARK Example RECTANGLE 10 20 80 100 1 1 draw a rectangle RECTANGLE 10 100 80 20 1 1 same rectangle as above See Also CIRCLE CLS LINE PUT_PIXEL 120 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 15 7 Fonts Font Size Basically the portable terminals provide two size options for the system font 6x8 and 8x16 The LCD will show 6x8 alphanumeric characters by default These options are also applicable to other alphanumerical font files for single byte languages such as t
81. 43A TAG_SR176 TAG ISO14443B KeyString is a string variable indicating the security key you set KeyType is an integer variable indicating a specific key type KEYA Key A Example SET RFID KEY 4 111111111111 set security key KEY A for 1 MifareISO14443A tags See Also GET RFID KEY Chapter 5 BASIC Commands 83 5 9 Keyboard Wedge Commands If equipped with keyboard wedge interface the following portable terminals can send data to the host through the wedge interface by calling SEND_WEDGE 711 series 8300 series Note For other wedge application refer to the comparison table in 5 9 3 Wedge Emulator SEND_WEDGE is governed by a set of parameters called WedgeSetting The command SET_WEDGE is used to configure these parameters 5 9 1 Definition of the WedgeSetting Array WedgeSetting is a 3 element character array passed to SET_WEDGE to describe the characteristics of the keyboard wedge interface In a BASIC program WedgeSetting can be defined as follows WedgeSetting Wedge 15 Wedge 25 Wedge 35 The functions of the parameters Wedge_1 Wedge 25 and Wedge_3 are described in the following subsections Wedge 15 KBD Terminal Type Wedge_2 7 1 Enable capital lock auto detection 1 eee Wedge 25 1 Capital lock on e A OOOO Wedge_2 5 1 Ignore alphabets case 0 Alphabets are case sensitive Wedge 25 00 Normal 10 Digits are at lower positi
82. 4559 9559 55999 99 5 13 LED Commands vers 105 5 16 Touch Screen Commands 5 5550 55555559599555599 9 123 5 17 Battery Commands 95 599 599 599599599 127 5 18 Communication Ports 0555 4455 5459455555959955559999 129 5 19 IR RS 232 0 81 4 9 9 139 5 20 RF Communications 4454 4555 444555599995 9 142 5 21 Wireless Communications 55 4453 5455559995 159 5 22 File Manipulation 5 595 599 599 5995599599 199 5 23 Memory Commands 5 595 5945594559 559 5599 214 5 24 Debugging Commands 5 5 5 5594 55995599559955 217 5 25 Reserved Host 0 1 18 08 4555595999 219 Chapter 5 BASIC Commands 29 5 1 General Commands This section describes commands that are not confined to any specific hardware features Purpose To return the absolute value of a numeric expression Syntax A ABS N Remarks A 15 a numeric variable to be assigned to the absolute value of a numeric expression N is a numeric expression it can be an integer or a real number Example TimeDifference ABS Time1 Time2 BIT_OPERATOR Purpose To perform bit wise operations of integers or long integers
83. 5 ELSE IF CODE TYPE 71 THEN CodeTypes Codabar ELSE IF CODE TYPE 72 THEN CodeTypes Code 93 ELSE IF CODE TYPE 73 THEN CodeType Code 128 ELSE IF CODE TYPE 74 THEN CodeTypes UPCE ELSE IF CODE TYPE 75 THEN CodeType UPCE with Addon 2 ELSE IF CODE_ TYPE 76 THEN CodeType UPCE with Addon 5 ELSE IF CODE TYPE 77 THEN CodeType EAN 8 ELSE IF CODE TYPE 78 THEN CodeType EAN 8 with Addon ELSE IF CODE TYPE 79 THEN CodeType EAN 8 with Addon ELSE IF CODE TYPE 80 THEN CodeType EAN13 ELSE IF CODE TYPE 81 THEN CodeTypeS EAN13 with Addon ELSE IF CODE TYPE 82 THEN CodeType BAN13 with Addon ELSE IF CODE TYPE 83 THEN CodeType MSI ELSE IF CODE TYPE 84 THEN CodeTypes Plessey ELSE IF CODE TYPE 85 THEN CodeTypeS EAN 128 ELSE IF CODE TYPE 87 THEN CodeTypes GTIN ELSE IF CODE TYPE 90 THEN CodeType Telepen ELSE IF CODE TYPE 91 THEN CodeType RSS END IF RETURN Chapter 5 BASIC Commands 73 5 7 2 Code Type The following tables list the values of the CodeType variable Symbology Mapping Table so E 528888 Reserved Reserved 90 161668 CCD Laser 74 J 75 K 76 L 77 M 78 N 79 O 80 P 82 R 83 S 84 T 85 U 86 87 W 88 X 89 Y 90 Z 74 BASIC Programming Guide For Use with CipherLab BASIC Compiler 91 RSS 14 CCD Laser m0 mq y
84. 5 Check Digit 0 DO NOT verify Industrial 25 Check Digit CCD Laser 1 Verify Industrial 25 Check Digit Appendix NOT transmit Industrial 25 Check Digit smit Industrial 25 Check Digit NOT verify Matrix 25 Check Digit ify Matrix 25 Check Digit NOT transmit Matrix 25 Check Digit 1 Transmit Matrix 25 Check Digit Select Interleaved 25 Start Stop Pattern se Industrial 25 Start Stop Pattern Jse Interleaved 25 Start Stop Pattern se Matrix 25 Start Stop Pattern Select Industrial 25 Start Stop Pattern Jse Industrial 25 Start Stop Pattern se Interleaved 25 Start Stop Pattern se Matrix 25 Start Stop Pattern Select Matrix 25 Start Stop Pattern se Industrial 25 Start Stop Pattern Jse Interleaved 25 Start Stop Pattern se Matrix 25 Start Stop Pattern Select Codabar Start Stop Character 0 abcd abed 1 abcd tn e 2 ABCD ABCD 3 ABCD TN E MSI Check Digit Transmission 0 Last Check Digit is NOT transmitted 1 Both Check Digits are transmitted 2 Both Check Digits are NOT transmitted 0 DO NOT transmit Plessey Check Digits 1 Transmit Plessey Check Digits Reader Settings 225 CCD Laser CCD Laser CCD Laser CCD Laser CCD Laser CCD Laser CCD Laser CCD Laser CCD Laser CCD Laser 226 BASIC Programming Guide For Use with CipherLab BASIC Compiler 0 No conversion CCD Laser 1 Convert Standard Plessey to UK Plessey oe 0 No conversion CCD Laser Convert UPC E to UPC
85. 5 of the whole UPC EAN families are enabled Disable No Addon When ALL of the indexes of Table II are set 0 only No Addon is enabled that is further decided by Table I When Results in Index No 139 Index No listed in Index No listed in No Addon Addon 2 amp 5 Table I Table 1 1 1 N A Enabled Enabled 1 0 N A Disabled Disabled 0 N A Any 1 Disabled All Enabled 11 0 1 All 0 Enabled Disabled All 0 0 0 Disabled Disabled All Note The result marked with All indicates it occurs with the whole UPC EAN families no ion 0 Disable UPC EO depends 2D Extra Long 0 Disable EAN 8 depends 2D Extra Long ieee 0 Disable EAN 13 depends 2D Extra Long 1 Enable EAN 13 97 0 Disable Bookland EAN 2D Extra Long 1 Enable Bookland EAN Range Index No 16 for EAN 13 is required to be 1 10 13 16 106 0 Disable UPC A depends 2D Extra Long 1 Enable UPC A Bange 108 0 Disable UPC E1 depends 2D Extra Long 1 Enable UPC E1 Range 258 BASIC Programming Guide For Use with CipherLab BASIC Compiler Note 1 Index No 139 1 No Addon Addon 2 Addon 5 of the symbology are enabled 2 Index No 139 0 and all the indexes in Table II below must be set 0 Only No Addon of the symbology is enabled Table Il No N1 Values and Description N2 11 0 12 0 10 Disable Only Addon 2 amp 5 o
86. 7 New READER SETTING index 86 87 New PPP via IR RS 232 Modified COM port mapping GET _SCREENITEM SET COM SET NET PARAMETER START TCPIP Updated indexing for Net Configuration and Net Status Copyright Notice Revision History 1 CHAPTER 1 Introduction 1 CHAPTER 2 Development Environment 3 DAS DITECTORY SUC LUTE o f 58 ans Lan 3 De Wel BG Dir eCtoty oc Ms Uns net aac tall 3 2122 DOWNEOAD Directory anie oa R E dveoh deg snegndea dvesdbekeneendudanesdexs 4 PIAA REGUIFCIMENIS lt r ots anton i E 4 nhs on 6 23 BASIC R m te PAA E 6 2 4 Development FlOW icsse n ei e J 2 4 1 Download Run time Engine eiii eiee e ie oi i eea ieie 7 2 4 2 Edit and Compile the BASIC 08 8 8 2 4 3 Download the BASIC Object 65 8 CHAPTER 3 Using CipherLab BASIC Compiler 9 217 21 11 Meni ssi ee E E A ee east
87. B OFF TCPIP 8000 8300 8500 Purpose Syntax Remarks Example See Also OFF TIMER To terminate TCP IP Event Trigger OFF TCPIP To resume the event trigger call ON TCPIP GOSUB OFF TCPIP ON TCPIP GOSUB Purpose Syntax Remarks Example See Also To terminate TIMER Event Trigger OFF TIMER N To resume the event trigger call ON TIMER GOSUB N is an integer variable in the range of to 5 indicating the timer ID ON TIMER 1 200 GOSUB ClearScreen TIMER 1 2 sec ClearScreen OFF TIMER 1 CLS RETURN ON TIMER GOSUB OFF TOUCHSCREEN 8500 Purpose Syntax To terminate TOUCHSCREEN Event Trigger OFF TOUCHSCREEN 52 BASIC Programming Guide For Use with CipherLab BASIC Compiler Remarks To resume the event trigger call ON TOUCHSCREEN GOSUB Example OFF TOUCHSCREEN See Also ON TOUCHSCREEN GOSUB ON COM GOSUB Purpose To activate COM Event Trigger Syntax ON COM N GOSUB SubName SubLabel Remarks When data is received from the COM port a specific subroutine will be executed N is an integer variable indicating the COM port Available on terminals 1 2 711 8100 8000 8300 1 4 8500 SubName SubLabel is the name or line label of a subroutine Example ON COM 1 GOSUB HostCommand HostCommand_1 OFF COM 1 ON COM 1 GOSUB HostCommand RETURN See Also Communication Ports commands OFF COM ON ESC GOSUB Purpose To activate ES
88. C Event Trigger Syntax ON ESC GOSUB SubName SubLabel Remarks When the ESC key is pressed a specific subroutine will be executed SubName SubLabel is the name or line label of a subroutine Example ON ESC GOSUB Key_Esc Key_Esc OFF ESC ON ESC GOSUB Key_Esc See Also Chapter 5 BASIC Commands 53 RETURN Keypad commands OFF ESC ON HOUR_SHARP GOSUB Purpose Syntax Remarks Example See Also To activate HOUR_SHARP Event Trigger ON HOUR_SHARP GOSUB SubName SubLabel When the system time is on the hour a specific subroutine will be executed SubName SubLabel is the name or line label of a subroutine ON HOUR_SHARP GOSUB OnHourAlarm OnHourAlarm CurrentTime TIME Hour VAL LEFT CurrentTime 2 FOR I 1 TO Hour BEEP 800 10 0 10 WAIT 100 NEXT RETURN Calendar amp Timer commands OFF HOUR_SHARP ON KEY GOSUB Purpose Syntax Remarks Example To activate FUNCTION KEY Event Trigger ON KEY number GOSUB SubName SubLabel When a function key is pressed a specific subroutine will be executed number 15 an integer variable in the range of 1 to 12 1 to 9 for 711 indicating a function key of the keypad SubName SubLabel is the name or line label of a subroutine ON KEY 1 GOSUB On_ Shift ON KEY 2 GOSUB Off_Shift On Shift Mode IN RETURN 54 BASIC Programming Guide For Use with CipherLab BASIC Compiler Off Shift Mode OUT RETURN See Also Keypad com
89. CP IP except STOP TCPIP A TCP_ERR_ CODE 4 is an integer variable to be assigned to the result indicating an error description If a routine is working normally the return value will be 0 in general However it will return N the connection number for TCP_OPEN and 1 255 the length of data being read for NREAD Normal Invalid connection number Connection is already opened Undefined local port in server mode Undefined remote port in client mode Connection is closed No data received in buffer Data is too long Networking is busy or data is too long Data transmission error Hardware initialization failure START TCPIP has already been running Need to run STOP TCPIP All connections are unavailable Never run START TCPIP Parameter error Host is not reachable Time out Hardware failure Protocol error No buffer space Invalid connection block Chapter 5 BASIC Commands 175 Invalid pointer argument Operation would block Message is too long Protocol unavailable Unknown remote name DNS protocol error package class DNS protocol error package type Remote name too long more than 38 characters Example ERR TCP ERR CODE See Also DNS RESOLVER GET NET PARAMETER GET NET STATUS GET WLAN _ STATUS IP_CFG NCLOSE NREAD NWRITE OFF TCPIP ON TCPIP GOSUB SOCKET CAN SEND SOCKET HAS DATA SOCKET IP SOCKET OPEN START TCPIP TCP OPEN SET NET PARAMETER TCP_OPEN 8000 8300
90. DISABLE TOUCHSCREEN ENABLE TOUCHSCREEN OFF TOUCHSCREEN ON TOUCHSCREEN GOSUB SET_SCREENITEMS SET _SIGNAREA SET_SCREENITEMS 8500 Purpose Syntax Remarks To specify the size and display mode of the touchable items SET_SCREENITEMS mode total_item item The pattern of a touched item is designed by using the command SHOW_IMAGE It may be a graphic icon button or key mode is an integer variable indicating the display mode when an item is touched mode Meaning 0 ITEM NORMAL A touched item will be displayed normally 1 ITEM_REVERSE A touched item will be displayed in a reverse color total_item is an integer variable indicating the amount of items jtem is a string variable containing the size information of items User needs to allocate a string variable to store the size information of each item item Meaning x y the x y coordinates of the upper left point of an item size_x the width of an item in pixels size_y the height of an item in pixels 126 BASIC Programming Guide For Use with CipherLab BASIC Compiler Example ITEMSTRS CHRS 5 CHR 125 CHR 70 CHR 20 CHRS 13 ITEMSTR ITEMSTR CHRS 85 CHR 125 CHR 70 85 20 CHRS 13 SET_SCREENITEMS 1 2 ITEMSTR See Also DISABLE TOUCHSCREEN ENABLE TOUCHSCREEN GET_SCREENITEM OFF TOUCHSCREEN ON TOUCHSCREEN GOSUB SET_SIGNAREA SHOW_IMAGE SET_SIGNAREA 8500 Pur
91. DLeng ItemLeng LOCATE 1 1 PRINT 0 Data LOCATE 2 1 PRINT Item Item LOCATE 3 1 PRINT Note Note ELSE See Also UPDATE RECORD GET_RECORD_NUMBER Purpose To get the ordinal number of the record pointed to by the file pointer of a specified DBF file and IDX file Syntax 46 GET RECORD NUMBER file index Remarks 4 is an integer variable to be assigned to the number file is an integer variable in the range of to 5 indicating which DBF file to be accessed index is an integer variable in the range of 1 to 3 indicating which IDX file to be accessed If it is not specified the default IDX file which keeps the original data sequence will be used Example A GET RECORD NUMBER I 1 MOVE_TO Purpose To move the file pointer of a specified DBF and IDX files to a specified position Syntax Remarks Example See Also Chapter 5 BASIC Commands 211 MOVE TO file index record_number file is an integer variable in the range of to 5 indicating which DBF file to be accessed index is an integer variable in the range of 1 to 3 indicating which IDX file to be accessed If it is not specified the default IDX file which keeps the original data sequence will be used record_number is a positive integer variable indicating the ordinal number of the record where the file pointer is moved to MOVE_TO 1 1 20 MOVE_TO NEXT MOVE TO PREVIOUS MOVE_TO_NEXT Purpose
92. Device List To enable quick connection to a specific device without going through the inquiry and pairing procedure a user definable Frequent Device List can be set up by calling SET_NET_PARAMETER If there is an existing Frequent Device List generated from the inquiry and pairing procedure it then may be partially or overall updated by this and vice versa There are five fields Service Type MAC ID Device Name PIN Code and Link Key authentication is disabled you only need to specify the first three fields Otherwise the PIN code field needs to be specified for generating Link Key Sample code 1 setting up a DUN Frequent Device List without authentication by calling SET NET PARAMETER DLS CHRS 4 128 00d017401234 TestDev CHR 13 mj ET NET PARAMETER 40 5 5 Sample code 2 setting up a SPP Frequent Device List with authentication needs PIN code by calling SET NET PARAMETER DLS HRS 3 128 00d017401234 TestDev CHRS 13 1234 CHRS 1 ET NET PARAMETER 40 FDLS DM Wd Bluetooth Examples Chapter 5 BASIC Commands 185 To determine which application to initialize use the second parameter of SET_COM N Baudrate Parity Data Handshake To initialize Bluetooth SPP Master call SET_COM 2 4 1 1 1 To initialize Bluetooth
93. E 5 16 Touch Screen Commands For the 8500 series the liquid crystal display LCD is also a touch screen when it is initialized by ENABLE_TOUCHSCREEN Commands for triggering the TOUCHSCREEN event OFF TOUCHSCREEN ON TOUCHSCREEN GOSUB Signature Capture User may use the stylus to write anything directly on a specific area of the LCD which is defined by SET_SIGNAREA Then the signature can be captured by GET_IMAGE Touchable Items Graphic items can be designed to simulate a key operation when being touched e g a calculator Patterns of the graphic items can be designed and displayed on the LCD by SHOW_IMAGE Then these items can be utilized and detected by GET_SCREENITEM If the display mode for a selected item is set to ITEM REVERSE by SET_SCREENITEMS the item will be displayed in a reverse color once it is touched On the contrary if it is set to ITEM NORMAL there will be no changes happening to the item once it is touched Example Touch Screen Test xxx Signature Capture Area ENABLE _ TOUCHSCREEN SET SIGNAREA 5 5 155 12 RECTANGLE 5 5 155 120 KKKKKKKKKKK Buttons KKKKKK RECTANG 5 85 125 75 145 ay ECTANG T25 195 14 ITEMSTRS CHRS 5 CHRS 125 CHRS 70 CHRS 20 CHRS 13 ITEMSTRS ITEMSTRS CHRS 85 CHRS 125 CHRS 70 CHRS 20 CHRS 13 Chapter 5 BASIC Commands KKK 0
94. E A E N 284 Get Version Information seis eieiei E EE EE EES EE E EE E EAA 285 112141 4 19 411 51911 1 6 1117 5 96 77789762 25 eoii eee e E E EE AEEA EEE 285 Index 287 CHAPTER 1 Introduction The CipherLab BASIC Compiler provides users with a complete programming environment to develop application programs for the CipherLab terminals in the BASIC language The Windows based Basic Compiler comes with a menu driven interface to simplify software development and code modifications Many system configurations such as COM port properties and database file settings can be set up in the menus Using this powerful programming tool to get rid of lengthy coding users can develop an application to meet their own needs efficiently This manual is meant to provide detailed information about how to use the BASIC Compiler to write application programs for the CipherLab portable terminals It is organized in five chapters giving outlines as follows Chapter Introduction gives a brief on this manual Chapter2 Development Environment gives a concise introduction about the Basic Compiler the development flow for applications and the BASIC Compiler Run time Engines Chapter3 Using CipherLab BASIC Compiler gives a tour of the programming environment of the BASIC Compiler Chapter4 Basics of CipherLab BASIC Language discusses the specific characteristics of the CipherLab BASIC Language
95. E a e iaa 144 5 20 4 8 System 1369 09816 1 E E E i E 145 3203 RE Terminal Properties srasni T eee E O T eee 147 5 2060 RE Base Properties ororo a E ee See ee ne cee 151 520 7 RE Example isc 158 582 1 Wireless Communications 2595955775 E 159 3211 Wireless Models ran 159 521 2 Network Conti surat Ont sizsise 162 221 3 Initialization Terminato nsen a E E E 165 SDA Networle Status 20 167 5 215 WEAN 80281 96 170 11 1211 1 19 91141095756 ra a reads 180 Sakr 1 1 1 N notes 191 522 Fle Mampula toise n a Whee 199 SDDS DAT File sees denies ne oh NO ele ee Leah a tel Bal lect ihe 199 5 22 2 DBF Files and IDX Biles 87975 7 56 a 206 5223 Error Codae 150 SS 213 523 Memory Command Sie aaea a
96. Esc Key_Esc OFF ESC ON ESC GOSUB Key 56 RETURN ON ESC GOSUB OFF HOUR_SHARP Purpose Syntax Remarks Example See Also To terminate HOUR_SHARP Event Trigger OFF HOUR_SHARP To resume the event trigger call ON HOUR_SHARP GOSUB OFF HOUR_SHARP ON HOUR_SHARP GOSUB 50 BASIC Programming Guide For Use with CipherLab BASIC Compiler OFF KEY Purpose 10 terminate FUNCTION KEY Event Trigger Syntax OFF KEY number Remarks To resume the event trigger call ON KEY GOSUB number 15 an integer variable in the range of 1 to 12 1 to 9 for 711 indicating a function key of the keypad Example ON KEY 1 GOSUB On Shift ON KEY 2 GOSUB Off Shift On_ Shift OFF KEY Mode IN GOSUB Process ON KEY 1 GOSUB On_ Shift RETURN See Also ON KEY GOSUB OFF MINUTE_SHARP Purpose 10 terminate MINUTE SHARP Event Trigger Syntax OFF MINUTE SHARP Remarks To resume the event trigger call ON MINUTE SHARP GOSUB Example OFF MINUTE SHARP See Also ON MINUTE SHARP GOSUB OFF READER Purpose To terminate READER Event Trigger Syntax OFF READER N Remarks To resume the event trigger call ON READER GOSUB N is an integer variable indicating the reader port usually 1 for portable terminals Example ON READER 1 GOSUB BerData_1 See Also Chapter 5 BASIC Commands 51 BerData_1 OFF READER 1 BEEP 2000 5 3885 GET READER DATAS 1 CLS PRINT Data ON READER GOSU
97. FN key is enabled and FUNCTION_TOGGLE is called to lock it this modifier key can work as many times as desired For the 8500 series it offers two more options for FUNCTION_TOGGLE i e this modifier key can be treated as a general key and its key value be stored in a buffer FUNCTION_TOGGLE 8300 8500 Purpose To set the state of the FN function toggle Syntax FUNCTION TOGGLE status Remarks status is an integer variable indicating the state of the function toggle susr Unlocked default Locked Unlocked with key value stored in keyboard buffer 8500 only Locked with key value stored in keyboard buffer 8500 only Example FUNCTION TOGGLE 1 lock the function toggle Chapter 5 BASIC Commands 105 5 15 LCD Commands The liquid crystal display LCD on the portable terminals is FSTN graphic display For different models it varies slightly in the display capability due to the size of LCD panel ba aaan 711 8100 8300 Display Capability 100 x 64 00x 64dots 160 x 160 160x 160dots Bottom_Right 7 63 a 63 2 159 A coordinate system is used for the cursor movement routines to determine the cursor location i e x y indicates the column and row position of cursor The coordinates given to the top left point is 1 1 while those of the bottom right point depends on the size of LCD and font For displaying a graphic the coordinate system i
98. IN code Syntax A GSM CHANGE PIN old new Remarks This command cannot be executed while the GSM GPRS module is running The old PIN string must be the password of facility In this case the new PIN code can be adopted and the remaining attempt counter of PIN will be reset to 3 If the old code is wrong not only the password cannot be changed successfully but also the counter will be decremented by 1 4 is an integer variable assigned to the result PINCODE PASSED INVALID PINCODE MODULE_RUNNING HARDWARE ERR CONNECT_TIMEOUT Example GSM CHANGE PIN PIN1 PIN2 to change PIN code from PIN1 to PIN2 See Also GSM CHECK PIN GSM_SET PINLOCK GSM_CHECK_PIN 8500 Purpose To verify the PIN code Syntax A GSM CHECK PIN pin Remarks This command cannot be executed while the GSM GPRS module is running If the input code is the correct PIN code the remaining attempt counter of PIN is reset to 3 If the old code is wrong the counter will be decremented by 1 4 is an integer variable assigned to the result PINCODE UNNECESSARY PINCODE PASSED INVALID PINCODE 192 BASIC Programming Guide For Use with CipherLab BASIC Compiler MODULE _ RUNNING HARDWARE ERR PUK_REQUIRED Example GSM CHECK _ PIN PIN1 10 verify whether the PIN code is PIN1 or not See Also GSM CHANGE PIN GSM SET PINLOCK GSM_SET_PINLOCK 8500 Purpose To set the PIN code lock Syntax 46 GSM_SET PINLOCK pin mode Remarks This comma
99. ING 1 1 Code 39 readability is enabled See Also CODE TYPE GET READER SETTING READER CONFIG Chapter 5 BASIC Commands 79 5 8 RFID Reader Commands For the 8300 8500 series it provides an optional RFID reader that can coexist with the barcode reader if there is any The RFID reader supports read write operations depending on the tags The supported labels include ISO 15693 Icode ISO 14443A and ISO 14443B Note Before programming you should study the specifications of RFID tags Currently the performance of some tags has been confirmed and the results are listed below for features supported Tag Type UID only Read Page Write Page TAG 84 Mifare Standard 1K v v Mifare Standard 4K v v Mifare Ultralight v v v Mifare DESFire v Mifare 550 v v SLE44R35 v SLE66R35 v v TAG_SR176 SRIX 4K v v SR176 v v TAG_ISO15693 ICODE SLI v v SRF55V02P y z SRF55V02S v r SRF55V10P v TI Tag it HF I vy v v ICODE ICODE v v Note These are the results found with RFID module version 1 0 use SYSTEM_INFORMATIONS 9 to find out version information 60 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 8 1 Virtual COM The algorithm for programming the RFID reader simply follows the commands related to COM ports The virtual COM port for RFID
100. It is supported on the 8300 series only direct RS 232 Internet Example of PPP Connection Follow the same programming flow of WLAN 802 11b Example Before calling START TCPIP 4 or START TCPIP 5 the following parameters of PPP must be specified PPP_DIALUPPHONE 20 Phone number of ISP PPP_LOGINNAME 39 Login user name of ISP PPP_LOGINPASSWORD 20 Login password of ISP 73 73 PPP_BAUDRATE cf Baud rate matching modem cradle or modem SET COM Note For baud rate values of IR or RS 232 see the baud rate parameter in SET _COM Chapter 5 BASIC Commands 141 5 19 2 Ethernet via IR It is supported on the 8000 8300 8500 series when making use of the proprietary Ethernet cradle j Data TCP IP AT Command Data ZA Ethernet Cradle supports Data Mode 1 Transparent Mode Ethernet Modem Mode lt EN TCP IP Example of Ethernet Connection If you configure the Ethernet cradle to work in Transparent mode follow the same programming flow of WLAN 802 11b Example Refer to the Ethernet Cradle manual for more information on the working modes 142 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 20 RF Communications This section describes the BASIC functions and statements related to Radio Frequency communications These commands are for the use of some specific models as shown below 5 20 1 RF Models amp Specifications
101. Korean are referred to as the special font files This is because their font size for alphanumeric characters must be determined by SELECT_FONT either 6x72 or 12x12 Otherwise the characters cannot be displayed properly SELECT_FONT Purpose To select a font size for the LCD to display alphanumeric characters properly Syntax SELECT_FONT font Remarks font is an integer variable indicating the font size Font size 6x8 Font size 8x16 Reserved Font size 6x12 for font files 1612 Sc12 Jp12 Kr12 Font size 12x12 for font files 1612 Sc12 Jp12 12 Single byte Characters For single byte characters system multi language etc simply assign either 6X8 or 8X16 16x16 double byte Characters You may assign 6x8 or 8x16 to display alphanumeric characters 12x12 Double byte Characters for the 8000 8300 8500 series If you assign 6x12 the font size for single byte characters will be 6x12 while it will still take 12x12 for double byte characters Tc12 5612 Jp12 Kr12 It thus provides flexibility in displaying alphanumeric However for Japanese Katakana you have to assign 12x12 otherwise the cursor position will be misplaced 122 BASIC Programming Guide For Use with CipherLab BASIC Compiler Example SELECT FONT 2 set font size 8x16 SELECT _FONT 4 set font size 6x12 for alphanumeric SELECT _FONT S5 set font size 12x12 for alphanumeric See Also GET LANGUAGE SET LANGUAG
102. Lab BASIC Compiler 13 To paste a paragraph from the clipboard into the text This paragraph will be inserted to the text Move the cursor to the insertion point where the paragraph will be inserted and left click the mouse Click Edit on the menu bar and select Paste For the same function press hot key CTRL V or click the Paste icon on the tool bar To delete a paragraph from the text This paragraph will not be placed on the clipboard Drag the cursor to select the paragraph to be deleted This paragraph will be highlighted in a reverse color Click Edit on the menu bar and select Delete For the same function press the Del key To select all the contents of the text Click Edit on the menu bar and select Select All All the contents will be highlighted in a reverse color For the same function press hot key CTRL A To find a specific letter symbol word or paragraph in the text Click Edit on the menu bar and select Find In the pop up window enter the key word to be found in the text Then click the Find button to start searching For the same function press hot key CTRL F or click the Find icon on the tool bar 14 BASIC Programming Guide For Use with CipherLab BASIC Compiler 3 3 Configure Menu Seven items are provided here for user to define the system settings The Configure Transaction Files and Create DBF Files items provide the option of Share file space with ot
103. Length Format CCD Laser 1 Matrix 25 Code Length Limitation in Max Min Length Format Matrix 25 Min Code Length Fixed Length 2 36 Select Matrix 25 Start Stop Pattern CCD Laser 0 Use Industrial 25 Start Stop Pattern 1 Use Interleaved 25 Start Stop Pattern 2 Use Matrix 25 Start Stop Pattern Code 39 Code 93 Appendix Symbology Parameters 241 Values and Description N2 0 Disable Code 39 CCD Laser 1 Enable Code 39 NOT transmit Code 39 Start Stop Character CCD Laser mit Code 39 Start Stop Character ee NOT transmit Code 39 Check Digit CCD Laser 1 Transmit Code 39 Check Digit hi 0 Standard Code 39 CCD Laser P Transmit Start Stop Character 0 DO NOT verify Code 39 Check Digit CCD Laser ify Code 39 Check Digit This parameter specifies whether the start stop characters are included in the data being transmitted Verify Check Digit If this parameter is enabled the terminal will perform checksum verification when decoding barcodes If the checksum is incorrect the barcode will not be accepted Transmit Check Digit If this parameter is enabled the checksum character will be included in the data being transmitted Full ASCII Code 39 If this parameter is enabled the terminal will support Code 39 Full ASCII that includes all the alphanumeric and special characters No N1 Values and Description N2 etter 0 Disable Code 93 CCD Laser 1 Enable Code 93 242 BASIC Pro
104. Length Limitation in Max Min Length Format Code 39 Max Code Length Fixed Length 2D Extra Long Range 252 BASIC Programming Guide For Use with CipherLab BASIC Compiler Code 93 Code 39 Min Code Length Fixed Length2 2D Extra Long Length must be greater than Length2 Range 100 0 Disable Trioptic Code 39 2D Extra Long 1 Enable Trioptic Code 39 Range Verify Check Digit If this parameter is enabled the terminal will perform checksum verification when decoding barcodes If the checksum is incorrect the barcode will not be accepted Transmit Check Digit If this parameter is enabled the checksum character will be included in the data being transmitted Note Verify Check Digit must be enabled so that the check digit can be left out when it is preferred not to transmit the check digit Full ASCII Code 39 If this parameter is enabled the terminal will support Code 39 Full ASCII that includes all the alphanumeric and special characters Length Qualification Refer to Codabar nowy vives andoesipion Senne 0 Disable Code 93 2D Extra Long 1 Enable Code 93 113 0 Code 93 Length Limitation in Fixed Length Format 2D Extra Long 1 Code 93 Length Limitation in Max Min Length Format Range 115 Code 93 Min Code Length Fixed Length2 2D Extra Long aan Length must be greater than Length2 Range Length Qualification Refer to Codabar Code 128 MSI Appendix Symbol
105. Macro PDF Escape Characters Appendix Symbology Parameters 263 MicroPDF417 Code 128 Emulation If Code 128 Emulation is enabled these MicroPDF417 barcodes are transmitted with one of the following prefixes C1 if the first codeword is 903 907 912 914 915 2 if the first codeword is 908 or 909 C0 ifthe first codeword is 910 or 911 If disabled they are transmitted with one of the following prefixes jL3 if the first codeword is 903 907 912 914 915 jL4 ifthe first codeword is 908 or 909 JL5 if the first codeword is 910 or 911 Macro PDF Transmit Decode Mode Macro PDF is a special feature for concatenating multiple PDF symbols into one file known as Macro PDF417 or Macro MicroPDF417 There are three options for handling Macro PDF decoding Passthrough all symbols to transmit and decode all Macro PDF symbols and perform no processing In this mode the host is responsible for detecting and parsing the Macro PDF sequences Buffer all symbols Transmit Macro PDF when complete to transmit all decoded data from an entire Macro PDF sequence only when the entire sequence is scanned and decoded If the decoded data exceeds the limit of 50 symbols no transmission because the entire sequence was not scanned Transmit any symbol in set No particular order to transmit data from each Macro PDF symbol as decoded regardless of the sequence When selecting this mode Transmit Control Head
106. NG is processed N1 is the setting number N2 is the value of the setting RECORD_COUNT file Indicating the command RECORD _ COUNT is processed a Indicating the command RECTANGLE is processed RESTART Indicating the command RESTART is processed Indicating the command RETURN is processed N is the line number to return if it is not null RIGHT X N Indicating the command RIGHTS is processed Indicating the command ROM_SIZE is processed SAVE_TRANSACTION data Indicating the command SAVE_TRANSACTION is processed SAVE TRANSACTION EX file Indicating the command SAVE _ TRANSACTION EX is data processed SEARCH_RF CHANNEL N _ Indicating the command SEARCH RF CHANNEL is processed N is the assigned time interval 280 BASIC Programming Guide For Use with CipherLab BASIC Compiler SET_CURSOR status Indicating the command CURSOR is processed SET LANGUAGE N Indicating the command SET LANGUAGE is processed N is the setting of language SET NET PARAMETER index Indicating the command SET NET PARAMETER is processed A SET_PRECISION N Indicating the command SET PRECISION is processed N 15 the numeric precision SET RF CHANNEL N Indicating the command SET CHANNEL is processed N is the channel SET_RF ID N Indicating the command SET_RF _ID is processed N is the ID SET RF POWER N Indicating the command SET RF POWER is processed N 15 the power level SET_RF_ TIMEOUT N Indi
107. O LOOPO03 BEEP 4400 4 CLS PRINT Connect OK Call WRITE_COM 2 and READ_COMS 2 to transmit and receive data respectively Call GET_NET_STATUS 8 to detect if connection is maintained For example GET NET STATUS 8 0 THEN BEEP 3300 4 CLOSE_COM 2 END IF Call CLOSE_COM 2 to terminate communication and shut down the Bluetooth module gt Wedge Emulator via SPP Note Instead of making use of the keyboard wedge interface the Serial to Keyboard Converter program lets users convert data to keyboard input via Bluetooth SPP in general wedge functions such as SEND_WEDGE SET_WEDGE and WEDGE _READY That is users can upgrade a normal wedge application to a wireless wedge application Refer to section 5 9 3 Wedge Emulator The Serial to Keyboard Converter program helps develop a keyboard key in application without any serial port input function It supports multiple regions 1 e an application can make use of this tool for varying keyboard layout All you need to do is to modify a few codes as shown below Alternatively you may apply Bluetooth HID for wedge application on the Bluetooth enabled terminals Chapter 5 BASIC Commands 187 SET_COM N Baudrate Parity Data Handshake To set the wedge emulation flag use the last parameter regarding hardware handshake setting LS RIN LOOP T Wai
108. ON DATA E Indicating the command GET_TRANSACTION DATA EX is X file N processed GOSUB N Indicating the program branches to a subroutine N is the line number of the first line of the subroutine GOTO N Indicating the program branches to line number N GSM_CHANGE PIN old new Indicating the command GSM_CHANGE PIN is processed GSM_CHECK_PIN pin Indicating the command GSM_CHECK_PIN is processed GSM_SET_ PINLOCK pin mode Indicating the command GSM_SET_PINLOCK is processed 59 GT 1156 256 Indicating the decision IF N1 gt N2 is processed Appendix V Debugging Messages 277 Indicating the command IRDA_STATUS is processed N is the connection or transmission status the assigned time interval Indicating the command LCD_CONTRAST is processed N is the contrast level in the range of 1 8 Indicating the decision IF N1 lt N2 is processed LT NI N2 Indicating the decision IF N1 lt N2 is processed MOVE TO file index record Indicating the command MOVE_TO is processed file is the _number number of the DBF file index is the number of the IDX file record _number is the record number to move to MOVE TO NEXT file index Indicating the command MOVE _TO_ NEXT is processed D MOVE TO PREVIOUS file in Indicating the command MOVE_TO_ PREVIOUS is processed dex MUL N1 N2 Indicating a multiplication is processed 8 278 BASIC Programm
109. OUCHSCREEN GOSUB 57 OPEN_COM 130 P POWER_ON 62 PRINT 111 PUT_PIXEL 118 PUTKEY 101 R RAM_SIZE 216 READ 219 READ_COM 130 READER CONFIG 70 READER_SETTING 77 RECORD_COUNT 211 RECTANGLE 119 REM 31 REMOVE 220 RESTART 63 RIGHT 42 ROM_SIZE 215 5 SAVE_TRANSACTION 202 SAVE_TRANSACTION_EX 203 SEARCH_RF_CHANNEL 149 SELECT_FONT 121 SEND_WEDGE 90 SET_COM 131 SET_COM_TYPE 133 SET_LANGUAGE 63 SET_NET PARAMETER 164 SET PRECISION 31 SET_RF_CHANNEL 149 SET 0 149 SET RF POWER gt 149 SET_RF_TIMEOUT 150 SET_RFID_KEY 82 SET RFID READ 81 SET_RFID_WRITE 81 SET_RTS 138 SET_SCREENITEMS 125 SET_SIGNAREA 126 SET_VIDEO_MODE 106 SET_WEDGE 90 SGN 31 SHOW_IMAGE 116 SOCKET_CAN_SEND 172 SOCKET_HAS_DATA 173 SOCKET_IP 173 SOCKET_OPEN 173 START TCPIP 166 8 DEBUG 218 STOP BEEP 92 STOP TCPIP 166 STOP_DEBUG 218 STR 44 Index 289 STRING 46 SYSTEM_INFORMATIONS 64 SYSTEM_PASSWORD 64 T TCP_ERR_CODE 174 TCP_OPEN 175 TIMES 96 TIMER 97 TR 220 TRANSACTION_COUNT 203 TRANSACTION_COUNT_EX 204 TRIM_LEFT 42 TRIM_RIGHT 42 TW 221 U UCASES 44 UNLOCK 58 UPDATE_RECORD 212 UPDATE_TRANSACTION 204 UPDATE_TRANSACTION_EX 204 V VAL 44 VALR 45 VERSION 64 VIBRATOR 94 WAIT 97 WAIT_HOURGLASS 111 WEDGE_READY 80 WHILE
110. Operator Chapter 4 Basics of the CipherLab BASIC Language 23 Logical operators perform tests on multiple relations and Boolean operations The logical operator returns a bit wise result which is either True not zero or False zero In an expression logical operations are performed after arithmetic and relational operations Operator Operation Sample Expression NOT Logical negation IF NOT A B AND Logical and IF A B AND C D OR Inclusive or IF A B OR C D XOR Exclusive or IF A B XOR C D 4 4 Operator Precedence The precedence of BASIC operators affects the evaluation of operands in expressions Expressions with higher BASIC operators is listed precedence operators are evaluated first The precedence of below in the order of precedence from highest to lowest Where several operators appear together they have equal precedence Order of Precedence Highest Lowest Type of Operation Symbol Arithmetic Exponentiation A Arithmetic Multiplication Division MOD Modulo Arithmetic Addition Subtraction he Relational lt gt gt lt gt lt Logical AND NOT OR XOR Assignment 4 5 Labels Line labels are used to represent some special lines in the BASIC program They can be either integer numbers or character strings 24 BASIC Programming Guide For Use with CipherLab BASIC Compiler valid integer number for th
111. P again Data Transmission SOCKET_CAN_SEND Before sending data to the network call SOCKET_CAN_SEND to check if there is enough buffer size to write out the data immediately It also can be used to check if the data being sent is more than 4 packets when there is no response from the remote host Then call NWRITE to send data on the network SOCKET_HAS_DATA Before receiving data from the network call SOCKET_HAS_DATA to check if there is data in the buffer Then call NREAD to receive data on the network In case of an abnormal break during PPP DUN GPRS or GPRS connection GET_TCPIP_ MESSAGE will return 4013 while GET NET STATUS 7 will return 1 Useful Functions There are other routines for obtaining additional information or setting control for a connection SOCKET_OPEN SOCKET_HAS_DATA etc To check the connection status by polling method GET_NET PARAMETER To get the networking configuration and the remote site IP address TCP_ERR_CODE To get the operation result after calling any TCPIP routines Note Chapter 5 BASIC Commands 179 TCPIP Event Trigger ON TCPIP GOSUB and OFF TCPIP are used to get higher working performance Once the TCPIP event occurs it is necessary for the application program to check the trigger type by getting the value of the GET_TCPIP_MESSAGE routine Close a Connection Call NCLOSE to terminate a particular connection when the application program does not use it a
112. PDATE TRANSACTION SAVE_TRANSACTION_EX Purpose Syntax Remarks Example See Also To save append a transaction record to a specified transaction file SAVE TRANSACTION EX file data file is an integer variable in the range of 1 to 6 indicating which transaction file to access The command SAVE TRANSACTION _EX 1 data works the same as the command SAVE_TRANSACTION data data is a string variable representing the string to be saved in the specified transaction file ON READER 1 GOSUB BerData_1 BerData_1 BEEP 2000 5 Data GET READER DATA 1 PRINT Data SAVE_TRANSACTION_ EX TransFile Data IF GET_FILE_ ERROR lt gt 0 THEN PRINT Transaction not saved RETURN GET_ TRANSACTION DATA EX SAVE TRANSACTION UPDATE TRANSACTION EX TRANSACTION_COUNT Purpose Syntax Remarks Example See Also To get the total number of transaction records saved in the first default transaction file A TRANSACTION COUNT 4 is an integer variable to be assigned to the result DataCount DataCount TRANSACTION COUNT CLS PRINT DataCount Transaction data is saved RETURN TRANSACTION COUNT EX 204 BASIC Programming Guide For Use with CipherLab BASIC Compiler TRANSACTION _COUNT_EX Purpose Syntax Remarks Example See Also To get the total number of transaction records saved in a specified transaction file A TRANSACTION COUNT EX file 4 is an integer variable to be assigne
113. PDATE_TRANSACTION_EX Indicating the command UPDATE TRANSACTION EX is processed Indicating the command VAL is processed VALF X Indicating the command VALR is processed VERSION A Indicating the command VERSION is processed A is the character string to be written as the version information VIBRATOR WATT rts WATT_HOURGLASSC WRITE COMORAS oR 282 BASIC Programming Guide For Use with CipherLab BASIC Compiler 283 APPENDIX VI Cradle Commands Through programming the terminal you can use cradle commands to control the Cradle 10 determine whether cradle commands are applied use the third parameter of SET_COM N Baudrate Parity Data Handshake To determine which type of cradle to control use the second parameter of SET_COM N Baudrate Parity Data Handshake N Indicates which COM port is to be set 2 1 115200 bps Unless you have changed the baud rate setting via the DIP switch onboard assign 1 for Ethernet Cradle because its factory 3 57600 bps setting is 115200 bps Baudrate 4 38400 bps Unless you have changed the baud rate setting via the DIP switch onboard assign 3 5 19200 bps for Modem Cradle because its factory 6 9600 bps setting 5 57600 bps 3 1 None The parity setting is NOT applicable Parity 2 Odd Simply assign 4 3 Even 4 Cradle commands 1 None The handshake setting is NOT applicable Handshake 2 CTS RTS
114. S Flow Control To avoid data loss three options of flow control are supported and done by background routines 1 None Flow control is disabled 2 RTS CTS RTS now stands for Ready for Receiving instead of Request To Send while CTS for Clear To Send The two signals are used for hardware flow control Transmit Transmission is allowed only when the CTS signal is asserted If the CTS signal is negated de asserted and later becomes asserted again the transmission is automatically resumed by background routines However due to the UART design on chip temporary transmission buffer up to five characters might be sent after the CTS signal is de asserted a Receive The RTS signal is used to indicate whether the storage of receive buffer is free or not If the receive buffer cannot take more than 5 characters the RTS signal is de asserted and it instructs the sending device to halt the transmission When its receive buffer becomes enough for more than 15 characters the RTS signal becomes asserted again and it instructs the sending device to resume transmission Chapter 5 BASIC Commands 137 As long as the buffer is sufficient may be between 5 to 15 characters the received data can be stored even though the RTS signal has just been negated 3 XON XOFF Instead of using RTS CTS signals two special characters are used for software flow control i e XON hex 11 and XOFF hex 13 XON is used to enable transmission whi
115. SPP Slave call SET_COM 2 1 1 1 1 To initialize Bluetooth DUN call SET_COM 2 5 1 1 1 To initialize Bluetooth HID call SET_COM 2 6 1 1 1 1 N Indicates Bluetooth COM port is to be set 2 Baudrate 3 4 Data Handshake 115200 bps 76800 bps 57600 bps 38400 bps 19200 bps 9600 bps 4800 bps 2400 bps None Odd Even Cradle commands 7 data bits 8 data bits None CTS RTS XON XOFF Wedge Emulator The baud rate setting is NOT applicable to Bluetooth Simply assign 1 for SPP Slave 4 for SPP Master 5 for DUN 6 for HID The parity setting is NOT applicable to Bluetooth Simply assign for Bluetooth The data bits setting is NOT applicable to Bluetooth Simply assign 1 for Bluetooth The handshake setting is NOT applicable to Bluetooth Simply assign 1 for Bluetooth SPP DUN HID or assign 4 for Bluetooth Wedge Emulator 186 BASIC Programming Guide For Use with CipherLab BASIC Compiler gt SPP Call SET_COM_TYPE 2 5 to set COM2 to Bluetooth communication To initialize Bluetooth SPP Master call SET_COM 2 4 1 1 1 To initialize Bluetooth SPP Slave call SET_COM 2 1 1 1 1 Call OPEN_COM 2 to initialize the Bluetooth module and set up connection Call GET_NET_STATUS 8 to detect if connection is completed For example LOOPOO3 IF GET NET STATUS 8 0 THEN GOT
116. Simply assign 1 3 XON XOFF 4 Wedge Emulator Note Baud rate will be reset to the DIP switch setting whenever you plug or unplug the RS 232 cable 284 BASIC Programming Guide For Use with CipherLab BASIC Compiler For example Call SET_COM_TYPE 1 3 to set COM to Serial IR communication To enable the issuing of cradle commands to the Ethernet Cradle call SET_COM 1 1 4 2 1 Call OPEN_COM 1 to initialize the connection over COM1 Issue a cradle command listed below For example SendbaseS vErSiOn Call WRITE_COM 1 Sendbase Select Modem Ethernet After issuing the command the baud rate of the cradle will be reset to the DIP switch setting mOdEm lt CR gt DONE lt CR gt Note For the Ethernet Cradle the command Select Modem is actually means Select Ethernet because the modem board has been replaced by the Ethernet board Select RS 232 After issuing the command the baud rate of the cradle will be reset to the DIP switch setting SeRiAI lt CR gt DONE lt CR gt OK CABLE lt CR gt No RS 232 cable detected Note Baud rate will be reset to the DIP switch setting whenever you plug or unplug the RS 232 cable Appendix VI Cradle Commands 285 Get Version Information You can retrieve the version of IR board vErSiOn lt CR gt Ver03 20 lt CR gt Note There will be no response if the IR board version is no later than v3 00 Unknown Co
117. Structures Looping structures repeat a block of statements either for a specified number of times or until a certain condition is matched In CipherLab BASIC two kinds of looping structures FOR NEXT and WHILE WEND can be used The command EXIT can be used as an alternative to exit from both FOR NEXT and WHILE WEND loops Both FOR NEXT and WHILE WEND statements can be nested up to 10 levels EXIT Purpose Syntax Remarks Example To provide an alternative exit for looping structures such as FOR NEXT and WHILE WEND statements EXIT EXIT can appear anywhere within the loop statement DataCount TRANSACTION COUNT FOR Counter 1 TO DataCount Data GET_TRANSACTION DATA Counter HostCommand READ COM 1 IF HostCommand STOP THEN EXIT WRITE _COM 1 Data NEXT FOR NEXT Purpose Syntax Remarks To repeat the execution of a block of statements for a specified number of times FOR N startvalue TO endvalue STEP step Statement Block NEXT N N is an integer variable to be used as a loop counter startvalue 15 a numeric expression which is the initial value for the loop counter endvalue is a numeric expression which is the final value for the loop counter step is a numeric expression to be used as an increment decrement of the loop counter The step is 1 by default If the loop counter ever reaches or beyond the endvalue the program execution continues to the stateme
118. Syntax BIT_OPERATOR operator A B Remarks C 15 an integer C or long integer variable C amp to be assigned to the result operator is an integer variable indicating the bit wise operator bit wise AND bit wise OR bit wise XOR A is an integer 4 or long integer variable 416 indicating the 1 operand B is an integer B or long integer variable B amp indicating the 2 operand Example Result amp BIT OPERATOR 2 1100 1000 Purpose To specify the maximum value of variable subscripts and to allocate storage accordingly Syntax DIM Array range range Array range range Remarks Array is an array variable range can be an integer or an integer expression 30 BASIC Programming Guide For Use with CipherLab BASIC Compiler The DIM statement sets all the elements of the specified arrays to an initial value of zero or empty string Note that the maximum allowable number of dimensions for an array is 2 Example DIM A 10 B 20 C 30 10 Purpose To call a specified subroutine Syntax GOSUB SubName SubLabel Remarks SubName 15 the name of a subroutine SubLabel is the line label of a subroutine Example GOSUB Dolt GOSUB Done SUB Dolt PRINT Now I ve done it END SUB Done PRINT Now I ve done it RETURN GOTO Purpose To branch out unconditionally to a specified line number of line label from the normal program sequence Syntax GOTO LineNumber LineLab
119. T VIDEO MODE SET_VIDEO_MODE Purpose To set the display mode of the LCD Syntax SET VIDEO MODE mode Remarks mode 15 an integer variable indicating the display mode 0 VIDEO _ NORMAL 1 VIDEO_REVERSE Chapter 5 BASIC Commands 107 Kernel Menu SET_VIDEO_MODE 1 2 Load Program 3 Kernel Update 4 Test amp Calibrate 5 Bluetooth Menu Example SET VIDEO MODE 1 this string will be printed in reverse PRINT CipherLab terminals mee See Also BACK LIGHT DURATION LCD CONTRAST 108 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 15 2 Cursor CURSOR Purpose To turn on off the cursor indication on the LCD Syntax CURSOR status Remarks status is an integer variable indicating the cursor status g 0 The cursor indication is off Example CURSOR 0 See Also CURSOR_X CURSOR_Y LOCATE CURSOR_X Purpose To get the x coordinate of the current cursor position Syntax X CURSOR X Remarks X is an integer variable to be assigned to the column position of the cursor Example ON READER 1 GOSUB 86288 1 BcrData_1 BEEP 2000 5 Data GET_READER_DATA 1 Pre_X CURSOR Pre_Y CURSOR_Y Locate 8 1 PRINT Data Locate Pre_Y Pre_X RETURN See Also CURSOR CURSOR Y LOCATE CURSOR_Y Purpose To get the y coordinate of the current cursor position Syntax Remarks Example See Also Chapter 5 BASIC Commands 109 Y CURSOR_Y Y is an integer variable to b
120. TAS DISABLE READER OFF READER 1 ON READER 1 GOSUB For 2D or Extra Long Range Laser scan engine it is necessary to enable new settings by calling READER_CONFIG before decoding Note 1 When 2D barcode data exceeds 255 bytes it cannot be received completely in a string You need to repeatedly call GET READER DATAS to receive data until there is no data left out 2 Because the length of each record in the DBF file is limited to 250 bytes this index sequential file structure cannot be applied when dealing with 2D data that is longer than 250 bytes DISABLE READER Purpose To disable the reader ports of the terminal Syntax DISABLE READER V Remarks N is an integer variable indicating the reader port it is 1 for portable terminals Example Chapter 5 BASIC Commands 69 DISABLE READER 1 See Also ENABLE READER GET READER DATA ENABLE READER Purpose Syntax Remarks Example See Also To enable the reader ports of the terminal ENABLE READER N N is an integer variable indicating the reader port it is 1 for portable terminals The reader ports are disabled by default To enable barcode decoding function the reader ports have to be enabled by ENABLE READER ENABLE READER 1 ON READER 1 GOSUB Bcr 1 Bcr 1 Data GET_READER_DATA 1 RETURN DISABLE READER GET READER DATA OFF READER ON READER GOSUB READER CONFIG READER SETTING GET_READER_DATA Purpose Syntax Remar
121. TION DATA 1 200 BASIC Programming Guide For Use with CipherLab BASIC Compiler END IF See Also DEL TRANSACTION DATA EX EMPTY TRANSACTION DEL_TRANSACTION_DATA_EX Purpose To remove a block of transaction data from a specified transaction file Syntax DEL TRANSACTION DATA EX file N Remarks file is an integer variable in the range of 1 to 6 indicating which transaction file the command is to affect The command DEL_ TRANSACTION DATA EX 1 N works the same as the command DEL TRANSACTION DATA N N is an integer variable determining how many transaction records to be deleted and how to delete If N is a positive integer the specified number of records will be deleted from the top of the transaction file 1 i e the oldest records will be deleted If N is a negative integer the specified number of records will be deleted from the bottom of the transaction file 1 i e the latest records will be deleted Example PRINT Discard the latest transaction Y N Loop KeyData INKEY IF KeyData THEN GOTO Loop ELSE IF KeyData Y THEN DEL TRANSACTION DATA EX TransFile 1 END IF See Also DEL TRANSACTION DATA EMPTY TRANSACTION EX EMPTY_TRANSACTION Purpose To remove all the transaction data from the default transaction file Syntax EMPTY TRANSACTION Remarks This command will only have an effect on the first default transaction file Note that if this function is called at the beginning of the
122. TION EX fil Indicating the command EMPTY_TRANSACTION EX is e processed file is the number of the transaction file ENABLE READER N Indicating the command ENABLE READER is processed N is the number of the reader port ENABLE TOUCHSCREEN Indicating the command ENABLE TOUCHSCREEN is processed EVENTO EVENTO EVENTO EVENTO VENTO VENTO EVENTO Appendix V Debugging Messages 275 TO a EVENT 9 Indicating the TIMER 1 EVENT happens EVENT 10 Indicating the TIMER 2 EVENT happens EVENT 11 Indicating the TIMER 3 EVENT happens EVENT 12 Indicating the TIMER 4 EVENT happens EVENT 13 Indicating the TIMER 5 EVENT happens EVENT 14 Indicating the ON MINUTE EVENT happens EVENT 15 Indicating the ON HOUR EVENT happens ENT 16 Indicating the READER 1 EVENT happens ENT 17 Indicating the READER 2 EVENT happens ENT 18 Indicating the FU Indicating the FU ENT 20 Indicating the FU ENT 21 Indicating the FU INCTION INCTION INCTION 1 EVENT happens INCTION 2 EVEN 3 EVEN 4 EVEN T happens 117 happens T happens 5 EVENT happens ENT 22 Indicating the FUNCTION ENT 23 Indicating the FUNCTION 6 EVENT happens Indicating the FUNCTION 7 EVENT happens Indicating the FUNCTION 8 EVENT happens Indicating the FUNCTION 9 EVENT happens Indicating the FUNCTION 10 EVENT happens Indicating the FUNCTION 1 1 EVENT
123. Use with CipherLab BASIC Compiler See Also WEND GET_ TRANSACTION DATA EX SAVE TRANSACTION UPDATE TRANSACTION GET_TRANSACTION_DATA_EX Purpose Syntax Remarks Example See Also To read a transaction record from a specified transaction file A GET_ TRANSACTION DATA EX file N A is a string variable to be assigned to the transaction data file is an integer variable in the range of 1 to 6 indicating which transaction file to access The command GET_TRANSACTION DATA EX 1 1 works the same as the command GET _ TRANSACTION DATA 1 N is an integer variable indicating the ordinal number of the record to be read from the first transaction file WHILE TRANSACTION COUNT gt 0 TransactionData GET TRANSACTION DATA EX TransFile 1 WRITE _COM I TransactionData DEL_TRANSACTION DATA _EX TransFile 1 WEND GET_TRANSACTION DATA SAVE_TRANSACTION EX UPDATE TRANSACTION EX SAVE_TRANSACTION Purpose Syntax Remarks Example To save append a transaction record to the default transaction file SAVE_TRANSACTION data data is a string variable representing the string to be saved in the first default transaction file ON READER 1 GOSUB BerData_1 BerData_1 Data GET READER DATA 1 PRINT Data SAVE_TRANSACTION Data IF GET_FILE_ ERROR lt gt 0 THEN PRINT Transaction not saved RETURN See Also Chapter 5 BASIC Commands 203 GET_TRANSACTION DATA SAVE_TRANSACTION EX U
124. _READER_ SETTING 77 GET_RECORD 209 GET_RECORD_NUMBER 210 GET_RF_CHANNEL 148 GET_RF_ID 148 GET_RF_POWER 148 GET_RFID_KEY 81 GET_SCREENITEM 125 GET_TARGET_MACHINE 61 GET_TCPIP_MESSAGE 170 GET_TRANSACTION_DATA 201 GET_TRANSACTION 202 GET_WLAN_STATUS 169 GOSUB 30 GOTO 30 GSM_CHANGE PIN 191 GSM_CHECK_PIN 191 GSM_SET_PINLOCK 192 H HEX 43 ICON_ZONE_PRINT 110 IF THEN ELSE 33 IF THEN ELSE IF ELSE END IF 33 IF THEN END IF 34 INKEY 99 INPUT 100 INPUT_MODE 100 INSTR 40 INT 30 IP_CFG or IP_CONFIGURE 171 IRDA_STATUS 135 IRDA_TIMEOUT 136 K KEY_CLICK 101 L LCASE 43 LCD_CONTRAST 106 LED 98 LEFT 41 LEN 40 LINE 118 LOCATE 109 LOCK 57 M MAIN_BATTERY 127 MENU 61 MID 41 MOVE_TO 210 MOVE_TO_NEXT 211 MOVE_TO_PREVIOUS 211 N NCLOSE 171 NREAD 172 NWRITE 172 O OCT 44 OFF ALL 48 OFF COM 48 OFF ESC 49 OFF HOUR_SHARP 49 OFF KEY 50 OFF MINUTE_SHARP 50 OFF READER 50 OFF TCPIP 51 OFF TIMER 51 OFF TOUCHSCREEN 51 ON GOSUB 34 ON GOTO 35 ON COM GOSUB 52 ON ESC GOSUB 52 ON HOUR_SHARP GOSUB 53 ON KEY GOSUB 53 ON MINUTE_SHARP GOSUB 54 ON POWER_ON GOSUB 54 ON READER GOSUB 55 ON TCPIP GOSUB 56 ON TIMER GOSUB 56 ON T
125. a a sta 214 DDS eid PASH eaaa a A N sates 214 D232 N To DER E E EE AE A EEE R EEE E A A 216 5 24 Debugging Commands testet tsststessestestestestsseetessesees 217 5 25 Reserved Host 001818805 219 APPENDIX Reader Settings 223 Symbology Parameter Table 1 223 Symbology Parameter Table H 2 229 APPENDIX Symbology Parameters 237 Scan Engine CCD Or Lasers vicsvccuededees sees r aE r estat 238 Cod aD ar ees esi sthesh E P E E lous ES 238 Code 2 085 Family oes haa Oren Lath kits Sid aah Ae cote 238 COU 3D EEE TI cate czetsusesses tine 241 COS 241 Code STAN IE AEREA 7
126. am are treated as global variables passing arguments to subroutines is meaningless and enclosing arguments in the brackets of the subroutines will lead to a syntax error while compiling A subroutine in BASIC can be recursive which means it can call itself or other subroutines that in turn call the first subroutine The following sample program contains a recursive subroutine Factorial to calculate the value of n n factorial PRINT Please enter a number 1 13 INPUT N3 FactResult 1 Fact N GOSUB Factorial PRINT N FactResult Loop GOTO Loop Factorial IF Fact lt 1 THEN RETURN FactResult FactResult Fact Fact Fact 1 GOSUB Factorial RETURN 26 BASIC Programming Guide For Use with CipherLab BASIC Compiler 4 7 Programming Style The following are the guidelines used in writing programs in this manual including the sample program These guidelines are recommended for program readability but they are not compulsory Reserved words and symbolic constants appear in uppercase letters PRINT Portable Terminal Demo Program BEEP 800 30 0 5 800 15 0 5 800 15 Variable names are in lowercase with an initial capital letter If variable names are combined with more than one part other capital letters may be used to make it easier to read ProcessFlag s 0 Temp GET RECORDS 3 1 Line labels are used instead of line numbers
127. ants include positive and negative numbers Numeric constants in BASIC cannot contain commas There are three types of numeric constants that can be used in the CipherLab BASIC Compiler 20 BASIC Programming Guide For Use with CipherLab BASIC Compiler Integer Constants Whole numbers between 32 768 and 32 767 No decimal point Real Number Constants Positive or negative real numbers that is numbers that contain a decimal point such as 5 34 or 10 0 Long Integer Constants Whole numbers between 2 147 483 648 and 2 147 483 647 4 2 Variables Variables are symbols used to represent data items such as numerical values or character strings that are used in a BASIC program The value of a variable may be assigned explicitly and can be changed during the execution of a program Be aware that the value of a variable is assumed to be undefined until a value is assigned to it 4 2 1 Variable Names and Declaration Characters The following are the rules for variable names and declaration characters A variable name must begin with a letter A to Z The remaining characters can be letters numbers and or underscores The last character can be one of these type declaration characters integer 2 bytes 32 768 to 32 767 amp long 4 bytes 2 147 483 648 to 2 147 483 647 real number 4 bytes string 255 bytes nothing default 2 bytes 32 768 to 32 767 The variable name cannot be a BASIC reserve
128. assigned to the result The command is processed successfully Any format error occurs file 15 an integer variable in the range of 1 to 6 indicating which transaction file is to be erased CLEAR3 to delete data of the 3rd transaction file REMOVE Purpose Syntax Remarks To read the top most record of a specified transaction file 48 READ A READ file The command READ will read the top most record of the first transaction file which is the default one A is a string variable to be assigned to the result it may be the desired data string if the command is successfully processed Otherwise it may have one of the values as follows 220 BASIC Programming Guide For Use with CipherLab BASIC Compiler file is an integer variable in the range of 1 to 6 indicating of which transaction file the record is to be read Example READ1 10 read a record from the first transaction file REMOVE Purpose To delete one record from the top of a specified transaction file Syntax A REMOVE A REMOVE file Remarks The command REMOVE will delete one record from the top of the first transaction file which is the default one A is a string variable to be assigned to the result NEXT The command is processed successfully OVER There is no more data Any format error occurs file is an integer variable in the range of 1 to 6 indicating of which transaction file the record is to be deleted
129. ays when ICON ZONE _ PRINT is enabled the entire screen will be erased after calling CLS Note that the system may still show the status icons in this icon area even though ICON_ZONE PRINT is enabled This is because these status icons are constantly maintained by the system and they may override the printing of characters from time to time ICON_ZONE PRINT 1 allow the printing of the icon area PRINT PRINT Purpose Syntax Remarks Example See Also To display data on the LCD PRINT expression expression expression may be numeric or string expression The position of each printed item is determined by the punctuation used to separate items in the list In the list of expression a comma causes the next character to be printed after the last character with a blank space A semicolon causes the next character to be printed immediately after the last character If the list of expressions terminates without a comma or semicolon a carriage return is printed at the end of the line LOCATE 1 1 PRINT String 20 clear the whole line LOCATE 1 1 A 5 PRINT A square is A A CLS ICON_ZONE_ PRINT WAIT_HOURGLASS 8000 8300 8500 Purpose Syntax Remarks To show a moving hourglass on the LCD WAIT HOURGLASS x y type Call this function constantly to maintain its functionality Five different patterns of an hourglass take turns to show on the LCD indicating the passage of time The time factor
130. cal Operator ceon n 23 Contents AA 160 0 110001148 15 2 51 115 tt ale Bak tthe wee ati hash a 23 ND Isa DOL S25 Metre site oe EET cae Mees a betta lua hte Las tent elt oe tere E Se TEE 23 NO SUDIOUUIMES 5 3 e508 55 3 alee ye 24 4 7 Programming Style se 26 CHAPTER 5 BASIC Commands 27 5 lL General Command vecticc s i sectes seceses 29 5 2 Commands for Decision Structures 33 5 3 Commands for Looping 589 8 37 5 4 Commands for String 0 6851 8 39 5 4 1 Combining 5 1 85 ssar isterao i iie 39 5 4 2 Comparing Strings dette 39 5 4 3 Getting the Length of a 5 1 2
131. cating the command SET_RF_ TIMEOUT is processed N is the assigned time interval SET RFID KEY Indicating the command SET _RFID_KEY is processed SET_RFID_ READ Indicating the command SET _RFID_READ is processed SET_RFID_WRITE Indicating the command SET _RFID_ WRITE is processed SET_RTS N1 N2 Indicating the command SET_RTS is processed N1 15 the number of the COM port N2 is the RTS status SET_WADG Westin SHOW IMAGE SOCKET HAS DATA N Indicating the command SOCKET HAS _ DATA is processed N is the connection number SOCKET _OPEN N Indicating the command SOCKET OPEN is processed N is the connection number wo STRINGS SYSTEM_INFORMATIONS inde Indicating the command SYSTEM INFORMATIONS is x processed Appendix V Debugging Messages 281 SYSTEM PASSWORD A Indicating the command SYSTEM PASSWORD is processed A is the character string to be written as the password N Indicating the stack s level When the program branches to a subroutine the stack s level increases 1 when the program returns the stack s level decreases 1 It can be used to check if the stack overflow problem happens ICP OPEN TESS TRANSACTION _ COUNT Indicating the command TRANSACTION COUNT is processed TRANSACTION COUNT_EX fil Indicating the command TRANSACTION _COUNT_EX is e processed 8841971569 CASESOS PDATE_TRANSACTION N d Indicating the command UPDATE_TRANSACTION is ata processed
132. d It can be used with menu operation to detect a shortcut key being pressed or with touch screen operation to detect a touched item PRINT Initialize System Y N Loop KeyData INKEY IF KeyData THEN GOTO Loop ELSE IF KeyData Y THEN 100 BASIC Programming Guide For Use with CipherLab BASIC Compiler See Also INPUT GOTO Initialize CLR_KBD PUTKEY Purpose Syntax Remarks Example INPUT_MODE To take user input from the keypad and store it in a variable INPUT variable variable is a numeric or string variable that will receive the input data The data entered must match the data type of the variable When the input task is properly ended with the ENTER key being pressed the data string will be stored in a variable Otherwise press the ESC key to abort the task and the string will be cleared INPUT String input a string variable PRINT String INPUT Number input a numeric variable PRINT Number Purpose Syntax Remarks Example To set the display mode of the input data INPUT_MODE mode mode is an integer variable indicating the input mode Nothing will be displayed on the LCD The input characters will be displayed on the LCD default will be displayed instead of the input characters Usually it is applied for password input LOCATE 1 1 INPUT_MODE 1 INPUT Login LOCATE 2 1 NPUT_MODE 2 NPUT Password I I Chapter 5 BASIC Commands 1
133. d of time in units of 10 ms SubName SubLabel is the name or line label of a subroutine ON TIMER 1 200 GOSUB ClearScreen TIMER 1 2 sec ClearScreen OFF TIMER 1 CLS RETURN Calendar amp Timer commands OFF TIMER Chapter 5 BASIC Commands 57 ON TOUCHSCREEN GOSUB 8500 Purpose Syntax Remarks Example See Also 5 5 2 Lock and Unlock To activate TOUCHSCREEN Event Trigger ON TOUCHSCREEN GOSUB SubName SubLabel SubName SubLabel When the touch screen is enabled a specific subroutine will be executed SubName SubLabel is the name or line label of a subroutine ON TOUCHSCREEN GOSUB CHECK_ FUN CHECK_FUN NO GET_SCREENITEM RETURN OFF TOUCHSCREEN Touch Screen commands Event trapping could be nested If the event triggers are activated in a BASIC program it is possible that an event driven subroutine can be interrupted by any upcoming events Normally the new event would be processed first In some cases where we don t want the event driven subroutine to be interrupted by other events the commands LOCK and UNLOCK can be used to hold off new events LOCK Purpose Syntax Remarks Example To hold all the activated event triggers until they are released by UNLOCK LOCK This command can prevent nesting of event triggers All the activated event triggers will be disabled until UNLOCK is called ON READER 1 GOSUB BerData_1 ON READER 2 GOSUB BerData_2 BerData_1 LOCK BEEP 2000 5 Da
134. d to the result file is an integer variable in the range of 1 to 6 indicating which transaction file to access The command TRANSACTION COUNT _ EX 1 works the same as the command TRANSACTION COUNT DataCount_1 DataCount TRANSACTION COUNT EX 1 CLS PRINT DataCount Data in transaction file 1 RETURN TRANSACTION COUNT UPDATE_TRANSACTION Purpose Syntax Remarks Example See Also To update a transaction record in the first default transaction file UPDATE_TRANSACTION N data N is an integer variable indicating the ordinal number of the transaction record to be updated data is a string variable representing the character string to replace the old data UpdateTransaction UPDATE_TRANSACTION Num NewData RETURN GET_TRANSACTION DATA SAVE TRANSACTION UPDATE TRANSACTION EX UPDATE_TRANSACTION_EX Purpose Syntax To update a transaction record in a specified transaction file UPDATE_TRANSACTION EX file N data Remarks Example See Also Chapter 5 BASIC Commands 205 file 15 an integer variable in the range of 1 to 6 indicating which transaction file to access The command UPDATE_TRANSACTION_ EX 1 N data works the same as the command UPDATE_TRANSACTION N data N is an integer variable indicating the ordinal number of the transaction record to be updated data is a string variable representing the character string to replace the old data Updat
135. d word Only 4 types of variables are supported The maximum number of variables is 1 000 Variable names are not case sensitive 4 2 2 Array Variables An array is a group or table of values referenced by the same variable name Chapter 4 Basics of the CipherLab BASIC Language 21 Each element in an array is referenced by an array variable that is subscripted with an integer or an integer expression array variable name has as many dimensions as there are subscripts in the array For example A 12 would reference a value in a one dimension array T 2 5 would reference a value in a two dimension array and so on Each element in an array is referenced by an array variable that is subscripted with an integer or an integer expression For example DIM IntegerA 20 declares an integer array with 20 elements DIM StringBS 100 declares a string array with 100 elements DIM RealC 10 declares an integer array with 10 elements DIM Tb 5 5 declares a two dimension integer array with 5x5 elements ArrayD 1 1 The elements of an array are subscripted with an integer expression The first element of an array is subscripted with 1 In the CipherLab BASIC language the maximum number of dimensions for an array 15 2 and up to 32 767 elements per dimension is allowed while compiling 4 3 Expression and Operators An expression may be a string or numeric constant or a variable or it
136. de Range 0 Disable UPC E0 System Number amp Country Code 2D Extra Long 1 Enable UPC EO System Number amp Country Code REE 0 Disable UPC E1 System Number amp Country Code 2D Extra Long 1 Enable UPC E1 System Number amp Country Code Range Convert UPC E0 UPC E1 to UPC A If this parameter is enabled the read UPC E0 UPC E1 barcode will be expanded into UPC A and the next processing will follow the parameters configured for UPC A Convert EAN 8 to EAN 13 If this parameter is enabled the read EAN 8 barcode will be expanded into EAN 13 and the next processing will follow the parameters configured for EAN 13 Transmit Check Digit If this parameter is enabled the checksum character will be included in the data being transmitted Transmit System Number If this parameter is enabled the system number will be included in the data being transmitted Joint Configuration No N1 Values and Description N2 139 0 Disable Joint Configuration 2D Extra Long Range 1 Enable Joint Configuration of No Addon Addon 2 amp 5 for Any Member of UPC EAN Families Appendix Symbology Parameters 257 If Index No 139 for joint configuration is set 1 the parameters of Table I can be configured separately It depends on which member of the families needs to be enabled If Index No 139 for Joint Configuration is set 0 then When ANY of the indexes of Table II is set 1 only Addon 2 amp
137. ding data They are performed via a virtual COM port namely COM3 The communication type GSM SMS and GSM Modem which are for SMS and data call respectively should be assigned by calling SET_COM_TYPE before use The GSM_SMS supports uncompressed PDU Protocol Description Unit message mode It can handle both 7 bit default alphabet and 8 bit data In addition concatenated messages are also supported Call SET_NET PARAMETER to set variables such as PINCodef ModemDialNum and so on It is recommended that the correct PIN code should be initialized before opening the GSM port This is because the PIN code will be taken as a password to activate the SIM card Therefore incorrect PIN code during initialization will result in wasting one attempt of PIN entry If you fail the PIN entry three times the procedure of PIN code entry will be locked Call SET_COM_TYPE 3 6 to set COM3 for SMS GSM_SMS Or call SET_COM_TYPE 3 7 to set COM3 for data call GSM_ Modem Call OPEN_COM 3 to initialize the GSM GPRS module The initialization takes about 10 seconds An antenna icon representing the GSM operation will be displayed and it keeps flashing until OPEN_COM 3 is completed 194 BASIC Programming Guide For Use with CipherLab BASIC Compiler For GSM_SMS only once the procedure is completed the signal strength bar will be displayed next to the antenna icon and it will be updated every five seconds The level of the signal stren
138. e ISSN Conversion Appendix Symbology Parameters 247 0 DO NOT transmit EAN 13 Check Digit CCD Laser 1 Transmit EAN 13 Check Digit Convert EAN 13 to ISBN If this parameter is enabled the read EAN 13 barcode starting with 978 or 979 will be converted to ISBN Convert EAN 13 to ISSN If this parameter is enabled the read EAN 13 barcode starting with 977 will be converted to ISSN Transmit Check Digit If this parameter is enabled the checksum character will be included in the data being transmitted GTIN No N1 Values and Description N2 Lee 87 0 Disable GTIN CCD Laser 1 Enable GTIN UPC A No Values and Description N2 0 No conversion CCD Laser 1 Convert UPC A to EAN 13 ae 48 0 DO NOT transmit UPC A Check Digit CCD Laser 1 Transmit UPC A Check Digit 52 0 DO NOT transmit UPC A System Number CCD Laser 1 Transmit UPC A System Number Convert UPC A to EAN 13 If this parameter is enabled the read UPC A barcode will be expanded into EAN 13 and the next processing will follow the parameters configured for EAN 13 Transmit Check Digit If this parameter is enabled the checksum character will be included in the data being transmitted Transmit System Number If this parameter is enabled the system number will be included in the data being transmitted 248 BASIC Programming Guide For Use with CipherLab BASIC Compiler UPC E Values and Description N2 ae 10 0 D
139. e assigned to the row position of the cursor ON READER 1 GOSUB BerData_1 BerData_1 BEEP 2000 5 Data GET READER DATAS 1 Pre_X CURSOR_X Pre_Y CURSOR_Y Locate 8 1 PRINT Data Locate Pre Y Pre X RETURN CURSOR CURSOR_X LOCATE LOCATE Purpose Syntax Remarks Example See Also To move the cursor to a specified location on the LCD LOCATE row col row is an integer variable indicating the new row position of the cursor col is an integer variable indicating the new column position of the cursor Depending on the following elements the maximum values for row and column are limited The printing of characters in the icon area which is determined by ICON_ZONE_PRINT The size of LCD The font file in use For the 8500 series the y coordinate cannot be over 18 with font size 6x8 and ICON_ZONE_PRINT 0 is given LOCATE 1 1 move the cursor to the top left of the LCD CURSOR CURSOR_X CURSOR_Y 110 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 15 3 Display FILL_RECT Purpose Syntax Remarks Example See Also To fill a rectangular area on the LCD FILL_RECT x y size_x size_y x y are integer variables indicating the x y coordinates of the upper left point of the rectangular area size_x is an integer variable indicating the width of the rectangle in pixels size_y is an integer variable indicating the height of the recta
140. e line label is in the range of 1 to 32 767 character string label can have up to 49 characters If the string label has more than 49 characters it will be truncated to 49 characters long The maximum number of labels is 1 000 Note The maximum compilable lines are 12 000 trial version 1 000 lines A character string label that precedes a program line must have a colon between the label and the program line but it is not necessary for an integer label For example GOTO 100 100 PRINT This is an integer label GOTO Label2 Label2 PRINT This is a character string label 4 6 Subroutines A subroutine is a set of instructions given a particular name or a line label Users can simplify their programming by breaking programs into smaller logical subroutines A subroutine will be executed when being called by a GOSUB command For example ON KEY 1 GOSUB KeyF1 KeyF1 RINT Fl is pressed zy ETURN The command RETURN marks the end of the subroutine and tells the processor to return to the caller A subroutine has to be appended at the end of the main BASIC program Chapter 4 Basics of the CipherLab BASIC Language 25 A subroutine can be defined with or without a pair of brackets For example SUB Subroutinel PRINT Subroutinel is executed END SUB SUB Subroutine2 PRINT Subroutine2 is executed END SUB Since all the variables in the CipherLab BASIC progr
141. eTransaction_1 UPDATE_TRANSACTION EX 1 Num NewData RETURN GET_TRANSACTION DATA _EX SAVE TRANSACTION EX UPDATE TRANSACTION 206 BASIC Programming Guide For Use with CipherLab BASIC Compiler 9 22 2 DBF Files and IDX Files This one is an index sequential file structure Table look up and report generation is easily supported by using index sequential file routines There are actually two types of files associated with this file structure namely DBF files and IDX files A DBF file has a fixed record length structure This is the file that stores the data records members whereas the associated IDX files are the files that keep the information of the position of each record stored in the DBF file Yet such index files are re arranged sorted according to some specific key values In addition to the IDX files that are explicitly created by user the BASIC run time maintains a default IDX file which keeps the original data sequence Data records are not manipulated directly from the DBF file but rather through its associated IDX files The value of file pointers of the IDX files index pointers does not represent the address of the data records stored in the DBF file It indicates the sequence number of a specific data record in the IDX file A library would be a good example to illustrate how DBF and IDX files work When you are trying to find a specific book in a library you always start from the index The book can be found by
142. eces of a string from the left side or the right side or the middle of the target string LEFT Purpose Syntax Remarks Example To retrieve a given number of characters from the left side of the target string A LEFT X N A is a string variable to be assigned to the result X may be a string variable string expression or string constant N is a numeric expression in the range of 0 to 255 If N is larger than the length of X the entire string X is returned If N is zero the null string with lenght 0 is returned String1 11025John Thomas Accounting Manager EmployeeID LEFT String1 5 Purpose Syntax Remarks Example To retrieve a given number of characters from anywhere of the target string A MIDS X N M A is a string variable to be assigned to the result X may be a string variable string expression or string constant N and M are numeric expressions in the range of 0 to 255 This command returns a string of length M characters from X beginning with the Nth character If M is omitted or if there are fewer than M characters to the right of the Nth character all the characters beginning with the Nth character to the rightmost are returned If M is equal to zero or if N is greater than the length of X then MID returns a null string String1 11025John Thomas Accounting Manager String2 EmployeeName MID String1 6 INSTR Strin
143. ected KEY event a signal is received from the serial port COM event and so on There are two ways to detect the occurrence of an event and reroute the program control to an appropriate subroutine polling and trapping With event polling the BASIC program explicitly checks for any event that happens at a particular point in its execution For example the following statements cause the program to loop back and forth until any key being pressed by user Loop KeyData INKEYS IF KeyData THEN GOTO Loop Polling is useful when the occurrence of an event is predictable in the flow of the program But if the time of the occurrence of an event is not predictable trapping becomes the better alternative because the program will not be paused by the looping statements For example the following statements cause the program rerouting to the Key_F1 subroutine when the key F1 is pressed at anytime ON KEY 1 GOSUB Key F1 Key Fl This section describes a variety of events that the CipherLab BASIC can trap as well as the related commands 5 5 1 Event Triggers Below are 10 different events that can be trapped 1 COM Event a signal is received from the COM port 48 BASIC Programming Guide For Use with CipherLab BASIC Compiler ESC Event the ESC key is pressed HOUR_SHARP Event the system time is on the hour KEY Event a function key is pressed MINUTE_SHARP Event the system time is on the minute READER Ev
144. ed or replaced CheckBackupBattery IF BACKUP_BATTERY lt BATTERY LOW THEN BEEP 2000 30 CLS PRINT Backup Battery needs to be replaced Loop GOTO Loop END IF MAIN BATTERY MAIN_BATTERY Purpose Syntax Remarks To get the voltage level of the main battery A MAIN BATTERY 4 is an integer variable to be assigned to the result That is the voltage level of the main battery is returned in units of milli volt mV The main battery is the power source for the system operation The main battery would be considered as Battery Low when the MAIN BATTERY is lower than 3400 mV or 2200 mV for alkaline battery on 8001 That means the basic operations may still be running but some functions that consume high power may be disabled 128 BASIC Programming Guide For Use with CipherLab BASIC Compiler Example BATTERY _ LOW 3400 CheckMainBattery IF MAIN _ BATTERY lt BATTERY LOW THEN BEEP 2000 30 CLS PRINT Main Battery needs to be recharged Loop GOTO Loop END IF See Also BACKUP BATTERY Chapter 5 BASIC Commands 129 5 18 Communication Ports There are at least two communication ports on each terminal namely COMI and COM2 Before using the COM ports user has to call SET_COM_TYPE to specify which communication type is to be used RS 232 Serial IR IrDA RF Bluetooth SPP DUN HID or GSM Note SET _COM_TYPE is not applicable to RFID COM 4 5 18 1 Port Mapping The following table shows the mapping of
145. eger variable indicating the reader port usually 1 for portable terminals SubName SubLabel is the name or line label of a subroutine Example ON READER 1 GOSUB BerData_1 BerData_1 OFF READER 1 BEEP 2000 5 Data GET READER DATAS 1 See Also General Reader commands OFF READER 56 BASIC Programming Guide For Use with CipherLab BASIC Compiler ON TCPIP GOSUB 8000 8300 8500 Purpose Syntax Remarks Example See Also To activate TCP IP Event Trigger ON TCPIP GOSUB SubLabel When data is received from any TCP IP connection or some error is taking place a specific subroutine will be executed SubLabel is the line label of a subroutine The GET_TCPIP_MESSAGE routine is used to identify the status of TCP IP connections ON GOSUB TCPIP_ Trigger TCPIP_ Trigger MSG GET_TCPIP_MESSAGE OFF TCPIP TCP IP Networking commands ON TIMER GOSUB Purpose Syntax Remarks Example See Also To activate TIMER Event Trigger ON TIMER N duration GOSUB SubName SubLabel When the system runs out of the time duration specified by user a specific subroutine will be executed Up to five timers can be set ina BASIC program Be sure the timer IDs are different Otherwise the latter created timer will overwrite the former one N 15 an integer variable in the range of 1 to 5 indicating the ordinal number of timer duration is an integer variable indicating a specified perio
146. el Remarks LineNumber is the integer number in front of a program line LineLabel is the string label of a program line Example Loop GOTO Loop Purpose To return the largest integer that is less than or equal to the given numeric expression Syntax Remarks Example Chapter 5 BASIC Commands 31 A INT N 4 is an integer variable to be assigned to the result N is a numeric expression A INT 2 86 A 3 B INT 2 86 856 2 Purpose Syntax Remarks Example To insert explanatory remarks in a program REM remark remark remark may be any sequence of characters The BASIC compiler will ignore whatever follows the REM or until end of the line REM This is a comment This is a comment SET_PRECISION Purpose Syntax Remarks Example To set the precision of the decimal points for printing real number expressions SET_PRECISION N N is a numeric expression in the range of 0 to 6 The precision is set to two digits by default PI 3 14159 PRINT PI PI result PI 3 14 by default SET _PRECISION 6 PRINT PI PI result PI 3 141590 SET _PRECISION 2 PRINT PI PI result PI 3 14 Purpose Syntax Remarks To return an indication of the mathematical sign or of a given numeric expression A SGN N 4 is an integer variable to be assigned to the result 32 BASIC Programming Guide For U
147. em will work properly For the 433 MHz RF system up to 45 terminals and 16 bases can be supported by one system The valid ID ranges from 1 to 45 for terminals and 1 to 16 for bases To support all 45 terminals the 433 MHz RF bases need to be configured to 3 groups Each group as well as each base can support up to 15 terminals Base IDs 433 MHz 01 16 Terminal IDs 433 MHz 01 45 3 groups 01 15 supported by Group 1 bases 16 30 supported by Group 2 bases 31 45 supported by Group 3 bases For the 2 4 GHz RF system up to 99 terminals and 16 bases can be supported by one system and they all belong to one group The valid ID ranges from 1 to 99 for terminals and 1 to 16 for bases Base IDs 2 4 GHz 01 16 Terminal IDs 2 4 GHz 01 99 144 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 20 3 RF Topology amp Roaming You may need to install more than one base station to cover the most of your working floor so that you can move around and stay connected all the time There is one simple rule two adjacent bases must not use the same channel The following are several types of deployment for the 433 MHz RF system Each circle represents the area covered by one base and the number inside the circle refers to the channel of the base The square in dashed line represents the working floor Chapter 5 BASIC Commands 145 By default a terminal can automatically switch to a different channel depending on
148. emarks N is an integer variable indicating which COM port is to be disabled Example CLOSE COM 2 See Also OPEN COM READ COM SET_COM_TYPE WRITE _COM OPEN_COM Purpose To enable a specified COM port and initialize communication Syntax OPEN COM N Remarks N is an integer variable indicating which COM port is to be enabled Example OPEN COM 1 See Also CLOSE _COM OFF COM ON COM GOSUB READ _COM SET_COM_TYPE WRITE_COM READ_COM Purpose To read data from a specified COM port Syntax AS READ COM N Remarks A is a string variable to be assigned to the data N is an integer variable indicating from which COM port the data is to be read If the receive buffer is empty an empty string will be returned Example ON COM 1 GOSUB HostCommand HostCommand Cmd READ_COMS 1 Cmdldentifier LEFT Cmd 1 DBENum VAL MID Cmd 2 1 IDFNum VAL MID Cmd 3 1 CardID RIGHT Cmd LEN Cmd 3 IF CmdlIdentifier THEN DEL_RECORD DBFNum IDFNum ELSE Chapter 5 BASIC Commands 131 See Also CLOSE COM OFF COM ON COM GOSUB OPEN_COM SET _COM_ TYPE WRITE COM SET_COM To set parameters for a specified COM port SET_COM N Baudrate Parity Data Handshake This command needs to be called BEFORE opening a COM port However it is not necessary for RF GSM and RFID Purpose Syntax Remarks This command also serves Bluetooth configuration for SPP DUN HID and
149. ension For other types of error e g invalid file ID it will cause a run time error Example ADD_RECORD 1 Data IF GET_FILE_ ERROR 10 THEN ErrorMessage No free file space END IF 214 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 23 Memory Commands This section describes the commands related to the flash memory and SRAM where the Program Manager and File System reside respectively The terminal has at least 1 MB flash memory for program storage and up to 4 MB SRAM for data storage However the flash memory also serves to store crucial user data such as the application settings One memory bank with specific address 0xF60000 OxF6FFFF is reserved for this purpose Note Currently only the 8000 8500 series has 2 MB flash memory 9 23 1 Flash The flash memory is divided into a number of memory banks and each bank is 64 KB If 1 MB it is divided into 16 banks 711 8100 8300 If2 MB it is divided into 32 banks 8000 8500 The kernel itself takes 2 banks and the system reserves 1 bank OxF60000 OxF6FFFF for data storage such as the application settings The rest banks are available for storing user programs as well as font files Because the flash memory is non volatile it needs to be erased before writing to the same bank 0xF60000 OxF6FFFF This memory bank is further divided into 256 records numbering from 1 256 and each with length limited to 255 bytes Note The flash me
150. ent a barcode data is decoded TCPIP Event any data packet is received via TCP IP TIMER Event a time out condition of an activated timer TOUCHSCREEN Event a touchable item is activated by selecting 0 POWER _ON Event the POWER key is pressed after powering off the terminal OFF ALL Purpose 0 terminate all the event triggers Syntax OFF ALL Se ae ee ee Remarks To resume the event trigger call ON event GOSUB Example ON READER 1 GOSUB BcrData_1 ON READER 2 GOSUB BcrData_2 ON KEY 1 GOSUB KeyData_1 IF BACKUP_BATTERY lt BATTERY LOW THEN OFF ALL BEEP 2000 30 CLS PRINT Backup Battery needs to be replaced Loop GOTO Loop END IF See Also OFF COM OFF ESC OFF HOUR_SHARP OFF KEY OFF MINUTE_SHARP OFF READER OFF TCPIP OFF TIMER OFF TOUCHSCREEN OFF COM Purpose To terminate COM Event Trigger Syntax OFF COM N Remarks Example See Also Chapter 5 BASIC Commands 49 To resume the event trigger call ON COM GOSUB N is an integer variable indicating the COM port N Available on terminals 711 8100 8000 8300 8500 ON COM 1 GOSUB HostCommand 1 2 1 4 HostCommand_1 OFF COM 1 REM disable the trapping during data processing ON COM 1 GOSUB HostCommand RETURN ON COM GOSUB OFF ESC Purpose Syntax Remarks Example See Also To terminate ESC Event Trigger OFF ESC To resume the event trigger call ON ESC GOSUB ON ESC GOSUB Key_
151. er is enabled Macro PDF Escape Characters When enabled it uses the backlash as an Escape character for systems that can process transmissions containing special data sequences It will format special data according to the Global Label Identifier GLI protocol which only affects the data portion of a Macro PDF symbol transmission The Control Header if enabled is always sent with GLI formatting QR Code No a Values and Description N2 0 Disable QR Code 1 Enable QR Code 264 BASIC Programming Guide For Use with CipherLab BASIC Compiler 265 APPENDIX III scanner Parameters This appendix describes associated scanner parameters Scan Mode Index 70 is used to define a scan mode that best suits the requirements of a specific application Index 72 or 145 is used to define a scanner timeout if necessary 9 scan modes are supported on CCD or Laser scan engine See the comparison table below Only Laser and Aiming modes are supported on Extra Long Range Laser scan engine When in aiming mode it will generate an aiming dot once you press the trigger key The aiming dot will not go off until it times out or you press the trigger key again to start scanning No Values and Description N2 eae Scan Mode for Scanner Port 1 CCD Laser 0 Auto Off Mode Continuous Mode Auto Power Off Mode Alternate Mode Momentary Mode Repeat Mode Laser Mode Test Mode Aimin
152. er variable indicating the LED color mode is an integer variable indicating the digital output mode The values of the mode and their interpretation are listed below Turn off the LED for the specific duration and then turn on Turn on the LED for the specific duration and then turn off Flash the LED for a specific duration repeatedly The flashing period equals 2Xduration duration is an integer variable specifying a period of time in units of 10 milliseconds A value of 0 in this argument will keep the LED in the specific state indefinitely Example ON READER 1 GOSUB BerData_1 BerData_1 BEEP 2000 5 LED 2 1 5 GOOD READ LED for 520 Data GET READER DATA 1 Chapter 5 BASIC Commands 99 5 14 Keypad Commands All the CipherLab portable terminals provide a built in keypad for data input This section describes the commands related to the keypad operation Commands for triggering the ESC event and the KEY event OFF ESC OFF KEY ON ESC GOSUB ON KEY GOSUB 5 14 1 General CLR_KBD Purpose Syntax Remarks Example See Also To clear the keyboard buffer CLR_KBD By calling this function data queuing in the keyboard buffer will be cleared CLR_KBD ON KEY 1 GOSUB KeyData_1 INKEY PUTKEY INKEY Purpose Syntax Remarks Example To read one character from the keyboard buffer and then remove it X INKEY X is a string variable to be assigned to the character rea
153. erify Code 39 Check Digit 2D Extra Long 1 Verify Code 39 Check Digit 0 DO NOT transmit Code 39 Check Digit 2D Extra Long 1 Transmit Code 39 Check Digit 0 Standard Code 39 2D Extra Long 1 Full ASCII Code 39 2D Extra Long 2D Extra Long Range MSI Check Digit Verification 2D Extra Long 0 Single Modulo 10 Range 1 Double Modulo 10 2 Modulo 11 and Modulo 10 2D Extra Long 2D Extra Long Range Appendix Reader Settings 231 N 0 DO NOT transmit UPC E0 Check Digit 2D Extra Long 1 Transmit UPC EO Check Digit 0 DO NOT transmit UPC A Check Digit 2D Extra Long 1 Transmit UPC A Check Digit r 0 DO NOT transmit UPC EO System Number 2D Extra Long 1 Transmit UPC E0O System Number Ranke 0 DO NOT transmit UPC A System Number 2D Extra Long 1 Transmit UPC A System Number N 0 No conversion 2D Extra Long 1 Convert EAN 8 to EAN 13 for portable terminals 1 ny A 0 Interleaved 25 Code Length Limitation in Fixed Length 2D Extra Long Format Range 1 Interleaved 25 Code Length Limitation in Max Min Length Format Interleaved 25 Max Code Length Fixed Length 1 2D Extra Long Range Interleaved 25 Min Code Length Fixed Length 2 2D Extra Long Length must be greater than Length2 61 67 0 MSI 25 Code Length Limitation in Fixed Length Format 2D Extra Long 1 MSI 25 Code Length Limitation in Max Min Length Fo
154. es If the checksum character is incorrect the barcode will not be accepted Transmit Check Digit This parameter specifies how the checksum is to be transmitted User can select from Last digit not transmitted Transmitted and Last 2 digits not transmitted Length Qualification Because of the weak structure of the MSI barcodes it is possible to make a short scan error To prevent the short scan error user can define the Length Qualification settings to insure that the correct barcode is read by qualifying the allowable code length The barcode can be qualified by Fixed Length or Max Min Length If Fixed Length is selected up to 2 fixed lengths can be specified If Max Min Length is selected the maximum length and the minimum length must be specified The terminal will only accept MSI barcodes with lengths that fall between max min lengths specified Negative Barcode No N1 Values and Description N2 tame 55 0 Disable Negative Barcode CCD Laser 1 Enable Negative Barcode 244 BASIC Programming Guide For Use with CipherLab BASIC Compiler Plessey No Values and Description N2 999999 0 Disable Plessey CCD Laser 1 Enable Plessey 0 DO NOT transmit Plessey Check Digits CCD Laser 1 Transmit Plessey Check Digits 42 0 No conversion CCD Laser 1 Convert Standard Plessey to UK Plessey Transmit Check Digits If this parameter is enabled the checksum
155. es is for identification as well as to the benefit of the owners with no intention of infringement CIPHERLAB CO LTD Website http www cipherlab com Revision History Version 3 05 16 3 05 15 3 05 14 3 05 13 3 05 12 3 05 11 3 05 10 3 05 09 3 05 08 3 05 07 3 05 Release Date Apr 10 2007 Mar 01 2007 Sep 15 2006 Aug 14 2006 Aug 09 2006 June 07 2006 June 05 2006 May 17 2006 May 11 2006 Mar 15 2006 Feb 21 2006 Notes New 5 21 2 Network Configuration WPA related parameters New Appendix I Symbology Parameter Table I UPC E1 Triple Check Index No 148 New 5 5 1 ON POWER_ON GOSUB New 5 8 SR176 is supported Modified 5 19 1 amp 5 21 2 PPP LoginName 20 changed to LoginName 39 New Appendix VI Cradle commands New Macro PDF417 supported Updated section 5 7 2 Code Type Symbology Mapping Table II Updated Appendix I Symbology Parameter Table II Modified Modified Format of Device ID 5 6 2 for 8300 Modified section 5 8 RFID supported on 8300 Modified section 5 8 2 Data format of READ _COM 4 starts from Byte 1 Modified Format of Device ID 5 6 2 for 8300 H W 4 0 Modified VIBRATORQ for 8300 H W 4 0 New SYSTEM_INFORMATIONS 9 for RFID Version Modified section 5 8 RFID Reader New GET_RFID_ KEY SET_RFID KEY New 5 19 IR RS 232 Networking to include PPP amp Ethernet connect
156. etting of the capital lock status even though the auto detection setting is enabled To enable Capital Lock Auto Detection add 128 to the value of the second element of WedgeSetting Wedge 2 Capital Lock Status Setting In order to send alphabets with correct case upper or lower case the command SEND_WEDGE must know the capital lock status of keyboard when transmitting data Incorrect capital lock setting will result in different letter case for example A becomes a and a becomes A To set Capital Lock ON add 64 to the value of the second element of WedgeSetting Wedge 25 Alphabets Case The setting of this bit affects the way the command SEND_WEDGE transmits alphabets SEND_WEDGE can transmit alphabets according to their original case case sensitive or just ignore it If ignoring case is selected SEND_WEDGE will always transmit alphabets without adding shift key To set Ignore Alphabets Case add 32 to the value of the second element of WedgeSetting Wedge 25 Digits Position This setting can force the command SEND_WEDGE to treat the position of the digit keys on the keyboard differently If this setting is set to upper SEND_WEDGE will add shift key when transmitting digits This setting will be effective only when the keyboard type selected is PCAT all available language PS2 30 PS55 or Memorex Telex However if the user chooses to send digits using numeric
157. f 1 second If the time interval is set to zero this function will be disabled AUTO_OFF 30 auto off after 30 seconds AUTO_OFF 0 disable the AUTO OFF function POWER_ON RESTART CHANGE_SPEED 711 8100 8000 8300 Purpose Syntax Remarks Example To change the CPU running speed CHANGE_SPEED N When the system is not heavy loaded e g waiting for data input it is suggested to change the CPU running speed to a lower level to reduce the power consumption N is an integer variable in the range of 1 to 5 indicating the CPU running speed Sixteenth speed Eighth speed Quarter speed Half speed Full speed CHANGE_SPEED 3 60 BASIC Programming Guide For Use with CipherLab BASIC Compiler DEVICE_ID To get the serial number of the terminal A DEVICE _ID This command is to be replaced by SYSTEM_INFORMATION A is a string variable to be assigned to the result That is a string of the terminal s serial number will be returned Purpose Syntax Remarks Example GET_LANGUAGE Purpose Syntax Remarks To retrieve the font language setting A GET LANGUAGE System font Traditional Chinese font Simplified Chinese font Simplified Chinese font Korean font Japanese font Hebrew font Polish font Russian font Traditional Chinese font Reserved Simplified Chinese font Japanese font English Canadian French Hebrew Multilingual Latin I Nordic Portuguese Cyrillic Russia
158. f UPC amp EAN Families 2D Extra Long 14 or 15 or 17 or 18 or It requires ALL of the indexes to be set 0 107 or 109 1 Enable Only Addon 2 amp 5 of UPC amp EAN Families It requires ANY of the indexes to be set 1 Appendix Symbology Parameters 259 2D Scan Engine Only In addition to those symbologies described previously the 2D scan engine supports the following symbologies 1D Symbologies Code 11 omua 0 Disable Code 11 1 Enable Code 11 116 0 Code 11 Length Limitation in Fixed Length Format 2D 1 Code 11 Length Limitation in Max Min Length Format 21 Code 11 Max Code Length Fixed Length1 118 Code 11 Min Code Length Fixed Length2 2D Length must be greater than Length2 Length Qualification The barcode can be qualified by Fixed Length or Max Min Length The length of a barcode refers to the number of characters i e human readable characters including check digit s it contains If Fixed Length is selected up to 2 fixed lengths can be specified If Max Min Length is selected the maximum length and the minimum length must be specified The terminal will only accept those barcodes with lengths that fall between max min lengths specified Note When it is configured to use Fixed Length format Length must be greater than Length2 Otherwise the format will be converted to Max Min Length Format and Length
159. g Mode Scan Mode for Scanner Port 1 Extra Long 8 Aiming Mode Range Any value 0 15 other than 8 Laser Mode aiming beam disabled 266 BASIC Programming Guide For Use with CipherLab BASIC Compiler Comparison of Scan Modes Always Press old Press Release Press Barcode Timeout trigger trigger trigger trigger trigger being V f f ftestmode e 1 1 Momentarymode p 1 I vy Aimingmode Ce e 1 1 Awtootmode v e a 5 1 1 Auto Power Off mode Continuous Mode The reader is always scanning but only one decoding is allowed for the same barcode That is to read i e scan and decode the same barcode multiple times the barcode has to be taken away and replaced for new scanning Several modes have been developed based on this mode Test Mode The reader is always scanning for testing purpose Comparing to the Continuous mode it will decode repeatedly even with the same barcode without re approaching Repeat Mode This mode is most useful when the same barcode is to be read many times When the scan trigger is pressed within one second after a successful reading the same data will be re transmitted without actually reading the barcode Such re transmission can be activated as many times as needed as long as the time
160. g1 String2 6 the employee s name starts at the sixth character 42 BASIC Programming Guide For Use with CipherLab BASIC Compiler RIGHT Purpose Syntax Remarks Example TRIM_LEFT To retrieve a given number of characters from the right side of the target string A RIGHTS X N A is a string variable to be assigned to the result X may be a string variable string expression or string constant N is a numeric expression in the range of 0 to 255 If N is larger than the length of X the entire string is returned If N is zero the null string with length 0 is returned String1 11025John Thomas Accounting Manager String2 Title RIGHT String1 LEN String1 INSTR String1 String2 Purpose Syntax Remarks Example TRIM_RIGHT To return a copy of a string with leading blank spaces stripped away A TRIM_LEFT X A is a string variable to be assigned to the result X is a string variable that may contain some space characters at the beginning S1 TRIM_LEFT Hello World S1 Hello World Purpose Syntax Remarks Example To return a copy of a string with trailing blank spaces stripped away A TRIM_RIGHT X A is a string variable to be assigned to the result X is a string variable that may contain some space characters at the end S2 TRIM_RIGHT Hello World 528 Hello World Chapter 5 BASIC Commands 43 5 4
161. gramming Guide For Use with CipherLab BASIC Compiler Code 128 EAN 128 No N1 Values and Description N2 kams 0 Disable Code 128 EAN 128 CCD Laser 1 Enable Code 128 EAN 128 Italian French Pharmacode noni sennego 2 0 Disable Italian Pharmacode CCD Laser 0 Disable CIP 39 French Pharmacode CCD Laser e 0 DO NOT transmit Italian Pharmacode Check Digit CCD Laser 1 Transmit Italian Pharmacode Check Digit 27 0 DO NOT transmit CIP 39 Check Digit CCD Laser 1 Transmit CIP 39 Check Digit Transmit Check Digit If this parameter is enabled the checksum character will be included in the data being transmitted Note Share the Transmit Start Stop Character setting with Code 39 No Values and Description N2 0 Disable MSI CCD Laser 1 Enable MSI MSI Check Digit Verification CCD Laser 0 Single Modulo 10 1 Double Modulo 10 2 Modulo 11 and Modulo 10 Appendix Symbology Parameters 243 MSI Check Digit Transmission CCD Laser 0 Last Check Digit is NOT transmitted 1 Both Check Digits are transmitted 2 Both Check Digits are NOT transmitted 0 MSI 25 Code Length Limitation in Fixed Length Format CCD Laser 1 MSI 25 Code Length Limitation in Max Min Length Format ee Verify Check Digit User can select one of the three kinds of checksum calculations i e Single Modulo 10 Double Modulo 10 and Modulo 11 amp 10 to verify the MSI barcod
162. gth Limitation in Max Min Length ma Format 0 Matrix 25 Code Length Limitation in Fixed Length Format CCD Laser 1 Matrix 25 Code Length Limitation in Max Min Length Format ae Matrix 25 Min Code Length Fixed Length 2 0 MSI 25 Code Length Limitation in Fixed Length Format CCD Laser 1 MSI 25 Code Length Limitation in Max Min Length Format pee Not for portable terminals Scanner Time out Duration in seconds for Scanner Port 1 CCD Laser applicable to Aiming mode Laser mode Auto Off mode and Auto Power Off mode Not for portable terminals e 0 Disable RSS Limited CCD Laser 1 Enable RSS Limited 0 Disable RSS Expanded CCD Laser 1 Enable RSS Expanded er 0 Disable RSS 14 CCD Laser 1 Enable RSS 14 70 Scan Mode for Scanner Port 1 CCD Laser Auto Off Mode Continuous Mode Auto Power Off Mode Alternate Mode Momentary Mode Repeat Mode Laser Mode Test Mode Aiming Mode 228 BASIC Programming Guide For Use with CipherLab BASIC Compiler NOT transmit RSS 14 Code ID CCD Laser NOT transmit RSS 14 Application ID CCD Laser mit RSS 14 Application ID pee NOT transmit RSS 14 Check Digit CCD Laser mit RSS 14 Check Digit NOT transmit RSS Limited Code ID CCD Laser mit RSS Limited Code ID NOT transmit RSS Limited Application ID CCD Laser mit RSS Limited Application ID a NOT transmit RSS Limited Check Digit CCD Laser mit RSS Limited Check Digit NOT transmit
163. gth bar ranges from 0 to 5 Signal Bar RSSI Range fem 1766 em ce meet tere Jes mse The value of the PIN code will be fetched as a password required for initializing the operation Refer to the PIN PUK procedure for handling PINCode errors New PIN code re entry and PUK unblock operation are furnished Once the PIN code check is passed PINCode will be updated with appropriate value After OPEN_COM 3 is completed relevant information will be obtained such as SMServiceCenter NET and PINstatus Note The POWER key will be disabled during connection process Yet the ESC key is provided for being able to abort the PIN code check while connecting A countermeasure such as a time out check is recommended to prevent from waiting infinitely Call WRITE_COM 3 A and READ_COM 3 to transmit and receive data respectively Call CLOSE_COM 3 to terminate communication and shut down the GSM GPRS module Chapter 5 BASIC Commands 195 READ COMS data format For SMS service the data format for single messages and concatenated messages is different The short messages will be removed from the SIM card after being read out If it is necessary to save the received data data storage structure like a DAT or DBF file is recommended Message Type Single Message Concatenated Message Using 7 bit default alphabet total length lt
164. he multi language font file and Hebrew Nordic Polish Russian font files In addition to the system font the terminals support a number of font files as specified in section 2 1 2 Available font sizes depend on which font file is downloaded to the terminal lo Font Files Custom Font Size SetFont Options Single byte System font default FONT 6X8 FONT 8X16 Multi language font file FONT 6X8 FONT 8X16 Others He Nd Po Ru FONT 6X8 FONT 816 Double byte Sc Jp Kr 16X16 FONT 6X8 FONT 8X16 12 8612 Jp12 Kr12 True 12X12 FONT 6X12 FONT 12X12 Display Capability Varying by the display size and the font size of alphanumerics the display capability can be viewed by lines and characters as follows or 6 62 e 6 6 p Note For the 8500 series it can display up to 20 or 10 lines when the icon area is not available for displaying the battery icon etc i e ICON ZONE PRINT enabled Chapter 5 BASIC Commands 121 Multi language Font File This font file may include English default French Hebrew Latin Nordic Portuguese Turkish Russian Polish Slavic Slovak etc To display in any of these languages except English you need to call SET_LANGUAGE to specify the language by region Special Font Files Fonts with file name specifying Tcl2 Traditional Chinese 5612 Simplified Chinese Jp12 Japanese or Kr12
165. her applications The 8000 8300 8500 series terminals support multiple applications but only one of them is active this setting option allows different applications share the same files LER CipherLab s BASIC Compiler loj x File Edit Configure Compile Help Target Machine Primary COM Port Settings Secondary COM Port Settings Configure Transaction Files Create DBF Files Barcode Settings Sets the Master Card ID Command To Do Target Function To set the type of the target machine Machine Operation Click Configure on the menu bar and select Target Machine Then scroll through the drop down menu in the pop up window to set the target machine The selection of the target machine will affect the number of transaction files the available baud rate of the COM port Master Card Function To define the ID of the master setup card ID Operation Click Configure on the menu bar and select Master Card ID Type the new card ID in the field in the pop up window This feature is only valid for stationary terminals such as models 201 510 520 Primary COM Function To set the properties of the primary COM port Port Setting Operation Click Configure on the menu bar and select Primary COM Port Setting Select the desired settings for each property in the pop up window Secondary COM Port Setting Configure Transaction Files Create DBF
166. ical bar indicates alternative option Remarks Additional information regarding correct command usage is provided 28 BASIC Programming Guide For Use with CipherLab BASIC Compiler Example Various ways of using the statement are presented including applicable and unusual modes of operation See Also List of related commands is provided if there is any Note The types of terminals that support a specified BASIC command are listed to the right of the title bar of the command In This Chapter 5 1 General Commands ccecccccceescceeessceceesssceseesseeeees 29 5 2 Commands for Decision Structures 5559955999 33 5 3 Commands for Looping 5 0 65 9 37 5 4 Commands for String Processing 39 5 5 Commands for Event Trapping 47 5 6 System Commands 5 95 555 09555955594559955945995 9 59 5 7 Barcode Reader Commands 5555999555 99 9 68 5 8 RFID Reader Command5s cccccccecssceeeesceeeenseeees 79 5 9 Keyboard Wedge Commands 5 95 99 83 5 10 Buzzer Commands cccccccccesscsceessceceesssceseesseeeees 92 5 11 Vibrator Commands sirrini serres ieirik 94 5 12 Calendar and Timer Commands 955 0 95 5 13 LED Command eia RAE E A 98 5 14 Keypad 0 0818 058 5 595 5594 559
167. ile pointer of the IDX file will point to the first record with the matching string If there is no match the file pointer will point to the first record whose index value is greater than the vale of key ON COM 1 GOSUB HostCommand HostCommand Cmd READ_ COMS 1 Cmdldentifier LEFT Cmd 1 DBFNum VAL MID Cmd 2 1 IDXNum VAL MID Cmd 3 1 CardID RIGHT Cmd LEN Cmd 3 IF Cmdldentifier THEN IF FIND RECORD DBFNum IDXNum CardID 1 THEN PRINT Data is found in DBF DBFNum ELSE PRINT Data is not found in DBF DBFNum END IF ELSE GET_RECORD Purpose Syntax Remarks To get a record in a specified DBF file which the file pointer of a specified IDX file is pointing to A GET_RECORD file index A is a string variable to be assigned to the result file is an integer variable in the range of to 5 indicating which DBF file to be accessed 210 BASIC Programming Guide For Use with CipherLab BASIC Compiler index is an integer variable in the range of 1 to 3 indicating which IDX file to be accessed If it is not specified the default IDX file which keeps the original data sequence will be used Example ON COM 1 GOSUB BcrData_1 BerData_1 BEEP 2000 5 ID GET READER DATAS 1 IF FIND RECORD DBFNum IDXNum ID 1 THEN Data GET RECORD DBFNum IDXNum Item MID Data LEN Data IDLeng ItemLeng Note RIGHT Data LEN Data I
168. in front of a barcode type to enable the decodability of this barcode symbology For some of the supported barcode symbologies user may click the Configure button to do more configurations such as enable disable the checksum verification This appendix describes associated symbology parameters 238 BASIC Programming Guide For Use with CipherLab BASIC Compiler Scan Engine CCD or Laser Codabar No N1 Values and Description N2 7 0 Disable Codabar NW7 CCD Laser 1 Enable Codabar NW7 37 Select Codabar Start Stop Character CCD Laser 0 abcd abed 1 abcd tn e 2 ABCD ABCD 3 ABCD TN E 38 0 DO NOT transmit Codabar Start Stop Character CCD Laser 1 Transmit Codabar Start Stop Character Select Start Stop Character User can select no start stop characters or one of the four different start stop character pairs 1 6 abed abed abcd tn e ABCD ABCD and ABCD TN E to be included in the data being transmitted Transmit Start Stop Character This parameter specifies whether the start stop characters are included in the data being transmitted Code 2 of 5 Family Industrial 25 No N1 Values and Description N2 4 0 Disable Industrial 25 CCD Laser 1 Enable Industrial 25 30 0 DO NOT verify Industrial 25 Check Digit CCD Laser a 1 Verify Industrial 25 Check Digit i 31 0 DO NOT transmit Industrial 25 Check Digit CCD Laser 1 Transmit Industrial 25 Check Digit Appendix Sy
169. ing Guide For Use with CipherLab BASIC Compiler NEG N1 Indicating a negation is processed NEQ N1 N2 Indicating the decision IF N1 lt gt N2 is processed NCLOSE N Indicating the command NCLOSE is processed N is the connection number Indicating the logical operation NOT is processed N VREADS N Indicating the command NREADS is processed N is the connection number NWRITE N A Indicating the command NWRITE is processed OCTS N Indicating the command OCTS is processed OFF_ALL Indicating the command OFF ALL is processed number of the COM port OFF READER N Indicating the command OFF READER is processed N is the number of the reader port OFF_TCPIP Indicating the command OFF TCPIN is processed OFF_TIMER N Indicating the command OFF TIMER is processed N is the number of the timer OFF_ TOUCHSCREEN Indicating the command OFF TOUCHSCREEN is processed ON_COM N1 N2 Indicating the command ON COM GOSUB is called N1 is the umber of the COM port N2 is the line number of the subroutine to branch to ON_ESC N Indicating the command ON ESC GOSUB is called N is the line number of the subroutine to branch to ON_GOSUB N Indicating the command ON GOSUB is called N is the line number of the subroutine to branch to ON_GOTO N Indicating the command ON GOTO is called N is the line number of the subroutine to branch to ON_HOUR_SHARP N Indicating the command ON HOUR SHARP
170. ion Modified START TCPIP 6 READER CONFIG for 8300 with Long Range Laser scan engine New BACKLIT Modified Appendix 1 minor changes Modified 5 9 Keyboard Wedge WEDGE_READY New 5 9 3 Wedge Emulator Modified 5 20 6 Bluetooth Wedge Emulator via SPP SEND_WEDGE SET_WEDGE Company name changed to CIPHERLAB CO LTD since April 2006 New BIT_OPERATOR in section 5 1 Modified VIBRATORQ for 8300 H W version is 4 Modified Appendix I V New support Bluetooth HID on 8000 New Customize Serial Number Device ID 3 04 Nov 18 2005 New SYSTEM_INFORMATIONS Q Modified CHANGE SPEED for 711 8100 8000 8300 only Modified LED Modified FUNCTION_TOGGLEQ Modified coordinate system of LCD Modified SELECT _FONT Modified font files renamed for 8000 8300 Modified port mapping Modified SET COM_TYPEQ 7 Acoustic GSM_Modem Modified SET _COM O with Acoustic Settings for 83000Modified support 2 MB flash on 8000 8500 Modified PPP via IR default baud rate for modem cradle is 57600 Modified GSM read data format Modified String limit 255 bytes instead of 250 bytes 4 1 1 4 2 1 5 21 1 New READER _CONFIG to support 2D Extra Long Range Laser Modified CODE _TYPE Modified READER SETTING Modified LCD_CONTRAST for 8500 Modified LOCATEQ Modified RFID Modified MENUQ Remove 720 New Screenshots of Compiler s menus New Code type GTIN 8
171. ireless Module Others Reserved 8000 Battery type 8100 Battery type 8300 CCD Laser 8500 RFID module 8000 Series Device Type Meaning Oxxx No reader 1xxx CCD scan engine 2Xxx Laser scan engine x0xx No wireless module X4xx 802 11b module x5xx Bluetooth module XOxx Acoustic coupler module xx0x 2 AAA Alkaline battery xx1x Rechargeable Li ion battery 66 BASIC Programming Guide For Use with CipherLab BASIC Compiler 8100 Series Device Type Oxxx 1xxx 2Xxx x0xx X1xx X2xX xx0x Xx1x 8300 Series Meaning No reader CCD scan engine Laser scan engine No wireless module 433 MHz module 2 4 GHz module 2 AAA Alkaline battery Rechargeable Li ion battery For hardware version 4 0 when the first digit is 2 it may refer to CCD or Laser scan engine You will need to check the fourth digit 1 for CCD 0 for Laser Device Type Oxxx 1xxx 2XXX 4Xxx x0xx X1xx X2xXX X4xx X5XX X8XX xx0x Xx1x xxx0 Xxx 1 Meaning No reader CCD scan engine Not applicable to H W version 4 0 Laser scan engine CCD or Laser scan engine for H W version 4 0 Long Range Laser scan engine No wireless module 433 MHz module 2 4 GHz module 802 11b module Bluetooth module 802 11b Bluetooth No RFID RFID module None CCD scan engine for H W version 4 0 8500 Series Device Type Oxxx 1xxx 2Xxx 3888 4Xxx 5888 x0xx X3XX X4xx X5XX X7XX xx0x Xx1x Chapter 5 BASIC Commands
172. isable UPC E CCD Laser 1 Enable UPC E ee 0 Disable UPC E Addon 2 CCD Laser 1 Enable UPC E Addon 2 0 Disable UPC E Addon 5 CCD Laser 1 Enable UPC E Addon 5 0 No conversion CCD Laser 1 Convert UPC E to UPC A ee 0 DO NOT transmit UPC E System Number CCD Laser 1 Transmit UPC E System Number 0 Enable UPC EO CCD Laser 1 Enable UPC E1 UPC E0 a 0 Disable UPC E1 Triple Check CCD Laser 1 Enable UPC E1 Triple Check ee Convert UPC E to UPC A If this parameter is enabled the read UPC E barcode will be expanded into UPC A and the next processing will follow the parameters configured for UPC A 47 0 DO NOT transmit UPC E Check Digit CCD Laser 1 Transmit UPC E Check Digit Transmit Check Digit If this parameter is enabled the checksum character will be included in the data being transmitted Transmit System Number If this parameter is enabled the system number will be included in the data being transmitted UPC E1 Triple Check If this parameter is enabled the terminal will read the same UPC E1 barcode three times to make a valid reading This is helpful when the barcode is defaced and requires more attempts to read it successfully Appendix Symbology Parameters 249 Scan Engine 2D or Extra Long Range Laser Codabar 0 Disable Codabar NW7 2D Extra Long 1 Enable Codabar NW7 Range No N1 Values and Description N2 Beet 38 0 DO NOT transmit Codabar Sta
173. iter character in the range of 0 to 255 If it is negative no delimiter will be applied Example COM DELIMITER 1 13 use RETURN as delimiter COM_DELIMITER 1 10 56 Line Feed as delimiter Chapter 5 BASIC Commands 135 IRDA_STATUS 711 8000 8300 8500 Purpose To check the IrDA connection status or transmission status Syntax A IRDA STATUS N Remarks 4 15 an integer variable to be assigned to the result N is an integer variable indicating the action to take To check IrDA connection status When A 0 it means the IrDA connection is disabled When A 1 it means the IrDA connection is enabled 1 To check whether data being transmitted successfully or not A is the length of string delimiters are included Example CLS SET_COM_TYPE 2 4 set COM2 of 711 as IrDA port OPEN_COM 2 1 00 1 IF IRDA_STATUS 0 1 THEN check connection BEEP 4400 5 ELSE GOTO Loop END IF WRITE _COM 2 My Data IF IRDA_STATUS 1 7 THEN check transmission PRINT Write OK ELSE PRINT Write NG END IF CLOSE_COM 2 See Also IRDA TIMEOUT 136 BASIC Programming Guide For Use with CipherLab BASIC Compiler IRDA_TIMEOUT 711 8000 8300 8500 Purpose To set the timeout for IrDA connection Syntax IRDA_TIMEOUT N Remarks N is an integer variable in the range of 1 to 8 indicating a specified period of time Example IRDA TIMEOUT 7 set timeout to 30 seconds See Also IRDA STATU
174. ks Example See Also To get data that is read from a specified reader port A GET_READER_DATAS N Usually ON READER GOSUB is used to trap the event that data is transmitted to the terminal through the reader port and then GET READER DATAS is used in 8 subroutine to get the reader data A is a string variable to be assigned to the result N is an integer variable indicating the reader port it is 1 for portable terminals ENABLE READER 1 ON READER 1 GOSUB Ber_1 Bcr 1 Data GET_READER_DATA 1 RETURN DISABLE READER ENABLE READER OFF READER ON READER GOSUB 70 BASIC Programming Guide For Use with CipherLab BASIC Compiler READER_CONFIG 8300 8500 Purpose To enable new settings on the scan engine after calling READER _SETTING Syntax READER CONFIG Remarks For new reader settings to take effect on any of the following readers it is necessary to call this routine 2D scan engine 8500 only Long Range Laser scan engine 8300 8500 Extra Long Range Laser scan engine 8500 only Example See sample code below See Also ENABLE READER READER SETTING Chapter 5 BASIC Commands 71 enable the new settings for 2D or Long Range Laser engines enable the reader GOSUB G Reader Data Sample Code 5 SETTING 5 0 R_SETTING 132 0 R_CONFIG E RE ON READE CLS GOSUB MainScreen MainLoop END IF WAIT
175. le indicating the value of beep frequency Hz Suggested frequency for the buzzer ranges from 1 kHz to 6 kHz duration is an integer variable indicating the value of beep duration which is specified in units of 10 milliseconds Up to eight frequency duration pairs can be assigned in a beep sequence If the value of the frequency is 0 the buzzer will not sound during the time duration Example ON READER 1 GOSUB BerDATA_ 1 BerData_1 BEEP 2000 10 0 10 2000 10 RETURN See Also STOP BEEP STOP BEEP Purpose To terminate the beep sequence Syntax STOP BEEP Remarks The STOP BEEP statement terminates the beep immediately if there is a beep sequence in progress Example BEEP 2000 0 ON KEY 1 GOSUB StopBeep PRINT Press 1 to stop the buzzer StopBeep STOP BEEP RETURN Chapter 5 BASIC Commands 93 See Also BEEP 94 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 11 Vibrator Commands This section describes the command related to the vibrator This function is currently supported on the 8300 8500 series Note For the 8300 series the hardware version must be 4 VIBRATOR 8300 8500 Purpose To set the vibrator Syntax VIBRATOR mode Remarks mode is an integer variable indicating the state of the vibrator g Once the vibrator is enabled by VIBRATOR 1 the terminal will start vibrating until the vibrator is set off by VIBRATOR 0 Example VIBRATOR 1 turn on the vibrat
176. le Bluetooth devices in range Syntax A BT_INQUIRY Remarks It takes about 20 seconds to get the Bluetooth device information of whomever in range The string contains address 12 bytes and name 20 bytes of the devices Note that there might be many devices concatenated together each occupying 32 bytes Information regarding the Bluetooth devices in range will be put in the format of MENU string as shown below Device address 12 characters Device name max 19 characters 0x0d n r WqHAYTY __ _ gt 4 19 9 NULL Example See Also BT_PAIRING Purpose Syntax Remarks Example See Also Chapter 5 BASIC Commands 181 MENU STR BT_INQUIRY 1 MENU MENU STR BT_PAIRING 8061 8360 8500 To check if the discovered device can provide a specific type of service and if required the PIN code for authentication is matching A BT_PAIRING addr type A is an integer variable to be assigned to the result Pairing successfully Service unavailable or w
177. le XOFF to disable transmission Transmit When the port is opened the transmission is enabled Then every character received is examined to see if it is normal data or flow control codes If an XOFF is received transmission is halted It is resumed later when XON is received Just like the RTS CTS control up to two characters might be sent after an XOFF is received a Receive The received characters are examined to see if it is normal data which will be stored to the receive buffer or a flow control code set reset transmission flag but not stored If the receive buffer cannot take more than 5 characters an XOFF control code is sent When the receive buffer becomes enough for more than 15 characters an XON control code will be sent so that the transmission will be resumed As long as the buffer is sufficient may be between 5 to 15 characters the received data can be stored even when in XOFF state If receiving and transmitting are concurrently in operation the XON XOFF control codes might be inserted into normal transmit data string When using this method make sure that both sides feature the same control methodology otherwise dead lock might happen Note Flow control is only applicable to the direct RS 232 COM port which is usually assigned as COM 1 GET_CTS 711 8100 8300 Purpose To get CTS level on the direct RS 232 port Syntax A GET_CTS N Remarks 4 15 an integer variable to be assigned to the result
178. led 49 1 16 32 Disabled Enabled Dees CTS RTS Same options Same options 5 XON XOFF Same options Same options 4 Wedge Emulator Same options Same options SET COM I 1 1 2 1 COM1 115200 None 8 No handshake SET_COM 1 1 1 2 17 COM1 115200 None 8 No handshake Reserved Host Comma nds disabled SET_COM 1 1 1 2 33 COM1 115200 None 8 No handshake URPower 5V enabled SET_COM 1 1 1 2 49 COM1 115200 None 8 No handshake Reserved Host Commands disabled URPower 5V enabled CLOSE_COM OPEN COM READ COM SET COM TYPE WRITE COM Chapter 5 BASIC Commands 133 SET_COM_TYPE Purpose Syntax Remarks Example See Also To assign the communication type to a specified COM port SET_COM_TYPE N type N is an integer variable indicating which COM port 1 3 is to be set type is an integer variable indicating the type of interface Direct RS 232 N A Serial IR via IR transceiver Standard IrDA RF Bluetooth SPP DUN HID GSM_SMS Acoustic Coupler 8000 or GSM_Modem 8500 This function needs to be called BEFORE opening a COM port However it is not necessary for RFID Note that the COM port mapping is different for each model of terminal and a COM port may not support all the communication types SET_COM_TYPE 1 3 set COM1 of 8300 to serial IR communication CLOSE_COM OPEN_COM READ COM SET_COM WRITE_COM WRITE_COM Purpose Syntax Remarks
179. les Include BASIC source files bas initialization files ini and BASIC object files syn of the sample programs 4 BASIC Programming Guide For Use with CipherLab BASIC Compiler 2 1 2 DOWNLOAD Directory This directory contains download utilities the BASIC Run time Engines and font files Download exe The download utility to download the Motorola S format object file shx to the CipherLab terminals via RS 232 or standard IrDA port IRLoad exe The download utility to download the Motorola S format object file shx to the CipherLab terminals via Serial IR Transceiver BASIC Run time Engines BC711 shx English version System font BC8100 shx BC711 JP shx Japanese version Need to download font file BC8100 JP shx BC711 KR shx Korean version Need to download font file BC8100 KR shx BC711 RU shx Russian version Font included BC8100 RU shx BC711 SC shx Simplified Chinese Need to download font file BC8100 SC shx BC711 SD shx Simplified Chinese Need to download font file BC8100 SD shx BC711 TC shx Traditional Chinese version Need to download font file BC8100 TC shx BC8000 shx 8000 generic version Need to download font file BC8300 shx 8300 generic version Need to download font file Font files 711 8100 Series Font jp shx Japanese Font size 16x16 4 lines Font kr shx Korean Font size 16x16 4 lines Font sc shx Simplified Chinese Font size 16x16 4 lines Fon
180. ll OPEN_COM 2 to initialize the Bluetooth module and set up connection Call GET_NET_STATUS 8 to detect if connection is completed For example LOOPOO3 IF GET NET STATUS 8 0 THEN GOTO LOOPOO03 BEEP 4400 4 CLS PRINT Connect OK When there is a host device recorded in the Frequent Device List the terminal will automatically connect to it If the connection fails the terminal will try again If it fails for the second time the terminal will wait 7 seconds for another host to initiate 8 connection If still no connection 15 established the terminal will repeat the above operation Note gt DUN Chapter 5 BASIC Commands 189 When there is no device recorded in the Frequent Device List the terminal simply must wait for a host device to initiate a connection As an HID input device keyboard the terminal must wait for a host to initiate a connection Once the HID connection is established the host device will be recorded in the Frequent Device List identified as HID Connection Call WRITE_COM 2 data to transmit data Call GET_NET_STATUS 8 to detect if connection is maintained For example GET NET STATUS 8 0 THEN BEEP 3300 4 CLOSE_COM 2 END IF Call CLOSE_COM 2 to terminate communication and shut down the Bluetooth module Call SET_COM_TYPE 2 5 to set COM2 to Bluetooth communication Call SET_COM 2 5 1 1 1 t
181. ll not be accepted Transmit Check Digit This parameter specifies how the checksum is to be transmitted User can select from Last digit not transmitted Transmitted and Last 2 digits not transmitted Length Qualification Because of the weak structure of the MSI barcodes it is possible to make a short scan error To prevent the short scan error user can define the Length Qualification settings to ensure that the correct barcode is read by qualifying the allowable code length Refer to Codabar RSS Family No Values and Description N2 85 0 No conversion 2D Extra Long Convert RSS to UPC EAN Range Disable RSS Expanded 2D Extra Long Enable RSS Expanded Range 8 Disable RSS Limited 2D Extra Long Enable RSS Limited Range Disable RSS 14 2D Extra Long Range Enable RSS 14 Appendix Symbology Parameters 255 Convert RSS to UPC EAN If this parameter is enabled the RSS barcodes will be converted to UPC EAN This only applies to RSS 14 and RSS Limited barcodes not decoded as part of a Composite barcode 1 When enabled the leading 010 will be stripped from these barcodes and a 0 will be encoded as the first digit this will convert RSS barcodes to EAN 13 2 For barcodes beginning with two or more zeros but not six zeros this option will strip the leading 0010 and report the barcode as UPC A The UPC A Preamble setting that transmits the s
182. looking into the index categories of book title writer publisher ISBN number etc All these index entries are sorted in ascending order for easy lookup according to some specific information of books book title writer publisher ISBN number etc When the book is found in the index it will tell you where the book is actually stored As you can see the books kept in the library are analogous to the data records stored in the DBF file and the various index entries are just its associate IDX files Some information book title writer publisher ISBN number etc in the data records is used to create the IDX files Note 1 The length of each record in the DBF file is limited to 250 bytes 2 For portable terminals a BASIC program can have up to 5 DBF files Each DBF file can have up to 3 associated IDX files and each of them is identified by its key index number The valid key numbers are from to 3 ADD_RECORD Purpose To add a record to a specified DBF file Syntax ADD RECORD file data Remarks 7 15 an integer variable in the range of 1 to 5 indicating which DBF file to be accessed data is a string variable representing the character string which user intends to add to the specified DBF file Example See Also Chapter 5 BASIC Commands 207 ON COM 1 GOSUB HostCommand HostCommand Cmd READ COM 1 CmdlIdentifier LEFT Cmd 1 DBFNum VAL MIDS Cmd 2 1 CardID RIGHT Cmd LEN C
183. mage This string begins with the top row of pixels Each row begins with the left most pixels Each bit of the bitmap represents a single pixel of the image If the bit is set to 1 the pixel is marked and if it is 0 the pixel is unmarked The 181 pixel in each row is represented by the least significant bit of the Ist byte in each row If the image is wider than 8 pixels the 9th pixel in each row is represented by the least significant bit of the 2nd byte in each row The following is an example to show our company logo and the string variable icon is used for storing its bitmap data icon_1 chrS 0 chr 0 chrs 0 chr 0 chr 248 chr 255 chrs 7 icon_2 chr 0 chr 0 chr 0 chr 0 chr 8 chr 0 chr 4 icon _3 chrS 0 chr 0 chrs 0 chr 0 chr 254 chr 255 chrs 5 icon _4 chrS 0 0 chrs 0 chr 0 chr 254 chr 255 chrs 5 icon _5 chrS 0 0 chrs 0 chr 0 chr 254 chr 255 chrs 5 icon _6 chrS 192 chr 3 chr 0 chr 0 chr 250 chrs 255 chr 5 icon_7 chrS 96 chr 214 chr 201 chrs 59 chr 250 chr 142 chr 5 icon _8 chrS 48 chrs 80 chr 74 chr 72 122 chr 109 chrS 5 icon _9 chrS 16 chrs 80 chr 74 chr 72 chrs 122 chr 109 chrS 5 icon_10 chrS 16 chrs 208 chr 249
184. mands OFF KEY ON MINUTE_SHARP GOSUB Purpose Syntax Remarks Example See Also To activate MINUTE SHARP Event Trigger ON MINUTE_SHARP GOSUB SubName SubLabel When the system time is on the minute a specific subroutine will be executed SubName SubLabel is the name or line label of a subroutine ON MINUTE_SHARP GOSUB CheckTime CheckTime CurrentTime TIME Hour VAL MID CurrentTime 3 2 IF Hour 30 THEN GOSUB HalfHourAlarm RETURN HalfHourAlarm BEEP 800 30 WAIT 100 RETURN Calendar amp Timer commands OFF MINUTE SHARP ON POWER_ON GOSUB Purpose Syntax Remarks Example To activate POWER Event Trigger ON POWER_ON GOSUB SubName SubLabel When the POWER key is pressed again after powering off the terminal a specific subroutine will be executed SubName SubLabel is the name or line label of a subroutine ON POWER_ON GOSUB RESUME ON MATINI Chapter 5 BASIC Commands 55 ON POWER_ON GOSUB RESUME _ON MAINI LOCATE 8 1 PWR_INDEX1 amp PWR_INDEX amp PRINT POWER ON PWR_INDEX1 amp MAIN2 IF PWR_INDEX amp gt PWR_INDEX1 amp THEN GOTO MAIN1 END IF GOTO MAIN2 RESUME ON PWR_INDEX amp PWR_INDEX amp 1 WAIT 100 RETURN See Also ON READER GOSUB Purpose To activate READER Event Trigger Syntax ON READER N GOSUB SubName SubLabel Remarks When data is received from the reader port a specific subroutine will be executed N 15 an int
185. mands 173 NCLOSE NWRITE TCP_ERR_ CODE TCP_OPEN SOCKET_HAS_DATA 8000 8300 8500 Purpose Syntax Remarks Example See Also To check if data is available A SOCKET HAS DATA NV A is an integer variable to be assigned to the result Normal data in buffer Invalid connection number Connection is closed No data Never run START TCPIP N is an integer variable in the range of 0 to 3 indicating the connection number A SOCKET HAS DATA 0 NCLOSE NREAD OFF TCPIP ON TCPIP GOSUB TCP_ERR_CODE TCP_OPEN SOCKET_IP 8000 8300 8500 Purpose Syntax Remarks Example See Also To get network settings A SOCKET _IP port This command is to be replaced by GET_NET_PARAMETER NetSetting SOCKET_IP 0 GET_NET PARAMETERS TCP_ERR_ CODE SOCKET_OPEN 8000 8300 8500 Purpose Syntax Remarks To check if the remote end of connection is open A SOCKET_OPEN N A is an integer variable to be assigned to the result Normal connection is open Invalid connection number Connection is closed 174 BASIC Programming Guide For Use with CipherLab BASIC Compiler Example See Also 3012 Never run START TCPIP N is an integer variable in the range of 0 to 3 indicating the connection number ConnectState SOCKET_OPEN 0 TCP_ERR CODE TCP_OPEN TCP_ERR_CODE 8000 8300 8500 Purpose Syntax Remarks To check the result after running any command related to T
186. mbology Parameters 239 Select Industrial 25 Start Stop Pattern CCD Laser 0 Use Industrial 25 Start Stop Pattern 1 Use Interleaved 25 Start Stop Pattern 2 Use Matrix 25 Start Stop Pattern 0 Industrial 25 Code Length Limitation in Fixed Length Format CCD Laser 1 Industrial 25 Code Length Limitation in Max Min Length Format o 86 6 Verify Check Digit If this parameter is enabled the terminal will perform checksum verification when decoding barcodes If the checksum is incorrect the barcode will not be accepted Transmit Check Digit If this parameter is enabled the checksum character will be included in the data being transmitted Select Start Stop Pattern This parameter provides the readability of all 2 of 5 symbology variants For example flight tickets actually use an Industrial 2 of 5 barcode but with Interleaved 2 of 5 start stop In order to read this barcode the start stop selection parameter of Industrial 2 of 5 should be set to Interleaved 25 Length Qualification Because of the weak structure of the 2 of 5 barcodes it is possible to make a short scan error To prevent the short scan error user can define the Length Qualification settings to ensure that the correct barcode is read by qualifying the allowable code length The barcode can be qualified by Fixed Length or Max Min Length If Fixed Length is selected up to 2 fixed lengths can be
187. md 2 IF Cmdldentifier THEN ADD_RECORD DBFNum CardID ELSE DEL _ RECORD DEL_RECORD Purpose Syntax Remarks Example To delete the record pointed by the file pointer in a specified DBF file DEL_RECORD file index file is an integer variable in the range of to 5 indicating which DBF file to be accessed index is an integer variable in the range of 1 to 3 indicating which IDX file to be accessed If it is not specified then the default IDX file which keeps the original data sequence will be used For example if DBF contains four records 011 231 120 117 043 010 067 150 The key index of the first associate IDX file is defined as starting at position 1 with length of 3 and the key index of the second associate IDX file is defined as starting at position 5 with length of 3 All the file pointers of the DBF file and IDX files are currently pointing to the last record IDX 2 011 231 011 231 043 010 120 117 043 010 043 010 067 150 067 150 gt 067 150 120 117 gt 1011 231 Then DEL_RECORD 1 will delete 067 150 DEL_RECORD 1 1 will delete 120 117 DEL_RECORD 1 2 will delete 011 231 ON COM 1 GOSUB HostCommand 120 117 HostCommand Cmd READ _COMS 1 208 BASIC Programming Guide For Use with CipherLab BASIC Compiler Cmdldentifier LEFT Cmd 1 DBFNum VAL MID Cmd 2 1 IDXNum VAL MID Cmd 3 1 CardID RIGHT Cmd LEN Cmd 3 IF Cmdldentifier
188. me Graphics A monochrome graphic has three factors Video Display Mode SET_VIDEO_MODE mode mode Pixel State CIRCLE a DOT_REVERSE LINE DOT_CLEAR PUT_PIXEL DOT_MARK RECTANGLE Shape State ae _NORMAL ae FILL Pixel State DOT_MARK DOT_CLEAR DOT_REVERSE Shape State gt 1 ini CIRCLE 8500 Purpose Syntax Remarks To draw a circle on the LCD CIRCLE cx cy r type mode cx cy are integer variables indicating the x y coordinates of the center of a circle 7 is an integer variable indicating the radius of a circle in pixels type is an integer variable indicating the type of a circle typ SHAPE NORMAL hollow SHAPE FILL solid 116 BASIC Programming Guide For Use with CipherLab BASIC Compiler mode is an integer variable indicating the state of a pixel DOT_REVERSE DOT_CLEAR DOT_ MARK Example CIRCLE 80 120 8 1 1 draw a solid circle centered at 8 120 with radius of 8 pixels See Also CLS LINE PUT PIXEL RECTANGLE LINE 8500 Purpose To draw a line on the LCD Syntax LINE x1 y1 x2 y2 mode Remarks xJ y1 are integer variables indicating the x y coordinates of where a line Starts x2 y2 are integer variables indicating the x y coordinates of where a line ends mode is an integer variable indicating the state of a pixel DOT_REVERSE DOT_CLEAR DOT MARK Example LINE
189. me for PC to process keyboard input For example to set the inter character delay to be 10 millisecond the third element of the WedgeSetting can be defined as follows Wedge_3 CHR 10 Chapter 5 BASIC Commands 87 5 9 2 Composition of Output String The keyboard wedge character mapping 15 shown below Each character in the output string is translated by this table when the command SEND_WEDGE transmits data Note 1 Dly Delay 100 millisecond 2 Digits of numeric keypad 3 CR Enter key on the numeric keypad The command SEND_WEDGE not only can transmit simple characters as above but also provides a way to transmit combination key status or even direct scan codes This is done by inserting some special command codes in the output string A command code is a character whose value is between 0xCO and OxFF 0xCO Indicates that the next character is to be treated as scan code Transmit it as it is no translation required 0 0 0x01 Send next character with Shift key OxCO 0x02 Send next character with Left Ctrl key 88 BASIC Programming Guide For Use with CipherLab BASIC Compiler 0 0 0 0 0 0 0 0 0x04 0x08 0810 0x20 Send next character with Left Alt key Send next character with Right Ctrl key Send next character with Right Alt key Clear all combination status key after sending the next character For example to send A Ctrl In
190. mmand Unknown NAK lt CR gt 286 BASIC Programming Guide For Use with CipherLab BASIC Compiler Index AT 151 BC 152 6288 152 CH 152 DT 152 ER 153 GP 153 153 ID 154 ME 154 PW 155 QT 155 SP 155 TM 156 TO 156 UP 157 ABS 29 00 RECORD 206 ALPHA LOCK 102 ASC 43 59 5 BACK_LIGHT_DURATION 105 BACKLIT 105 BACKUP_BATTERY 127 BEEP 92 BIT_OPERATOR 29 BT_INQUIRY 180 8 PAIRING 181 Cc CHANGE_SPEED 59 CHECK_RF_BASE 147 CHECK_RF_SEND 147 CHR 43 CIRCLE 117 CLEAR 219 CLOSE_COM 130 287 CLR_KBD 99 CLR_RECT 113 18 113 CODE_TYPE 76 COM_DELIMITER 134 CURSOR 108 CURSOR_X 108 CURSOR_Y 108 D DATE 95 DAY_OF_WEEK 96 DEL_RECORD 207 DEL_TRANSACTION_DATA 199 DEL_TRANSACTION_ DATA 200 DEVICE_ID 60 DIM 29 DISABLE READER 68 DISABLE_TOUCHSCREEN 124 DNS_RESOLVER 170 EMPTY_FILE 208 EMPTY_TRANSACTION 200 EMPTY_TRANSACTION_EX 201 ENABLE READER 69 ENABLE_TOUCHSCREEN 124 EXIT 37 F FILL_RECT 110 FIND_RECORD 208 FLASH_READ 214 FLASH_WRITE 215 FOR NEXT 37 FREE_MEMORY 216 FUNCTION_TOGGLE 104 G GET_ALPHA_LOCK 102 GET_CTS 5137 GET_FILE_ERROR 213 GET_IMAGE 115 268 Index GET_LANGUAGE 60 GET PARAMETERS 164 168 GET_READER_DATA 69 GET
191. module 802 11b Bluetooth or GSM GPRS and networking protocol stack The wireless modules will not be powered until START TCPIP is called All Model No START TCPIP N START TCPIP 4 Remarks Enables PPP connection via IR Modem Cradle START TCPIP 6 Enables Ethernet connection via IR Ethernet Cradle 8061 START TCPIP Enables Bluetooth PAN START TCPIP 3 Enables mobile s GPRS functionality via Bluetooth DUN 8071 START TCPIP Enables 802 11b WLAN 8330 START TCPIP START TCPIP 0 Enables 802 11b WLAN START TCPIP 1 Enables Bluetooth PAN START TCPIP 3 Enables mobile s GPRS functionality via Bluetooth DUN START TCPIP 5 Enables PPP connection via direct RS 232 to a generic modem 8360 START TCPIP Enables Bluetooth PAN START TCPIP 3 Enables mobile s GPRS functionality via Bluetooth DUN START TCPIP 5 Enables PPP connection via direct RS 232 to a generic modem 8370 START TCPIP Enables 802 11b WLAN START TCPIP 5 Enables PPP connection via direct RS 232 to a generic modem 8500 START TCPIP START TCPIP 0 Enables 802 11b WLAN START TCPIP 1 Enables Bluetooth PAN START TCPIP 2 Enables GPRS START TCPIP 3 Enables mobile s GPRS functionality via Bluetooth DUN When an application program needs to stop using the network STOP
192. mory can only be erased on a bank basis that is all the records stored in 03 60000 OxF6FFFF will be gone FLASH_READ Purpose To read a data string from the memory bank 0xF60000 OxF6FFFF Syntax A FLASH READ N Remarks A is a string variable to be assigned to the result N is an integer variable in the range of to 256 indicating the ordinal number of the record Example A FLASH READ 3 read the 3rd record See Also FLASH WRITE Chapter 5 BASIC Commands 215 FLASH_WRITE Purpose Syntax Remarks Example See Also To write a data string to the memory bank 0xF60000 OxF6FFFF A FLASH_WRITE N A Up to 256 records can be saved 4 is an integer variable to be assigned to the result Write flash memory successfully The BASIC program is too large no free flash memory available Error command for erasing the flash memory The given index is out of the range Fail to write probably flash memory is not erased yet or something goes wrong N is an integer variable in the range of to 256 indicating the ordinal number of the record A is a string variable representing the data string to be saved Before writing data to any used record it is necessary to use the following command to erase the memory bank first err FLASH_WRITE 0 ERASE Note that the record number must be 0 and the string must be ERASE After erasing the whole memory bank you can then write data to
193. n Such information can be checked in the System Menu gt Information gt S N PRINT S N DEVICE_ID 8000 8300 8500 4 is an integer variable to be assigned to the result Big 5 16x16 dots GB code 12x16 dots GB code 16x16 dots GB code 12x12 dots 12x12 dots MS DOS Code page 437 MS DOS Code page 863 MS DOS Code page 862 MS DOS Code page 850 MS DOS Code page 865 MS DOS Code page 860 Windows Code page 1251 Example See Also Chapter 5 BASIC Commands 61 Latin II Slavic MS DOS Code page 852 Central European Latin II Polish Windows Code page 1250 Turkish MS DOS Code page 857 Latin II Slovak Windows 1250 ISO 28592 Latin 2 IBM LATIN II Greek MS DOS Code page 737 Latin I Windows Code page 1252 Greek Windows Code page 1253 language GET LANGUAGE SET_LANGUAGE GET_TARGET_MACHINE Purpose Syntax Remarks Example To get the model number of the target terminal 45 GET_TARGET MACHINE A is a string variable to be assigned to the result That is a string of the terminal s model number will be returned A GET_TARGET MACHINE IF A 711 THEN ELSE IF A 8000 THEN ELSE IF A 8300 THEN END IF w Purpose Syntax Remarks To create a menu A MENU Item A is an integer variable to be assigned to the result It is the ordinal number of the menu item that user has selected If the ESC key is pressed to cancel the operation it will return 0
194. n be used to activate the GPRS functionality on a mobile phone Human Interface Device Profile HID allows a terminal to work as an input device i e keyboard for a host computer Personal Area Networking Profile PAN makes use of Bluetooth Network Encapsulation Protocol BNEP for IP networking over Bluetooth Access points AP are required Use the same commands as for 802 11b TCP IP networking Bluetooth Specification Frequency Range Data Rate Connected Devices Profiles Coverage Max Output Power Spread Spectrum Modulation Standard 2 4 2 5 GHz 433 kbps 1 for DUN mode Up to 7 for SPP or PAN mode AP required SPP DUN HID PAN Class 1 250 meters line of sight 8061 8360 Class 2 10 meters line of sight 8330 8500 100 mW Class 1 10 mW Class 2 FHSS GFSK Bluetooth version 1 1 All specifications are subject to change without prior notice 161 162 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 21 2 Network Configuration Before bringing up initializing the network some related parameters must be configured These parameters are kept by the system during normal operations and power on off cycles The parameters can be accessed through the System Menu or an application program via GET_NET_PARAMETER SET_NET_PARAMETER Note The parameters will be set back to the default values when updating kernel GET_NET SET_NET ARAMETER PARAMETER P 0
195. n the display of the terminal 8 BASIC Programming Guide For Use with CipherLab BASIC Compiler 2 4 2 Edit and Compile the BASIC Program The BASIC Compiler bc exe comes with a text editor where users can edit their BASIC programs Please refer to the next chapter for general information of the operation By default the text being edited with the editor would be saved as a BASIC source file bas The system settings defined in the Configuration Menu including Target Machine COM port settings transaction file settings DBF settings and barcode settings would be saved as a system initialization file ini with the same name when the bas file is saved The ini file should be treated as part of the BASIC program and should be included when the BASIC program is distributed If the BASIC program compiles without any errors a BASIC object file syn with the same name is generated The ini file and the syn file are the two files to be downloaded to the terminal The file contains the system settings while the syn file contains the BASIC object code 2 4 3 Download the BASIC Object Files Use the BASIC Compiler or the standalone BASIC download utility Synload exe to download a compiled BASIC program Synload exe provides only the download function of the BASIC Compiler that is it cannot be used to view or edit any BASIC code Both the ini and syn files must be downloaded to the target terminal Be careful that if the i
196. nce Click Configure on the menu bar and select Barcode Setting In the pop up window check the box to enable the decodability of the target terminal for a particular barcode symbology For the description of each barcode setting please refer to Appendix I Note When exiting the BASIC Compiler or opening another file if the current file has not been changed but the barcode settings have been changed user will be asked whether to save the current file or not 16 BASIC Programming Guide For Use with CipherLab BASIC Compiler 3 4 Compile Menu Three commands are provided on this menu lolx File Edit Configure Compile Help Download Performs the syntax checking for the BASIC program Command To Do Function Syntax checking Operation Compile Function Operation To check the syntax of the BASIC program Click Compile on the menu bar and select Syntax checking In the case of any syntax error in the BASIC program the Output window pops up to show the line numbers and display the relevant syntax error message To compile the BASIC program Click Compile on the menu bar and select Compile For the same function click the Compile icon on the tool bar In the case of any syntax or compiling error the Output window pops up to display the error messages If the compilation is successfully done the message Build successfully do you want to download the program
197. nd cannot be executed while the GSM GPRS module is running If the PIN code lock is already enabled or disabled one further enabling or disabling execution does not take effect For an unlocking process the correct PIN code is required Otherwise the execution will fail and the remaining attempt counter of PIN will be decremented by 1 For a locking process the old PIN code used before unlocking is required Otherwise the execution will fail and the counter will be decremented by 1 4 is an integer variable assigned to the result PINCODE PASSED INVALID _PINCODE MODULE RUNNING HARDWARE ERR PINALREADY LOCKED PINALREADY UNLOCKED CONNECT_ TIMEOUT pen Disable Enable Example GSM SET PINLOCK PINIS 1 to lock the PIN code See Also GSM CHANGE PIN GSM CHECK PIN Chapter 5 BASIC Commands 193 GPRS Example Note To establish a connection to the content server connected to the internet follow the same programming flow of WLAN 802 11b Example Only client initiated connection is supported Before calling START TCPIP 2 the following parameters of DUN GPRS must be specified GSM _ PIN CODE 9 PIN Code for GSM GPRS 62 GPRS 21 Name of Access Point for GPRS A client initiated connection occurs when the connection is established in response to a request from the client GSM Example Data services of GSM including SMS Short Message Service and data call are provided for receiving and sen
198. ngle in pixels FILL_RECT 1 1 20 20 CLR_RECT ICON_ZONE_PRINT Purpose Syntax Remarks To enable or disable the printing of characters in the icon area ICON_ZONE _PRINT status status an integer variable indicating the printing status of the icon area status 0 The printing in the icon area is disabled default 1 The printing in the icon area is enabled The icon zone refers to an area on the LCD that is reserved for showing status icon such as the battery icon alpha icon etc By default the icon zone cannot show characters and is accessed by graphic commands only Display of 128x64 dots The icon zone occupies the right most 8x64 dots When ICON_ZONE PRINT is enabled the display can show up to 8 lines 21 characters for 6x8 font or 4 lines 16 characters for 8x16 font Display of 100x64 dots The icon zone occupies the right most 4x64 dots Yet 4 pixels width cannot hold one character Therefore even when ICON_ZONE PRINT is enabled the display remains to show up to 8 lines 16 characters for 6x8 font or 4 lines 12 characters for 8x16 font Display of 160x160 dots The icon zone occupies the bottom line which may be 160x8 for 6x8 font or 160x16 for 8x16 font When ICON _ZONE PRINT is enabled the display can show up to 19 lines 26 characters for 6x8 font or 9 lines 20 characters for 8x16 font Example See Also Chapter 5 BASIC Commands 111 For any of the above displ
199. ni file is missing the BASIC Compiler will download the default settings instead In this case it may cause errors during execution In contrast to the BASIC Compiler Synload exe will not process the downloading if the ini file is missing and an error message will be shown on the display After the BASIC object file is downloaded the target terminal will reboot itself to execute the BASIC program If any run time error occurs an error message will be shown on the display Please refer to Appendix II for a list of run time errors If the program is not running as desired modify the BASIC source code and download it to the target terminal again CHAPTER 3 Using CipherLab BASIC Compiler The CipherLab BASIC Compiler looks like a traditional Windows environment application that supports file management text editing and some other functions to simplify the BASIC program development There are five menus on the menu bar and each menu provides several commands items File Menu Edit Menu Configure Menu Compile Menu Help Menu This chapter discusses the function and operation of each command item In This Chapter 3 E SEAN Ea E E A 10 32 Edit Ment ineen ei aren eTa 12 3 3 Configure Menuism rerun 14 3 4 Compile Menu enire aeien aso a 16 3 5 Help Men iaaiiai a a 18 10 BASIC Programming Guide For Use with CipherLab BASIC Compiler 3 1 File Menu Six commands
200. nt following the NEXT statement The Statement block will be executed again otherwise 38 BASIC Programming Guide For Use with CipherLab BASIC Compiler Example DataCount TRANSACTION COUNT FOR Counter 1 TO DataCount Data GET_TRANSACTION DATA Counter WRITE _COM 1 Data NEXT WHILE WEND Purpose To repeat the execution of a block of statements while a certain condition is TRUE Syntax WHILE condition Statement Block WEND Remarks Ifthe condition is true loop statements are executed until the WEND statement is encountered Then the program execution returns to the WHILE statement and checks the condition again If it is still true the process will be repeated Otherwise the execution continues with the statement following the WEND statement Example WHILE TRANSACTION COUNT gt 0 Data GET_TRANSACTION_DATAS 1 WRITE_COM 1 Data DEL_TRANSACTION_DATA 1 WEND Chapter 5 BASIC Commands 39 5 4 Commands for String Processing This section describes BASIC commands used to manipulate sequences of ASCII characters known as strings In CipherLab BASIC strings are always variable length from null to a maximum of 250 5 4 1 Combining Strings Two strings can be combined with the plus operator The string following the plus operator is appended to the string preceding the plus operator For example Data DATES TIMES EmployeeIDS SAVE_TRANSACTION Data 5 4 2 Comparing Strings
201. ny more Termination of Networking Protocol Stack amp Wireless Module When the application program wishes to stop using the network call STOP TCPIP to terminate networking and shut down the power to the module so that it can save power To enable the network again it is necessary to call START TCPIP again After calling STOP TCPIP any previous network connection and data will be lost 180 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 21 6 Bluetooth For the 8x60 series it makes use of the pairing procedure to keep record of the latest connected device s for different modes regardless of authentication enabled or not This is so called Frequent Device List Coverage of Frequent Device List PAN mode Up to eight access points are listed for roaming purpose SPP mode Only one device is listed for quick connection DUN mode Only one device is listed for quick connection Only one device is listed for quick connection Once the pairing procedure is completed and the list is generated successfully next time the terminal will automatically connect to the listed device s without going through the pairing procedure To complete the pairing procedure it consists of two steps 1 to discover the Bluetooth devices in range and 2 to page one of them that provides a particular service These are handled by BT INQUIRY and BT PAIRING respectively BT_INQUIRY 8061 8360 8500 Purpose To discover any availab
202. o initialize Bluetooth DUN Call OPEN_COM 2 to initialize the Bluetooth module and set up connection Call GET_NET_STATUS 8 to detect if connection is completed For example LOOPOO3 IF GET NET STATUS 8 0 THEN GOTO LOOPOO03 BEEP 4400 4 CLS PRINT Connect OK Call WRITE_COM 2 and READ_COMS 2 to transmit and receive data respectively Call GET_NET_STATUS 8 to detect if connection is maintained For example GET NET STATUS 8 0 THEN BEEP 3300 4 CLOSE_COM 2 END IF Call CLOSE_COM 2 to terminate communication and shut down the Bluetooth module 190 BASIC Programming Guide For Use with CipherLab BASIC Compiler gt PAN Follow the same programming flow of WLAN 802 11b Example Note Only one wireless network interface can be used at a time 802 11b or PAN gt DUN GPRS To activate the GPRS functionality on a mobile phone via the built in Bluetooth dial up networking technology follow the same programming flow of WLAN 802 11b Example Before calling START TCPIP 3 the following parameters of DUN GPRS must be specified BT_GPRS_APNAME 20 Name of Access Point for DUN GPRS Chapter 5 BASIC Commands 191 9 21 7 GSM GPRS This section describes the BASIC functions and statements related to GSM GPRS Currently these commands are for the use of the 8500 series GSM_CHANGE_PIN 8500 Purpose To change the P
203. ogy Parameters 253 No N1 Values and Description N2 0 Disable Code 128 2D Extra Long 1 Enable Code 128 Range ISBT 128 ISBT 128 is a variant of Code 128 used in the blood bank industry No N1 Values and Description N2 0 Disable ISBT 128 2D Extra Long 1 Enable ISBT 128 Range UCC EAN 128 No N1 Values and Description N2 4 8 101 0 Disable UCC EAN 128 2D Extra Long 1 Enable UCC EAN 128 Range No Values and Description N2 E 0 Disable MSI 2D Extra Long 1 Enable MSI ige MSI Check Digit Verification 2D Extra Long 0 Single Modulo 10 Range 1 Double Modulo 10 2 Modulo 11 and Modulo 10 254 BASIC Programming Guide For Use with CipherLab BASIC Compiler MSI Check Digit Transmission 2D Extra Long 0 Last Check Digit is NOT transmitted 1 Both Check Digits are transmitted 2 Both Check Digits are NOT transmitted 0 MSI 25 Code Length Limitation in Fixed Length Format 2D Extra Long Range 1 MSI 25 Code Length Limitation in Max Min Length Format Range MSI Max Code Length Fixed Length 1 2D Extra Long Range MSI Min Code Length Fixed Length 2 2D Extra Long Range Length must be greater than Length2 Verify Check Digit User can select one of the three kinds of checksum calculations i e Single Modulo 10 Double Modulo 10 and Modulo 11 amp 10 to verify the MSI barcodes If the checksum character s is incorrect the barcode wi
204. oint Configuration of No Addon Addon 2 amp 5 for Any Range Member of UPC EAN Families DO NOT verify Interleaved 25 Check Digit 2D Extra Long Verify Interleaved 25 USS Check Digit Renee Verify Interleaved 25 OPCC Check Digit Disable UPC A System Number amp Country Code 2D Extra Long Enable UPC A System Number amp Country Code Range Disable UPC E0 System Number amp Country Code 2D Extra Long Enable UPC E0O System Number amp Country Code Range 236 BASIC Programming Guide For Use with CipherLab BASIC Compiler 0 Disable UPC E1 System Number amp Country Code 2D Extra Long 1 Enable UPC E1 System Number amp Country Code Range 0 No conversion 2D Extra Long 1 Convert Interleaved 25 to EAN 13 Range Scanner time out duration in seconds for Aiming mode Extra Long 0 No time out Range 1 255 sec Aiming time out Macro PDF Transmit Decode Mode 0 Passthrough all symbols 1 Buffer all symbols Transmit Macro PDF when complete 2 Transmit any symbol in set No particular order 0 Disable Macro PDF Escape Characters 1 Enable Macro PDF Escape Characters 237 APPENDIX II Symbology Parameters The CipherLab data terminals support the decodability of a number of barcode symbologies The BASIC Compiler provides a menu driven interface to configure the decodability of these barcode symbologies as well as the scanner behavior The Barcode Setting window lets user check the box
205. on 11 Digits are at upper position Wedge 25 00 Normal 10 Capital lock keyboard 11 Shift lock keyboard 64 BASIC Programming Guide For Use with CipherLab BASIC Compiler Wedge 2 1 Use numeric keypad to transmit digits 0 Use alpha numeric key to transmit digits Wedge 3 Inter character delay 1st Element KBD Terminal Type The first element determines which type of keyboard wedge is applied The possible value is listed as follows ee e paro der peo O e p or C a Cid 5 2 1 For example the terminal type is PCAT US then the first element of the WedgeSetting can be defined as follows Wedge 15 5 1 Chapter 5 BASIC Commands 85 2nd Element Capital Lock Auto Detection When Capital Lock Auto Detection is enabled the command SEND_WEDGE can automatically detect the capital lock status of keyboard when the keyboard type selected is PCAT all available languages PS2 30 PS55 or Memorex Telex If this is the case SEND_WEDGE will ignore the capital lock status setting and perform auto detection when transmitting data When Capital Lock Auto Detection is disabled SEND_WEDGE will transmit alphabets according to the setting of the capital lock status If the keyboard type selected is not one among PCAT PS2 30 PS55 and Memorex Telex SEND_WEDGE will transmit the alphabets according to the s
206. one of the events happens 1 A barcode is read 2 The preset timeout expires Auto Power Off Mode The reader will start to scan once the scan trigger is pressed The scanning continues until one of the events happens 1 The preset timeout expires Comparing to the Auto Off mode the reader continues to scan whenever there is a successful reading of barcode because its timeout period re counts 268 BASIC Programming Guide For Use with CipherLab BASIC Compiler Read Redundancy This parameter is used to specify the level of reading security User has to compromise between reading security and decoding speed No Values and Description N2 1 0 No Read Redundancy for Scanner Port 1 CCD Laser 1 One Time Read Redundancy for Scanner Port 1 2 Two Times Read Redundancy for Scanner Port 1 3 Three Times Read Redundancy for Scanner Port 1 No Redundancy If No Redundancy is selected one successfully decoded barcode will make the reading valid and induce the READER Event One Two Three Times If Three Times is selected it will take a total of four consecutive successful decodings of the same barcode to make the reading valid The higher the reading security is that is the more redundancy user selects the slower the reading speed gets Appendix Scanner Parameters 269 Time Out These parameters are used to limit the maximum scanning time interval for a specific scan mode The
207. onnection state Connected WLAN Signal signal strength level 30 to 60 WLAN Noise 1 Weak noise Level Moderate Strong 5 WLAN Channel 1 11 current channel no WLAN _TxRate transmit rate 168 BASIC Programming Guide For Use with CipherLab BASIC Compiler NET IPReady 7 terminal IP status BT State 0 Disabled connection state 1 Connected i RSSI signal level Moderate GET_NET_ STATUS Configuration Item Return Value GSM state 0 Disabled v v connection state 1 Connected 11 GSM_RSSIQuality 0 113 dbm or less RSSI signal level 111 dbm 109 dbm 2 dbm per increment 53 dbm 51 dbm or greater Not known or not detectable GSM_PINstate Disabled PIN code status PIN code required Note If GET_NET STATUS 7 returns 1 it means an abnormal break occurs during PPP DUN GPRS or GPRS connection Such disconnection may be caused by the terminal being out of range improperly turned off etc GET_NET_STATUS 8000 8300 8500 Purpose To get network status Syntax A GET NET STATUS index 1 Remarks Note that it is necessary to define the DNS server IP before running this command 4 is an integer variable to be assigned to the result index is an integer variable indicating a specific configuration item by index number Example nQuality GET NET STATUS 2 check communication quality See Also GET WLAN STATUS TCP_ERR CODE Chapter 5 BASIC Commands 169 GET_WLAN_STATUS 8000 8300
208. or Chapter 5 BASIC Commands 95 5 12 Calendar and Timer Commands This section describes the commands related to the calendar and timer The system date and time are maintained by the calendar chip and they can be retrieved from or set to the calendar chip by the commands DATE and TIME A backup rechargeable battery keeps the calendar chip running even when the power is turned off Commands for triggering the HOUR SHARP event the MINUTE SHARP event and the TIMER event OFF HOUR_SHARP OFF MINUTE_SHARP OFF TIMER ON HOUR_SHARP GOSUB ON MINUTE_SHARP GOSUB and ON TIMER GOSUB Up to five timers can be set by the command ON TIMER GOSUB for the TIMER Event Trigger Note The system time variable TIMER is maintained by CPU timers and has nothing to do with this calendar chip Accuracy of this time variable depends on the CPU clock and is not suitable for precise time manipulation Besides it is reset to 0 upon powering up as a cold start DATE Purpose 10 set or to get the current date Syntax DATE X Y DATE Remarks DATE X to set the current date X is a string variable in the form of yyyymmdd Y DATES to get the current date in the form of yyyymmdd Y is a string variable to be assigned to the result Note that the BASIC Compiler and its Run time Engines do not check the format and contents of the string to be assigned to DATES User is obliged to check the format and contents Exam
209. period of time Syntax SEARCH RF CHANNEL N Remarks N is an integer variable indicating a specified period of time in units of 1 second Example SEARCH RF CHANNEL 10 See Also CHECK BASE SET CHANNEL SET RF TIMEOUT SET_RF_CHANNEL 8110 8310 8150 8350 Purpose To set the channel of the terminal Syntax SET_RF CHANNEL N Remarks N is an integer variable indicating the specified channel for the terminal 1 4 Channels available for 433 MHz 1 6 Channels available for 2 4 GHz Example SET RF CHANNEL 1 See Also GET RF CHANNEL SEARCH RF CHANNEL SET_RF_ID 8110 8310 8150 8350 Purpose To set the terminal ID Syntax SET_RF ID N Remarks N is an integer variable indicating the ID of the terminal 1 45 IDs available for 433 MHz 1 99 IDs available for 2 4 GHz Example SET ID 1 See Also GET RF ID SET_RF_POWER 8110 8310 8150 8350 Purpose To set the RF output power applicable to 433 MHz only Syntax SET RF POWER N 150 BASIC Programming Guide For Use with CipherLab BASIC Compiler Remarks N is an integer variable indicating the power level of the terminal Example SET RF POWER 2 See Also GET RF POWER SET_RF_TIMEOUT 8110 8310 8150 8350 Purpose To set a period of time for attempting to send data Syntax SET RF TIMEOUT N Remarks N is an integer variable indicating a specified period of time in units of 1 second If set to 0 it will be determined by
210. ple DATES 20000103 set the system date to 2000 01 03 Today DATE assign the current date to Today PRINT Today Today 20000103 See Also DAY OF WEEK TIMES 96 BASIC Programming Guide For Use with CipherLab BASIC Compiler DAY_OF_WEEK Purpose Syntax Remarks Example See Also To get the day of the week A DAY OF WEEK 4 is an integer variable to be assigned to the result A value of 1 to 7 represents Monday to Sunday respectively ON DAY_OF_ WEEK GOSUB 100 200 300 400 500 600 700 100 PRINT Today is Monday RETURN 200 PRINT Today is Tuesday RETURN 300 PRINT Today is Wednesday RETURN DATE TIME Purpose Syntax Remarks Example See Also To set or to get the current time TIMES X Y TIME TIME X to set the current time X is a string variable in the form of hhmmss Y TIMES to get the current time in the form of hhmmss Y is a string variable to be assigned to the result The BASIC Compiler and its Run time Engines do not check the format and contents of the string to be assigned to TIMES User is obliged to check the format and contents TIME 112500 set the system time to 11 25 00 CurrentTime TIME assign the current to CurrentTime PRINT CurrentTime CurrentTime 112500 DATE DAY OF WEEK Chapter 5 BASIC Commands 97 TIMER Purpose Syntax Remarks Example See Also To return the number of seconds
211. pose To define a signature capture area Syntax SET_SIGNAREA UppLeft_x UppLeft_y LowRight_x LowRight_y Remarks Once the signature capture area is defined user may use the stylus to freely write or draw on the touch screen Note that signature capture is only valid when the writing doesn t exceed the specified area UppLeft_x and UppLeft_y are integer variables indicating the x y coordinates of the upper left point of an area LowRight_x and LowRight_y are integer variables indicating the x y coordinates of the lower right point of an area Example SET SIGNAREA 8 8 150 100 See Also DISABLE TOUCHSCREEN ENABLE TOUCHSCREEN GET_SCREENITEM SET SCREENITEMS GET IMAGE Chapter 5 BASIC Commands 127 5 17 Battery Commands This section describes the commands related to the battery power BACKUP_BATTERY Purpose Syntax Remarks Example See Also To get the voltage level of the backup battery A BACKUP_ BATTERY 4 is an integer variable to be assigned to the result That is the voltage level of the backup battery is returned in units of milli volt mV The backup battery is used to retain data in SRAM and keep the real time clock and calendar running even when the power is off The backup battery would be considered as Battery Low when the BACK BATTERY is lower than 2900 mV That means the SRAM and the calendar chip may lose their data at any time thereafter if the battery is not recharg
212. quirements Before you install the CipherLab BASIC Compiler it is necessary to check that your PC meets the following minimum requirements Items Requirements CPU Pentium 75MHz Operating System Windows 95 98 2000 NT XP Minimum RAM 16 MB Minimum Hard Disk Space 20 MB Note Any terminal being programmed will need to have a minimum 128KB RAM 2 3 BASIC Run time Engine The BASIC Run time Engines work as interpreters of the BASIC commands The CipherLab terminals have to be loaded with the BASIC Run time Engines to run the BASIC programs Each model of terminal has its own Run time Engine to drive its specific hardware features The Run time Engines are named as BCxxx shx where BCxxx is the model number of the target terminal For example BC711 shx is the BASIC Run time for 711 The BASIC Run time also provides the capabilities for user to configure the terminal With the Run time Engine loaded the terminal can be set to the System Mode In the System Mode user can set up the system settings such as the system clock and update the user program and so on The System Menu presented in the System Mode varies for different models of terminals For detailed functions of the System Menu please refer to the user manual of the terminal Note The System Menu is launched by pressing three keys simultaneously 7 9 and the POWER key Chapter 2 Development Environment 7 2 4 Development Flow Developing a BASIC program fo
213. r PWbbPoPn r bb Base ID 01 16 Po Original power level 1 5 Pn New power level 1 5 Set Base Quiet QT RF Base Purpose Syntax Return To enable or disable the message Oktt r NGtt r WTit r generation of the Base when sending data to the terminal QTbdbs r bb Base ID 01 16 s set 0 for responsive set 1 for quiet 1 6 no message QTbbSoSn r bb Base ID 01 16 So Original state Sn New state RS 232 Baud Rate SP RF Base Purpose To change the RS 232 baud rate setting of the Base Note that the connection has to be restarted with new setting 156 BASIC Programming Guide For Use with CipherLab BASIC Compiler Syntax SPbbs r bb Base ID 01 16 s Baud rate setting Return None List Terminal TM RF Base Purpose To list terminals that are registered to the Base or bases Syntax TMbb r bb Base ID 01 16 set 00 for all bases Return TMbbtt r tt repeat bb Base ID 01 16 tt Terminal ID 01 45 Transmission Timeout TO RF Base Purpose To set or get the timeout setting Syntax TObbtt r bb Base ID 01 16 tt Timeout setting 01 99 sec set 00 to get the current timeout Return TObbttTT r bb Base ID 01 16 tt Original timeout 01 99 sec TT New timeout 01 99 sec Chapter 5 BASIC Commands 157 Update Program UP RF Base Purpose To enter the download mode for updating the Base program Syn
214. r the CipherLab terminal is as simple as counting 1 2 3 There are three steps Step 1 Download the BASIC Run time to the target terminal Step 2 Edit and compile the BASIC program Step 3 Download the BASIC object file to the target terminal 2 4 1 Download Run time Engine The BASIC Run time Engines are programs being loaded on the CipherLab terminals to execute the BASIC object files They must exist in the terminals before the BASIC object files are downloaded To download the Run time Engine and or any other programs the target terminal needs to be set to the Download Mode first to receive the new program There are two ways to enter the Download Mode one is from the System Menu and the other is from the Kernel Menu For details of how to download a program please refer to the terminal s user manual Note After the battery pack is re installed the Kernel Menu can be launched by pressing three keys simultaneously 1 7 and the POWER key After the target terminal is set to the Download Mode and the connection to the host PC is properly established user can run one of the programs on the host PC to download the BASIC Run time or any other shx files to the terminal Download exe for RS 232 IrDA interface IRLoad exe for Cradle IR interface ProgLoad exe for RS 232 IrDA Cradle IR or TCP IP After the Run time Engine is downloaded successfully the message Ready for BASIC Download will be shown o
215. r the same function press hot key ALT F4 12 BASIC Programming Guide For Use with CipherLab BASIC Compiler 3 2 Edit Menu Seven commands are provided here to facilitate the editing of the BASIC source code lolx File Edit Configure Compile Help Gut Cirit Copy Gtri c Paste Delete Del Select All Gtr Command To Do Undo Function To abort the previous editing command or action Operation Click Edit on the menu bar and select Undo For the same function press hot key CTRL Z or click the Undo icon on the tool bar Cut Function To cut a paragraph off the text and place it on the clipboard The paragraph will be removed Operation Drag the cursor to select the paragraph to be cut off This paragraph will be highlighted in a reverse color Click Edit on the menu bar and select Cut For the same function press hot key CTRL X or click the Cut icon on the tool bar Copy Function To copy a paragraph from the text to the clipboard Operation Drag the cursor to select the paragraph to be copied This paragraph will be highlighted in a reverse color Click Edit on the menu bar and select Copy For the same function press hot key CTRL C or click the Copy icon on the tool bar Paste Delete Select All Find Function Operation Function Operation Function Operation Function Operation Chapter 3 Using Cipher
216. racter stands for the string of MAC ID The next property after MAC ID is Device Name which consists of up to 20 characters and ends with a delimiter code r The next property after Device Name is PIN code which consists of up to 17 characters and ends with a delimiter code r The last property of Frequent Device List is Link Key which is normally generated when the pairing procedure is completed This unique Link Key is applied to the specific device connection only Once the connection is renewed with a different device a new Link Key will be generated Le 897 Service 132 S A 2 1 maco 1 fror fror feor fror prie fe fse fror fri fr frar nae S a ae 8 9 oe Par fw fo fa 8 ss gt fe Pe Note Make sure to put r as a delimiter for Device Name PIN Code and Link Key Chapter 5 BASIC Commands 183 Sample code FREQ _DEV CLS FOR K 1 TO 8 FDLS ow FDL GET NET PARAMETERS 39 K IF MIDS FDLS 1 1 lt gt CHRS 0 THEN DEVS MIDS FDLS 14 20 MAC IDS MIDS FDLS 2 12 MACHINES MIDS FDLS 1 1 FREQ DEVS FREQ DEV DEV FREQ MACS FREQ MACS MAC_ID FREQ MC FREQ MCS MACHINES 184 BASIC Programming Guide For Use with CipherLab BASIC Compiler Set Frequent
217. rmat Range 232 BASIC Programming Guide For Use with CipherLab BASIC Compiler MSI Max Code Length Fixed Length 1 2D Extra Long Range MSI Min Code Length Fixed Length 2 2D Extra Long Length must be greater than Length2 Range Scan Mode for Scanner Port 1 Extra Long 8 Aiming Mode Any value 0 15 other than 8 Laser Mode aiming beam 0 Code 39 Length Limitation in Fixed Length Format 2D Extra Long Range 1 Code 39 Length Limitation in Max Min Length Format Code 39 Max Code Length Fixed Length 2D Extra Long Range Code 39 Min Code Length Fixed Length2 2D Extra Long Length must be greater than Length2 Range 91 0 DO NOT transmit UPC E1 System Number 2D Extra Long P fee 92 0 DO NOT transmit UPC E1 Check Digit 2D Extra Long aa 1 Transmit UPC E1 Check Digit Range Appendix Reader Settings 233 93 0 Disable UCC EAN Code 128 Emulation Mode for UCC EAN 2D Composite Code 1 Enable UCC EAN Code 128 Emulation Mode for UCC EAN Composite Code 94 0 Disable TCIF Linked Code 39 2D 95 0 No conversion 2D Extra Long ee 0 Disable Code 11 2D ae 1 Enable Code 11 ro 97 0 Disable Bookland EAN 2D Extra Long 1 Enable Bookland EAN Range Index No 16 is required to be 1 0 Disable Discrete 25 Industrial 25 2D Extra Long 0 Disable ISBT 128 2D Extra Long 0 Disable Trioptic Code 39 2D Extra Long
218. rong PIN code addr is a string variable indicating the address of the Bluetooth device type is an integer variable indicating a specific type of service PAN AP required SPP DUN It will try to pair with any Bluetooth device that has the specific type of service If authentication is enabled then correct PIN code will be required for setting up the Link Key Once the pairing procedure is completed the MAC ID of the remote device will be recorded in the Frequent Device List for quick connection in the future MENU STR BT_INQUIRY 1 MENU MENU_STRS DEVICE MID MENU_ STRS 1 32 1 1 32 R BT_PAIRING DEVICES 3 BT_INQUIRY 182 BASIC Programming Guide For Use with CipherLab BASIC Compiler Frequent Device List Get Frequent Device List The length of Frequent Device List by calling GET_NET_PARAMETE is 83 characters LISTS GET NET PARAMETERS 40 The first character of Frequent Device List is the service type that the device is engaged Currently there are four types that have been defined Service Type In Frequent Device List PAN Max 8 devices are recorded AP mode access points are required SPP Only 1 device is recorded DUN Only 1 device is recorded HID Only device is recorded to be continued Note If bit 7 1 it means that this device is currently connected After the service type from the second to the 13th cha
219. rt Stop Character 2D Extra Long 1 Transmit Codabar Start Stop Character Rangs 122 0 Codabar Length Limitation in Fixed Length Format 2D Extra Long 4 1 Codabar Length Limitation in Max Min Length Format Range Range 2 3 124 Codabar Min Code Length Fixed Length2 2D Extra Long Length must be greater than Length2 Range Transmit Start Stop Character This parameter specifies whether the start stop characters are included in the data being transmitted Length Qualification The barcode can be qualified by Fixed Length or Max Min Length The length of a barcode refers to the number of characters i e human readable characters including check digit s it contains If Fixed Length is selected up to 2 fixed lengths can be specified If Max Min Length is selected the maximum length and the minimum length must be specified The terminal will only accept those barcodes with lengths that fall between max min lengths specified Note When it is configured to use Fixed Length format Length must be greater than Length2 Otherwise the format will be converted to Max Min Length Format and Length becomes Min Length while Length2 becomes Max Length In either length format when both of the values are configured to 0 it means no limit in length 250 BASIC Programming Guide For Use with CipherLab BASIC Compiler Code 2 of 5 Discrete 25 No N1 Values and Description N2 52299
220. s and Description N2 0 Disable original Telepen CCD Laser 1 Enable original Telepen Numeric 85 0 Disable Telepen CCD Laser 1 Enable Telepen Original Telepen Numeric If this parameter is enabled the terminal will support Telepen in numeric numbers only If this parameter is disabled the terminal will support Telepen in full ASCII code AIM Telepen Full ASCID includes all the alphanumeric and special characters 246 BASIC Programming Guide For Use with CipherLab BASIC Compiler UPC EAN Families EAN 8 noi 4 nny 13 0 Disable EAN 8 CCD Laser Co 0 Disable EAN 8 Addon 2 CCD Laser 1 Enable EAN 8 Addon 2 0 Disable EAN 8 Addon 5 CCD Laser 1 Enable EAN 8 Addon 5 CCD Laser Transmit Check Digit If this parameter is enabled the checksum character will be included in the data being transmitted Convert EAN 8 to EAN 13 If this parameter is enabled the read EAN 8 barcode will be expanded into EAN 13 and the next processing will follow the parameters configured for EAN 13 nowy 6 46 16 0 Disable EAN 13 UPC A CCD Laser 1 Enable EAN 13 UPC A ee 0 Disable EAN 13 UPC A Addon 2 CCD Laser 1 Enable EAN 13 UPC A Addon 2 0 No conversion CCD Laser 1 Enable ISBN Conversion 18 0 Disable EAN 13 UPC A Addon 5 CCD Laser 1 Enable EAN 13 UPC A Addon 5 46 0 No conversion CCD Laser 1 Enabl
221. s might not have been done yet Therefore it is necessary for the application program to check whether the status is IP is ready by calling GET_TCPIP_MESSAGE or GET_NET_STATUS before it proceeds to perform any networking operations GET_NET_STATUS When initialization error occurs for PPP DUN GPRS or GPRS connection GET_NET_STATUS 7 will return 1 Once the initialization process is done the network status can be retrieved from the system It will be periodically updated by the system The application program must explicitly call GET_NET_STATUS to get the latest status 176 BASIC Programming Guide For Use with CipherLab BASIC Compiler Note Open a Connection TCP_OPEN Before reading and writing to the remote host a connection must be established opened Call TCP_OPEN to open a connection The application program needs to define a connection number 0 3 so that it can identify a particular connection in subsequent calls to other TCP IP stack routines GET_TCPIP_MESSAGE It is necessary for the application to check whether the status of the particular connection is connected by calling GET_TCPIP_MESSAGE before it proceeds to perform any read write operations Once the value of 4013 is returned i e connection is dropped abnormally say the terminal is shut down accidentally or by the AUTO_OFF timer user program has to specify its own handling method For example if you wish to reconnect simply call START TCPI
222. s on dot pixel basis 5 15 1 Properties Contrast Level 1 8 It is set to level 5 by default Backlight It is turned off by default The shortcut key FN Enter can be used as a toggle BACK_LIGHT_DURATION Purpose To specify how long the backlight will last once the terminal is turned on Syntax BACK LIGHT DURATION N Remarks N is an integer variable indicating a period of time in units of 1 second Example BACK LIGHT DURATION 20 backlight lasts for 20 seconds See Also BACKLIT LCD CONTRAST SET_VIDEO MODE BACKLIT Purpose To set the LCD backlight Syntax BACKLIT state Remarks state is an integer variable indicating a specific state luminosity level of the LCD backlight 106 BASIC Programming Guide For Use with CipherLab BASIC Compiler 1 eang 711 0 BACKLIT 1 BACKLIT 10 2 BACKLIT MED 3 BACKLIT _ HI 8100 8000 8300 0 BACKLIT _OFF 1 BACKLIT 0 8500 0 BACKLIT OFF 1 BACKLIT VERY LO 2 BACKLIT 0 3 BACKLIT MED 4 BACKLIT HI Example BACKLIT 1 turn on LCD backlight at very low luminosity on 8500 See Also BACK LIGHT DURATION LCD_CONTRAST Purpose To set the contrast level of the LCD Syntax LCD CONTRAST N Remarks N is an integer variable indicating the contrast level in the range of 1 to 8 The higher value the stronger contrast Example LCD CONTRAST 4 set the LCD contrast to level 4 medium contrast See Also BACK LIGHT DURATION SE
223. scan engine Note For 2D or Extra Long Range Laser scan engine it is necessary to call READER_CONFIG to enable new settings For specific symbology parameters refer to Appendix II For scanner parameters refer to Appendix III GET_READER_SETTING Purpose Syntax Remarks Example See Also To get the value of a specified parameter of the barcode settings A GET_READER_SETTING N 4 is an integer variable to be assigned to the result N is an integer variable indicating the index number of a parameter cf READER _ SETTING Setting1 GET READER SETTING 1 IF Setting1 1 THEN PRINT Code 39 readability is enabled ELSE PRINT Code 39 readability is disabled END IF CODE_TYPE READER SETTING READER_SETTING Purpose Syntax Remarks To set the value of a specified parameter of the barcode settings READER_SETTING N1 N2 A set of parameters called barcode settings determines how the decoder will decode the barcode data The initial values of the barcode settings are given by the Barcode Settings Window of the BASIC Compiler User can reset the values by calling READER SETTING ina BASIC program Refer to Appendix 1 11 11 for details of the settings N1 is an integer variable indicating the index number of a parameter N2 is an integer variable indicating the value to be set to a parameter 78 BASIC Programming Guide For Use with CipherLab BASIC Compiler Example READER SETT
224. se with CipherLab BASIC Compiler N is a numeric expression Example A SGN 100 A 1 B SGN 1 5 B 1 Chapter 5 BASIC Commands 33 5 2 Commands for Decision Structures Based on the value of an expression decision structures cause a program to take one of the following two actions To execute one of several alternative statements within the decision structure itself 100 branch to another part of the program outside the decision structure In CipherLab BASIC decision making is handled by the IF THEN ELSE ENDIF and ON GOSUB GOTO statement The IF THEN ELSE ENDIF statement can be used anywhere the ON GOSUB GOTO statement can be used The major difference between the two statements is that ON GOSUB GOTO evaluates a single expression and then executes different statements or branches to different parts of the program based on the result On the contrary a block IF THEN ELSE ENDIF can evaluate completely different expressions Moreover the expression given in the ON expression GOSUB GOTO statement must be evaluated by a number in the range 1 to 255 while the expression in IF THEN ELSE ENDIF statement can only be evaluated as a TRUE or FALSE condition The IF THEN ELSE ENDIF statement can be nested up to 10 levels IF THEN ELSE Purpose To provide a decision structure for single line conditional execution Syntax IF condition THEN action1
225. sert 5 scan code 0x29 Tab 2 Shift Ctrl A B Alt 1 Alt 2 Break Alt 1 Alt 3 the following characters are inserted into the string supplied to the command SEND_WEDGE Ox Ox Ox 41 31 Note E4 OxC2 0x01 0x35 0xC0 0x29 0x09 0x32 0xC3 0x41 0x42 0xC4 0x32 OxC4 0x31 0xC4 0x33 1 The scan code 0x29 is actually a space for PCAT Alt 12 is a form feed character and Alt 13 is an Enter 2 The break after Alt 12 is necessary if omitted the characters will be treated as Alt 1213 instead of Alt 12 and Alt 13 The following instructions can be called in the BASIC program to send the above string through the keyboard wedge interface Da CH Da Da CH Da Da ta ta_ RS 41 ta_ ta_ 1 2 3 RS 49 4 SE WEDGE ND_ CHRS 65 CHR 194 CHRS 1 CHRS 53 CHRS 192 CHRS 9 CHR 50 5 195 CHR 65 CHRS 66 CHRS 196 CHR 49 CHR 228 CHR 50 CHR 196 CHR 196 5 51 taString Data 15 Data 25 Data 35 Data 45 DataString Chapter 5 BASIC Commands 89 5 9 3 Wedge Emulator CipherLab has developed the wedge emulator program Serial to Keyboard Converter for the 8000 8300 8500 series Serial to Keyboard Converter Yer 1 03 1 x Communication settings COM port Baud rate 115200 Data bits fa Parity check None
226. specified COM port It is very useful when user needs to monitor the system or diagnose a problem When START_DEBUG is executed the system will send a series of messages to a specified COM port until the command STOP_DEBUG is executed The following is a list of the debug messages received when running a sample BASIC program Note Please refer to Appendix III for a description of the debug messages L 7 T 0 42 T 0 ON_NET 316 ADD_RECORD 1 10001 Justin Jan 08300930113013001130150018002000 L 8 T 0 L 9 T 0 ASGN 2 L 10 T 0 ASGN 3 L 11 0 ASGN CipherLab 510 L 12 T 0 ASGN 510AC_100 BAS L 13 T 0 L 25 0 ARY 1 ASGN OKGood Morning L 39 0 SET_COM 1 1 1 2 1 L 40 T 0 OPEN_COM 1 L 41 T 0 START_NETWORK L 43 T 0 ON_ENQUIRY 128 GOTO 68 L 68 0 L 69 T 0 L 70 0 GOTO 68 L 69 0 EVENT 16 79 T 1 L 80 T 1 OFF_READER 1 L 81 T 1 OFF_READER 2 L 82 T 1 CLS L 83 T 1 HIDE_CALENDAR 84 T 1 BEEP 218 BASIC Programming Guide For Use with CipherLab BASIC Compiler START_DEBUG Purpose To start the debug function Syntax START DEBUG N Baudrate Parity Data Handshake Remarks Parameters Values Indicates which COM port is to be set 1 115200 bps Specifies the baud rate of the COM port 2 76800 bps 3 57600 bps 4 38400 bps 5 19200 bps 6 9600 bps 7 4800 bps 8 2400
227. ss Product Family Bluetooth WLAN 802 11b Bluetooth 802 11b GSM GPRS Terminal 8061 8071 8330 8590 8 8360 based on 8500 or 8500 8570 Note Refer to the previous section for port mapping of Bluetooth and GSM 160 BASIC Programming Guide For Use with CipherLab BASIC Compiler IEEE 802 11b IEEE 802 11b is an industrial standard for Wireless Local Area Networking WLAN which enables wireless communications over a long distance The speed of the connection between wireless devices will vary with range and signal quality To maintain a reliable connection the 802 11b system automatically fallback from 11 Mbps 0 5 5 2 or 1 Mbps as range increases or signal quality decreases 802 11b Specification Frequency Range 2 4 2 5 GHz Data Rate 11 5 5 2 1 Mbps auto fallback Connected Devices 1 for ad hoc mode No AP Multiple for infrastructure mode AP required Protocol IP TCP UDP Coverage 250 meters line of sight Max Output Power 100 mW Spread Spectrum DSSS Modulation DBPSK 1 Mbps DQPSK 2 Mbps CCK 11 Mbps Standard IEEE 802 11b interoperable with Wi Fi devices Note All specifications are subject to change without prior notice Bluetooth Note Serial Port Profile SPP is for ad hoc networking without going through any access point Dial Up Networking Profile DUN makes use of a Bluetooth modem or mobile Chapter 5 BASIC Commands phone as a wireless modem Also it ca
228. st the transmission coverage and response time Then try out each channel to get the best performance If the coverage satisfies your needs repeat the above procedure with lower output power The benefits in using lower output power are 10 conserve battery power 10 reduce the possibility of interference to other RF systems The power consumption for sending and receiving is about 60 mA and 25 mA maximum respectively The five tunable output power settings are 10 dbm 10 0 mW 5 dbm 3 16 mW 4dbm 2 51 mW dbm 1 00 mW 5 dbm 0 32 mW Chapter 5 BASIC Commands 147 5 20 5 RF Terminal Properties Below are the RF properties on terminal 433 MHz Terminal Properties 8110 8310 Channel 1 4 ID 1 45 Timeout 1 99 seconds duration of retries for sending data Output Power 1 5 levels 10 5 4 0 5 dbm Auto Search 0 99 seconds automatically search for available channel when the connection to the current channel is lost 2 4 GHz Terminal Properties 8150 8350 Channel 1 6 ID 1 99 Timeout 1 99 seconds duration of retries for sending data Output Power 1 level 64 mW Auto Search 0 99 seconds automatically search for available channel when the connection to the current channel is lost CHECK_RF_BASE 8110 8310 8150 8350 Purpose To check if the terminal is connected to a base Syntax A CHECK RF BASE Remarks 4 is an integer variable to be assigned to the result
229. t sd shx Simplified Chinese Font size 12x12 4 lines Font tc shx Traditional Chinese Font size 16x16 4 lines Chapter 2 8000 8300 Series Font_8x00_Hebrew shx Font_8x00_Japanese shx Font_8x00_Japanese12 shx Font_8x00_Korean shx Font_8x00_Korean12 shx Font_8x00_Nordic shx Font_8x00_Polish shx Font_8x00_Russian shx Font_8x00_SChinese shx Font_8x00_SChinesel2 shx Font_8x00_TChinese shx Font_8x00_TChinese12 shx Font_8x00_Multi_Language shx 8500 Series Font8500 Jp shx Japanese Font8500 Kr shx Korean Font8500 Sc shx Simplified Chinese Font8500 Sc12 shx Simplified Chinese Font8500 Tc shx Traditional Chinese Font8500 Tc12 shx Traditional Chinese Font8500 Multi Language Multilanguage shx Development Environment 5 Font size Font size Font size Font size Font size Font size Font size Font size Font size Font size Font size Font size Font size Font size Font size Font size Font size Font size Font size Font size 6x8 or 8x16 16x16 4 lines 6x12 or 12x12 5 lines 16x16 4 lines 6x12 or 12x12 5 lines 6x8 or 8x16 6x8 or 8x16 6x8 or 8x16 16x16 4 lines 6x12 or 12x12 5 lines 16x16 4 lines 6x12 or 12x12 5 lines 6x8 or 8x16 16x16 9 lines 16x16 9 lines 16x16 9 lines 6x12 or 12x12 12 lines 16x16 9 lines 6x12 or 12x12 12 lines 6x8 or 8x16 6 BASIC Programming Guide For Use with CipherLab BASIC Compiler 2 2 System Re
230. ta GET READER DATAS 1 GOSUB AddNewData UNLOCK RETURN 56 BASIC Programming Guide For Use with CipherLab BASIC Compiler See Also BerData_2 BEEP 2000 5 Data GET READER DATA 2 GOSUB AddNewData RETURN In this example the BASIC program can trap the READER 1 and READER 2 events and reroute to the subroutines BcrData_1 and BerData_2 respectively In BcrData_1 the command LOCK disables all the activated event triggers so that the subroutine BerData_1 will not be interrupted by a new upcoming READER 1 and or READER 2 event On the other hand since LOCK is not called in BcrData_2 any new coming READER 1 and READER 2 event will interrupt the ongoing BcrData_2 and therefore may affect the expected results UNLOCK UNLOCK Purpose Syntax Remarks Example See Also To release all the activated event triggers held by LOCK UNLOCK This command resumes event processing Refer to the command LOCK LOCK Chapter 5 BASIC Commands 59 5 6 System Commands This section describes the system commands such as the commands to change the CPU running speed get the device ID and or restart the system 5 6 1 General AUTO_OFF Purpose Syntax Remarks Example See Also To set a specified period of time for the system to automatically shut down user s program as long as there is no operation in the interval AUTO_OFF N N is an integer variable indicating a specified period of time in units o
231. tax UPbb r bb Base ID 01 16 Return UPbb r bb Base ID 01 16 The Base is ready for downloading new program after returning this message 156 BASIC Programming Guide For Use with CipherLab BASIC Compiler 5 20 7 RF Example Set COM port SET _COM_TYPE Assign COM2 to RF communication 1 6 SET_COM_TYPE 2 5 Open COM port OPEN COM To initialize the RF module and set up connection call OPEN_COM 2 a Set COM delimiter For example use carriage return 0300 as the string delimiter by calling COM_DELIMITER 2 13 Data transmission To transmit data call WRITE_COM 2 A To receive data call A READ_COM 2 Close COM port CLOSE_COM To disable the RF module call CLOSE_COM 2 Chapter 5 BASIC Commands 159 5 21 Wireless Communications This section describes the commands related to wireless network configuration WLAN stands for IEEE 802 11b PAN stands for Personal Area Networking Profile of Bluetooth SPP stands for Serial Port Profile of Bluetooth DUN stands for Dial Up Networking Profile of Bluetooth for connecting a Modem DUN GPRS stands for Dial Up Networking Profile of Bluetooth for activating a mobile s GPRS HID stands for Human Interface Device Profile of Bluetooth GSM stands for Global System for Mobile Communications GPRS stands for General Packet Radio Service 5 21 1 Wireless Models These commands are for the use of the following models Wirele
232. teger variable in the range of 0 to 3 indicating the connection number 172 BASIC Programming Guide For Use with CipherLab BASIC Compiler Example NCLOSE 0 See Also NREAD NWRITE TCP_ERR_ CODE TCP_OPEN NREAD 8000 8300 8500 Purpose 10 read data from a TCP IP connection Syntax A NREAD N Remarks A is a string variable to be assigned to the result N is an integer variable in the range of 0 to 3 indicating the connection number Example A NREAD 0 See Also NCLOSE NWRITE OFF TCPIP ON TCPIP GOSUB SOCKET HAS DATA TCP_ERR CODE TCP_OPEN NWRITE 8000 8300 8500 Purpose 10 write data to a TCP IP connection Syntax NWRITE N A Remarks N is an integer variable in the range of 0 to 3 indicating the connection number A is a string variable representing the string to be sent to the connection Example NWRITE 0 Hello See Also NCLOSE NREAD SOCKET_CAN_SEND TCP_ERR_ CODE TCP_OPEN SOCKET_CAN_SEND 8000 8300 8500 Purpose To check if data can be sent Syntax A SOCKET_ CAN SEND N L Remarks 4 15 an integer variable to be assigned to the result Normal data can be sent Invalid connection number Connection is closed Cannot send data Never run START TCPIP N is an integer variable in the range of 0 to 3 indicating the connection number L is an integer variable indicating the length of data Example A SOCKET CAN SEND 0 10 See Also Chapter 5 BASIC Com
233. tion describes the commands related to file manipulation There are two different types of file structures supported in CipherLab BASIC DAT Files a DBF Files and IDX Files 9 22 1 DAT Files This one has a sequential file structure which is much like the ordinary sequential file but is modified to support FIFO structure We call this type of file as DAT file Because DAT files are usually used to store transaction data they are also referred to as Transaction files Note 1 The length of each record in the transaction file is limited to 255 bytes 2 For portable terminals a BASIC program can have up to 6 transaction files DEL_TRANSACTION_DATA Purpose Syntax Remarks Example To remove a block of transaction data from the default transaction file DEL TRANSACTION DATA N This command will only have an effect on the first default transaction file N is an integer variable determining how many transaction records to be deleted and how to delete If N is a positive integer the specified number of records will be deleted from the top of the transaction file 1 i e the oldest records will be deleted If is a negative integer the specified number of records will be deleted from the bottom of the transaction file 1 i e the latest records will be deleted PRINT Discard the latest transaction Y N Loop KeyData INKEY IF KeyData THEN GOTO Loop ELSE IF KeyData Y THEN DEL TRANSAC
234. to be assigned to the result index is an integer variable indicating a specific configuration item by index number owing Normal status connection is open Invalid index number Connection is closed Never run START TCPIP Example NetSetting GET NET PARAMETERS 0 See Also SET NET PARAMETER SOCKET IP TCP_ERR_ CODE SET_NET_PARAMETER 8000 8300 8500 Purpose To configure network settings Syntax SET NET PARAMETER index A Remarks Note that it is not necessary to configure the setting every time index is an integer variable indicating a specific configuration item by index number A is a string variable indicating the network setting to be configured Boolean type Enable Disable Authentication Open Share WEP Key Length 64 bits 128 bits System Scale Low Medium High Preamble Type Short Long Both WPA Pass Phrase 8 63 characters For indexes 5 10 19 20 25 27 32 you may simply input an empty string to clear settings Example SET NET PARAMETER 1 192 168 1 241 set local IP SET NET PARAMETER 11 Disable disable DHCP SET NET PARAMETER 12 Share set authentication Share Key See Also GET NET PARAMETERS IP_CFG TCP_ERR CODE Chapter 5 BASIC Commands 165 5 21 3 Initialization amp Termination After the networking parameters are properly configured an application program can call START TCPIP to initialize any wireless
235. ue of N determines which subroutine is to be called If the value of N is 0 or greater than the number of routines listed the interpreter will continue with the next executable statement SubName is the name of a subroutine SubLabel is the line label of a subroutine PRINT Input a number 1 9 INPUT Num CLS ON Num GOSUB 100 100 100 200 200 300 400 400 400 100 PRINT Number 1 3 is input RETURN 200 PRINT Number 4 5 is input RETURN 300 PRINT 6 is input RETURN 400 PRINT Number 7 9 is input RETURN ON GOTO Purpose Syntax Remarks Example To branch to one of several specified Line Labels depending on the value of an expression ON N GOTO LineLabel LineLabel N is a numeric expression which is rounded to an integer The value of N determines which line label in the list will be used for branching If the value N is 0 or greater than the number of line labels listed the interpreter will continue with the next executable statement LineLabel is the string label of a program line PRINT Input a number 1 9 INPUT Num CLS 36 BASIC Programming Guide For Use with CipherLab BASIC Compiler ON Num GOTO 100 100 200 200 300 400 400 400 100 PRINT Number 1 3 is input GOTO 500 200 PRINT Number 4 5 is input GOTO 500 300 PRINT 6 is input GOTO 500 400 PRINT Number 7 9 is input 500 Chapter 5 BASIC Commands 37 5 3 Commands for Looping
236. x Remarks Example To return the length of a string A LEN X8 4 is an integer variable to be assigned to the result X may be a string variable string expression or string constant Note that non printing characters and blanks are counted String1 abcde A LEN String1 A 6 including the blank 5 4 4 Searching for Strings Searching for a string inside another one is one of the most common string processing tasks INSTR is provided for this task INSTR Purpose Syntax Remarks Example To search if one string exists inside another one A INSTR N X Y A is an integer variable to be assigned to the result N is a numeric expression in the range of 1 to 255 Optional offset N sets the position for starting the search X Y may be a string variable string expression or string constant If Y is found in X INSTR returns the position of the first occurrence of Y in X from the starting point If N is larger than the length of X or if X is null of if Y cannot be found INSTR returns 0 If Y is null INSTR returns N or 1 if N is not specified String1 11025John Thomas Accounting Manager String2 EmployeeName MID String1 6 INSTR String1 String2 6 the employee s name starts at the sixth character Chapter 5 BASIC Commands 41 5 4 5 Retrieving Part of Strings Several commands are provided to take strings apart by returning pi
237. x Remarks Example See Also To restart the system RESTART This command will terminate the execution of the BASIC program and restart it HostCommand READ_COM 1 IF HostCommand RESTART THEN RESTART ELSE AUTO_OFF POWER ON SET_LANGUAGE 8000 8300 8500 Purpose Syntax Remarks To select which language is to be used for the multi language font file SET LANGUAGE N Note that this command will fail if the multi language font file does not exist N is an integer variable in the range of 16 to 32 English MS DOS Code page 437 Canadian French MS DOS Code page 863 Hebrew MS DOS Code page 862 Multilingual Latin I MS DOS Code page 850 Nordic MS DOS Code page 865 Portuguese MS DOS Code page 860 Cyrillic Russian Windows Code page 1251 Latin II Slavic MS DOS Code page 852 Central European Latin II Polish Windows Code page 1250 Turkish MS DOS Code page 857 Latin II Slovak Windows 1250 Windows 1250 ISO 28592 Latin 2 ISO 28592 Latin 2 IBM LATIN II 64 BASIC Programming Guide For Use with CipherLab BASIC Compiler Greek MS DOS Code page 737 Latin I Windows Code page 1252 Greek Windows Code page 1253 Example SET LANGUAGE 17 select French See Also GET LANGUAGE SELECT FONT SYSTEM_INFORMATION Purpose To collect information on components either hardware or software Syntax A SYSTEM INFORMATIONS index Remarks A is a string variable to be assigned to the result index
238. yntax Return To broadcast data to all registered bases Note that all bases are connected via RS 485 as a daisy chain therefore data may not be sent to all registered bases if any of them fails BC ddd r None List Base Station BS RF Base Purpose Syntax Return To get information of bases such as their groups and channels BS r BSbbgc r bbgce may repeat bb Base ID 01 16 g Group number 1 3 c Channel number 1 4 Set Get Channel CH RF Base Purpose Syntax Return To set or get the Base s channel CHbbe r bb Base ID 01 16 c New channel 1 4 set 0 to get the Base s channel CHbbCoCn r bb Base ID 01 16 Co Original channel 1 4 Cn New channel 1 4 Send Data to Terminal DT RF Base Purpose To send data to the terminal Chapter 5 BASIC Commands 153 Syntax DTttdd r tt Terminal ID 01 45 dd Data string Return Oktt r succeed NGtt r fail WTtt r busy data will be sent later Receive Data from Terminal DT RF Base Purpose To receive data from the terminal Syntax DTbbttdd r Received bb Base ID 01 16 tt Terminal ID 01 45 dd Data string Command Format Error ER RF Base Purpose Ifthe command or data being sent to the Base is incorrect the Base returns ERYr Set Get Group GP RF Base 433 MHz only Purpose To set or get the Base s group Syntax GPbbg r bb Base ID 01 16 g New
239. ystem character and country code applies to such converted barcodes Note that neither the system character nor the check digit can be stripped UPC EAN Families The UPC EAN families include No Addon Addon 2 and Addon 5 for the following symbologies UPC E0 UPC El UPC A EAN 8 EAN 13 Bookland EAN for ISBN For any member belonging to the UPC EAN families Index No 139 is used to decide the joint configuration of No Addon Addon 2 and Addon 5 Other parameters are listed below 6 9 vauesansoeeiptonqiy seamen 43 0 No conversion 2D Extra Long P 1 Convert UPC E0 to UPC A NOT transmit UPC E0 Check Digit 2D Extra Long mit UPC E0 Check Digit NOT transmit UPC A Check Digit 2D Extra Long mit UPC A Check Digit Range 0 DO NOT transmit UPC E0 System Number 2D Extra Long mit UPC EO System Number Range NOT transmit UPC A System Number 2D Extra Long Range 1 Transmit UPC A System Number 256 BASIC Programming Guide For Use with CipherLab BASIC Compiler 0 No conversion 2D Extra Long 1 Convert EAN 8 to EAN 13 Rance 5 0 DO NOT transmit UPC E1 System Number 2D Extra Long 0 DO NOT transmit UPC E1 Check Digit 2D Extra Long i 1 Transmit UPC E1 Check Digit Range 3 91 92 95 0 No conversion 2D Extra Long 1 Convert UPC E1 to UPC A Range 141 0 Disable UPC A System Number amp Country Code 2D Extra Long 1 Enable UPC A System Number amp Country Co
Download Pdf Manuals
Related Search
Related Contents
EVOLUTION C5 / R5 Defiant LV700B Installation Guide Charte graphique du logo Alcotra Asrock AD2550B-ITX - MaxxVision Liste UNEF-FERUF campus Ponsan Ricettario - Basili Impianti manuel d`utilisation FR3 Livret de l`étudiant - Université de Bretagne Occidentale Copyright © All rights reserved.
Failed to retrieve file