background image

Chapter 15. Function Reference

348

Syntax:

Syntax 1 (Setting a national character set):

COUNTRY$="countrycode"

Syntax 2 (Returning a country code):

COUNTRY$

Parameter:

countrycode

A string expression which returns any of 

A

D

E

F

G

I

J

N

S

, and 

W

.

Description:

Syntax 1

COUNTRY$

 sets a national character set specified by 

"countrycode"

.  The

national character set is assigned to codes from 32 (20h) to 127 (7Fh).  (Refer to
Appendix C2, "National Character Sets.")

"countrycode"

 specifies one of the following national character sets:

• If 

"countrycode"

 is omitted, the default national character set is America

(code A) or Japan (code J) when you have selected the English or Japanese mes-
sage version on the SET DISPLAY menu in System Mode, respectively.

COUNTRY

I/O function

COUNTRY$

Sets a national character set or returns a current country code.

countrycode

National character set

A

America (default)

D

Denmark

E

England

F

France

G

Germany

I

Italy

J

Japan (default)

N

Norway

S

Spain

W

Sweden

Summary of Contents for BHT-BASIC 100 SERIES

Page 1: ......

Page 2: ...ed in any form or by any means without permission in writing from the publisher Specifications are subject to change without prior notice All products and company names mentioned in this manual are tr...

Page 3: ...loping application programs of the BHT 100Q 100B It is intended for programmers who already have some experience in BASIC programming For the basic description about the BASIC language refer to docume...

Page 4: ...Chapter 5 Data Types Covers data which the programs can handle by classifying them into data types constants and variables Chapter 6 Expressions and Operators Surveys the expressions and operators to...

Page 5: ...des and mes sages Chapter 17 Spread Spectrum Communication For models equipped with a spread spectrum wireless block Describes the spread spectrum communication system and wireless communications pro...

Page 6: ...em described in one line two or more times in succession Example READ variable variable 6 Hexadecimal values are followed by h In many cases hexadecimal values are enclosed with parentheses and preced...

Page 7: ...BASIC Interpreter which runs in the BHT is expressed as Interpreter Source Program and Object Program User Program Generally a source program is translated into an object program by a compiler This ma...

Page 8: ...ight Emitting Diode MOD Modulo MS DOS Microsoft Disk Operating System RAM Random Access Memory ROM Read Only Memory RTS RS Request To Send RS 232C signal control line TCP IP Transmission Control Proto...

Page 9: ...2 1 1 1 Software Structure of the BHT 2 1 1 2 Overview of BHT BASIC 4 1 2 BHT BASIC 5 1 2 1 Features 5 1 2 2 What s New in BHT BASIC 3 5 Upgraded from BHT BASIC 3 0 6 1 Compiler 6 2 Statements 6 1 3...

Page 10: ...M All of the system programs user programs extension libraries and extended functions are stored in the flash ROM The RAM is used to run those programs efficiently User programs Flash memory Applicati...

Page 11: ...g receiving files by using the X MODEM and Y MODEM protocols These extension programs are stored in files having an FN3 extension in each file per function You should download a xxxx FN3 file containi...

Page 12: ...more reliable with check digits in bar code reading Improving the checking procedure by checking the number of digits entered from the key board Calculating e g subtotals and totals Supporting file tr...

Page 13: ...velopment of other programs Program Development in Windows95 98 or WindowsNT Windows2000 You may develop programs with BHT BASIC on those computers operating on Windows95 98 or WindowsNT4 0 Windows200...

Page 14: ...t makes it easier to use multiple source pro grams for producing a user program 2 Statements Added statements Based on BHT BASIC 3 0 BHT BASIC 3 5 newly supports several statements for making dis tinc...

Page 15: ...s may have scope to restrict the access to them With the PRIVATE statement you may declare a variable to be local A local variable can only be accessed by any routine in a file where it is defined Wit...

Page 16: ...nd makes an error file if any syntax error is found Linker Linker which is one of the development tools combines object files translated by Compiler together to build a user program in the intermediat...

Page 17: ...Building a library out of a single source file or building a user program or library out of multiple source files 18 2 4 3 Designating a Single Source File or a Project File 19 2 4 3 1 Designating a...

Page 18: ...ting the BHT BASIC Compiler from the Command Line 37 1 Syntax 37 2 Options 38 3 Error Level Indication by ERRORLEVEL 40 2 4 9 Output from the BHT BASIC 3 5 Compiler 41 2 4 10 Structure of User Program...

Page 19: ...U Optical communications unit For IrDA communication the following CU is required Note that no CU is required if the BHT is directly connected with the host computer via the direct connect interface C...

Page 20: ...T3EW32 EXE Windows based Transfer Utility Ir Transfer Utility C or Ir Transfer Utility E is an essential tool for downloading user programs to the BHT Each of the BHT BASIC Compiler Transfer Utility I...

Page 21: ...T BASIC Producing a user program compiling and linking Compile the source programs into object programs by BHT BASIC Compiler Then combine those object programs or libraries made up by Librarian toget...

Page 22: ...Functions of Linker Description Output of a link map file Outputs a symbol table along with its memory address Output of a user program Integrates more than one object program or library to produce a...

Page 23: ...atement should begin in the 2nd or the following columns One program line should be basically limited to 512 characters excluding a CR code and should be ended with a CR code by pressing the carriage...

Page 24: ...tement with an END IF or ENDIF since the IF state ment will be treated as a block structured statement The default number of characters for a non array string variable is 40 that for an array string v...

Page 25: ...es the active project Quits the BHT BASIC 3 5 Compiler View Toolbar Status Bar Clear Screen Shows or hides the toolbar Shows or hides the status bar Clears the screen Project Select File Add File Red...

Page 26: ...e file you need to create a project file for a sin gle source file 1 Building a user program out of a single source program file What follows is a general procedure for building a user program out of...

Page 27: ...source file to build a user program or library 1 Select a source file 1 In any of the following methods display the Open File dialog box shown below From the File menu choose the Open command Click th...

Page 28: ...rom the File menu choose the New command Click the new file button in the toolbar While holding down the Ctrl key press the N key 2 Designate a project file you want to create Projtest bhp in this exa...

Page 29: ...se the Open Project command Click the open project button yellow in the toolbar While holding down the Ctrl key press the P key 2 Select an existing project file you want to use Projtest bhp in this e...

Page 30: ...either of the following methods display the Add File s dialog box shown below From the Project menu choose the Add File command Click the add file button in the toolbar 3 Select files you want to add...

Page 31: ...ng display areas and buttons from which you may also select a user program or library to be built may start compiling or building and may run the editor as well as adding or deleting files to from the...

Page 32: ...ct file Delete File button Deletes the currently selected file s from the active project Main Object button Specifies the currently selected file as a main object if you have selected User program PD3...

Page 33: ...lding process 1 Specifying the compiling and linking options 1 In either of the following methods display the Set Options dialog box shown below From the Tools menu choose the Options command Click th...

Page 34: ...ar While holding down the Ctrl key press the G key If compiling ends normally the screen shown below will appear 3 Building In any of the following methods build a user program or library out of objec...

Page 35: ...ocated in the current directory or working directory type the absolute path or relative path The default editor is Windows NotePad If you don t know the editor s filename or directory path choose the...

Page 36: ...edure below you may select whether error messages should be output ted to an editor or main window if an error message file XXX ERR is produced 1 From the Tools menu choose the Options command The Set...

Page 37: ...the Error Message Output is selected in the Set Options dia log box the editor will automatically open and show the detected errors If the To the Window check box is selected those errors will be outp...

Page 38: ...utted default For details refer to 4 Symbol table Outputs a symbol table to the file XXX LST If this option is not selected no symbol table will be output ted default For details refer to 4 X Cross re...

Page 39: ...defined functions defined in a source program to their addresses in the object program written in intermediate lan guage For user defined functions in the one line format the first addresses of those...

Page 40: ...DENSO CORPORATION 1998 All rights reserved source C TEST SRC List File Option Filename Extension Address source list Symbol table Cross reference Select the Address source List check box Select the S...

Page 41: ...the first detected error will appear 5 A TAB code will be replaced with eight space codes The total number of syntax errors will be outputted at the end of the list Symbol table Select the Symbol tabl...

Page 42: ...string types Each of common variables work variables and register variables can be divided into the fol lowing types Non array integer type Non array real type Non array string type Array integer type...

Page 43: ...ranged according to their types together with their pointing addresses An array variable has a suffix of paren theses If no work variables are used this item will not be outputted Map for register var...

Page 44: ...causing a run time error If a run time error occurs the Compiler returns the address ERL XXXX assigned starting from the head of the user program When building a user program out of multiple object fi...

Page 45: ...ed filename You may specify the name of any of a project file source file and library file options You may specify compiler processing options compiling options and linking option For details refer to...

Page 46: ...ry name If no libraryname is specified the filename specified first will apply E E Determines whether to terminate the BHT BASIC 3 5 Compiler after completion of processing Specifying the E terminates...

Page 47: ...variables and register variables to the file XXX ERR or main window Same as you select the Variable size check box in the Set Options dialog box Refer to Subsection 2 4 7 1 Linking options Descriptio...

Page 48: ...atch file which automatically starts proper operation according to the error level you can facilitate debugging procedures For details about the ERRORLEVEL refer to the MS DOS Reference Manual ERRORLE...

Page 49: ...project has been normally built with out occurrence of a compil ing error or library error Error message Syntax error File XXX ERR in the direc tory where the source pro gram is located If a compiling...

Page 50: ...Set Options dialog box Cross reference If the X Cross reference check box is selected in the Set Options dialog box Sizes of variables File XXX ERR in the direc tory where the source pro gram is locat...

Page 51: ...en the same name as the project file and annexed with an extension LIB If the name of a newly produced file is the same as that of an existing file in the destination directory Compiler will overwrite...

Page 52: ...the BHT If the error message given below appears it is necessary to set the calendar clock before downloading user programs Set the current date and time XX XX XX YY YY The above error message appear...

Page 53: ...program the power switch is pressed no valid operations are performed within the specified time length Automatic powering off Valid operations Entry by pressing any key Bar code reading by pressing th...

Page 54: ...7 1 Subroutines 47 2 Error Event handling Routines 47 3 User defined Functions 48 4 Block structured Statements 48 3 1 2 Notes for Jumping into out of Statement Blocks 49 3 2 Handling User Programs 50...

Page 55: ...g Routines An error or event handling routine is a statement block to which program control passes when an error trap or event of keystroke trap occurs during program execution respectively The RESUME...

Page 56: ...other files it is necessary to declare them with the DECLARE statement before calling them 4 Block structured Statements The statements listed below have the statement block structure and are useful f...

Page 57: ...out of the midst of block structured statements except for FOR NEXT by using the GOTO statement Avoid jumping the control out of the midst of FOR NEXT statement block with the GOTO statement The progr...

Page 58: ...2 b c 3 CHAIN another PD3 The Interpreter writes these declared variable values into the common variable area in the memory To make the chained to program refer to these values use the COMMON statemen...

Page 59: ...specify the name of an included file by using the REM INCLUDE or INCLUDE In the included files you can describe any of the statements and functions except the REM INCLUDE and INCLUDE If a compilation...

Page 60: ...gram Line 53 4 1 1 Format of a Program Line 53 1 Labels 53 2 Statements 54 3 Comments 54 4 1 2 Program Line Length 55 4 2 Usable Characters 56 4 2 1 Usable Characters 56 4 2 2 Special Symbols and Cont...

Page 61: ...ike program branching you may use labels which designate jump destinations Labels can be omitted if unnecessary Labels differ from line numbers used in the general BASIC languages that is labels do no...

Page 62: ...can describe multiple statements in one program line by separating them with a colon 3 Comments A single quotation mark or REM can begin a comment Single quotation mark A single quotation mark or apos...

Page 63: ...ays however you can write a program line of up to 8192 characters In the samples below symbol denotes a CR code entered by the carriage return key Extend a program line with an underline _ and a CR co...

Page 64: ...ase letters except for those used in a character string data All of the statements below for example produce the same effect PRINT a print a PRINT A print A When used in a character string data upperc...

Page 65: ...ent Slant Division operator Separator for date information in DATE function Less than sign Relational operator Equal sign Relational operator Assignment operator in arithmetic or string operation User...

Page 66: ...PRINT USING statement Exclamation mark Format control character in PRINT USING statement Format control character in PRINT USING statement Comma Separates parameters or arguments Line feed control cha...

Page 67: ...mple will be treated as the same label filewrite FILEWRITE FileWrite No asterisk or dollar sign should be used for a label The following label examples are invalid Label0 Label1 A label made up of onl...

Page 68: ...n and percent sign suffixes Every type of variables can contain up to 255 identifiers A reserved word cannot be used by itself for an identifier name but can be included within an identifier name An i...

Page 69: ...d Words Rules for using reserved words A reserved word cannot be used by itself for a label name a variable name or other identifiers but can be included within them The following identifiers for exam...

Page 70: ...rding to Format 65 1 String Variables 65 2 Numeric Variables 66 5 2 2 Classification of Variables 67 5 3 User defined Functions 68 5 4 Type Conversion 69 5 4 1 Type Conversion 69 5 4 2 Type Conversion...

Page 71: ...lly followed by a percent sign as shown below but the can be omitted Syntax sign decimalnumericstring Where the sign is either a plus or a minus The plus sign can be omit ted The valid range is from 3...

Page 72: ...ponent Where a lowercase letter e is also allowed instead of uppercase letter E mantissa is a numeric string composed of a maximum of 10 significant digits It can include a decimal point If included i...

Page 73: ...55 characters Non array string variables A non array string variable should be formatted with an identifier followed by a dollar sign as shown below Syntax identifier Example a bcd123 The default numb...

Page 74: ...iable should be formatted with an identifier followed by a percentage sign and a pair of parentheses as shown below Syntax identifier subscript subscript Example e 10 fg 2 3 h i j Where a pair of pare...

Page 75: ...s declared by the COMMON statement It is used to pass its value to the chained to programs Register Variables A register variable is a unique non volatile variable supported exclusively by BHT BASIC I...

Page 76: ...um length This is because the Interpreter positions returned values on the stack during execution of user defined functions so as to occupy the memory area by the maximum length size To define a funct...

Page 77: ...thmetic operator MOD Operands for logical operators AND OR NOT and XOR Parameters for functions File numbers In the type conversion from real into integer the allowable value range of resultant inte g...

Page 78: ...ression MOD realexpression Example 10 5 MOD 3 4 Where the result will become identical with 11 MOD 3 Operands for Logical Operators AND OR NOT and XOR Before executing each logical operation the Inter...

Page 79: ...is closed in each file where it is defined A variable used inside the FUNCTION or SUB function without declaration is available only within a function where it is defined You may also share variables...

Page 80: ...same name variable is used in one file where it is declared to be global and in the other file where it is not declared In those files where the variable is declared to be global by the GLOBAL statem...

Page 81: ...bove example the variable aa used in addaa and printaa will have the same value Variables with overlapping scope If your program has a global variable and a local variable with the same name in those...

Page 82: ...A vari able used inside the FUNCTION or SUB function without declaration is available only within a function where it is defined Example FUNCTION addaa x addaa aa x END FUNCTION SUB printaa x print a...

Page 83: ...rintaa x a 2 print a x printaa 5 SUB To use a as a common variable in Files 1 and 2 define the variable with the COMMON state ment in each file If a common variable declared with the COMMON statement...

Page 84: ...Operator Precedence 78 6 3 Operators 80 6 3 1 Arithmetic Operators 80 6 3 2 Relational Operators 81 6 3 3 Logical Operators 82 1 The NOT operator 82 2 The AND operator 83 3 The OR operator 83 4 The XO...

Page 85: ...c expressions and string expressions BHT BASIC has the following types of operators Operators Description Arithmetic operator Performs arithmetic operations Relational operator Compares two values Log...

Page 86: ...ving the readability of an expression you can use parentheses to separate two operators placed in succession 2 Function operations 3 Arithmetic operations 4 Relational operations 5 Logical operations...

Page 87: ...ore than one operator occurs at the same level of precedence the BHT BASIC resolves the expression by proceeding from left to right a 4 5 0 20 2 1 In the above example the operation order is as follow...

Page 88: ...s or tab codes should precede and follow the MOD If these expressions include real values the MOD first rounds them off to integers and then executes the division operation For example the MOD treats...

Page 89: ...the operation result you can control the program flow The relational operators include the following If an expression contains both arithmetic and relational operators the arithmetic operator has high...

Page 90: ...re performing the logical operation If the resultant integer value is out of the range from 32768 to 32767 a run time error will occur If an expression contains logical operators together with arithme...

Page 91: ...sets 1 to the resultant bit if at least one of those bits is 1 Syntax expression1 OR expression2 Truth Table for OR 4 The XOR operator The XOR operator XORes the same order bits in two expressions on...

Page 92: ...nt 6 3 5 String Operators A character string operator may concatenate or compare character strings Listed below are the types of character string operators available Concatenation of Character Strings...

Page 93: ...Character Strings The string operators compare two character strings according to character codes assigned to individual characters In the example below the expression a1 b1 returns the value of true...

Page 94: ...druple Size Characters Together on the Same Screen 102 7 1 5 Displaying User defined Characters 104 7 1 6 VRAM 105 7 1 7 Other Facilities for the LCD 107 7 2 Input from the Keyboard 108 7 2 1 Alphabet...

Page 95: ...r defined touch key with CONSOLE FN3 120 3 Keystroke trapping 120 7 5 4 Software Keyboard 121 1 Enabling disabling software keyboard 121 2 Displaying the software keyboard 123 3 Moving the software ke...

Page 96: ...le height 12 x 24 16 x 12 Quadruple 24 x 24 8 x 12 Two byte Kanji mode Standard size Full width Regular 16 x 16 12 x 19 Double width 32 x 16 6 x 19 Double height 16 x 32 12 x 9 Quadruple 32 x 32 6 x 9...

Page 97: ...listed below To use standard size fonts 16 dot font file To use small size fonts 12 dot font file Even without those files the half width alphanumerics and Katakana may be displayed Each of the 16 do...

Page 98: ...s may be displayed in regular size double width double height and quadruple size as listed in 1 Tone attribute Characters may be displayed in black dark gray light gray and white Switching the charact...

Page 99: ...CATE statement To obtain the current cursor position use the CSRLIN and POS functions The coordinates will differ depending upon the screen mode and font size Single byte ANK mode Standard size font L...

Page 100: ...Standard size font Be careful about the specification of line numbers in figures below A single column shown below represents an area for a half width character Double columns represent an area for a...

Page 101: ...s 93 Small size font Be careful about the specification of line numbers in figures below A single column shown below represents an area for a half width character Double columns represent an area for...

Page 102: ...is displayed within a set of the display areas shows a delimiter area that separates characters from each other and contains no display data The corresponding dots are always off Single byte ANK mode...

Page 103: ...egular Half width Kanji 16 x 16 dots Double width Half width Kanji 8 x 32 dots Double height Half width Kanji 16 x 32 dots Quadruple Full width Kanji 16 x 16 dots Regular Full width Kanji 32 x 16 dots...

Page 104: ...12 x 12 dots Double width Half width Kanji 6 x 24 dots Double height Half width Kanji 12 x 24 dots Quadruple Full width Kanji 12 x 12 dots Regular Full width Kanji 24 x 12 dots Double width Full width...

Page 105: ...e user defined cursor with the LOCATE statement If the double width character size is specified the cursor will be displayed in double width Single byte ANK mode Standard size font 12 x 12 dots Full b...

Page 106: ...ots Full block cursor Invisible Full block cursor Invisible Full block cursor Invisible Full block cursor Invisible Underline cursor In regular size Underline cursor In double width Underline cursor I...

Page 107: ...dots Full block cursor Invisible Full block cursor Invisible Full block cursor Invisible Full block cursor Invisible Underline cursor In regular size Underline cursor In double width Underline cursor...

Page 108: ...BCDEFGHabcdefgh SCREEN 1 LOCATE 1 1 PRINT If the display data is outputted to the same location more than one time as shown in the above program the BHT overwrites the old data with new data 2 Standar...

Page 109: ...OCATE 14 PRINT Small size font regular size in Kanji mode SCREEN 5 2 LOCATE 14 PRINT Small size font double width in Kanji mode 4 Regular Size and Double Height Characters Together on the Same Screen...

Page 110: ...PRINT Quadruple size in Kanji mode Switching the screen font from the standard size to small size The coordinates on which standard size fonts are displayed and one on which small size fonts are displ...

Page 111: ...ter size is switched from the regular size to double height or quadruple size then the cursor will not change its current position Assum ing the upper left corner of the current cursor position as an...

Page 112: ...i fonts in full width to be displayed in the two byte Kanji mode Enlarging condensing defined font patterns If the double width double height or quadruple size is specified the Interpreter will enlarg...

Page 113: ...ewise An address on the LCD may be specified bytewise by giving a port number in the OUT state ment and INP function The entry range of the port number is as follows Port numbering system counts start...

Page 114: ...pattern should be designated by bit 7 LSB to bit 0 MSB in the OUT statement or INP function If the bit is 1 the corresponding dot on the LCD will come ON OUT h10 h80 Set bit 7 only to 1 10h D7h D8h 1...

Page 115: ...pe The shape of a user defined cursor may be defined by using the APLOAD or KPLOAD state ment in the single byte ANK mode or two byte Kanji mode respectively In the single byte ANK mode the cursor siz...

Page 116: ...key entry system use the INP function as shown below INP h60B0 Switching between Numeric and Alphabet Entry Modes in the Alphanumeric Entry System In the alphanumeric entry system you may switch betw...

Page 117: ...e highlighted character T in this exam ple If you press any one of the function keys F1 to F8 BS C and magic keys M1 to M4 then the highlighted character T will be established The key data of both the...

Page 118: ...urned 7 2 2 Other Facilities for the Keyboard 1 Auto repeat The keys on the BHT series are not auto repeat 2 Shift key The Shift key can be switched to non lock type or lock type by selecting Nonlock...

Page 119: ...specifies the frequency of the beeper The example below sounds the musical scale of do re mi fa sol la si and do READ readDat WHILE readDat 0 TIMEA 3 BEEP 2 readDat WAIT 0 h10 READ readDat WEND DATA...

Page 120: ...OUT 1 h02 OUT 1 h01 OUT 1 h00 Turns on the indicator LED in green Turns on the indicator LED in red Turns off the indicator LED OUT 3 hXX XX 00 to 07 Sets the LCD contrast OUT 4 h00 OUT 4 h01 Sets th...

Page 121: ...can specify more than one I O device if the same port number applies To monitor keyboard buffer touch key buffer and the barcode buffer with the single WAIT statement for example describe the program...

Page 122: ...r defined touch keys You may define touch keys in arbitrary areas on the touch screen Those keys may be used in the same way as keys on the keyboard 3 Software keyboard You may use a software keyboard...

Page 123: ...em Mode refer to the BHT User s Manual In a user program use the extension function CONSOLE FN3 The sample below enables four function touch keys DATA cnFKey4 CALL CONSOLE FN3 fcFKey DATA The number o...

Page 124: ...ed to the function touch key numbered 2 Data is assigned to function touch keys as shown below by default Assigning a NULL character or string to a function touch key makes the entry of that function...

Page 125: ...ring that can display on a function touch key is listed below If your specification exceeds this length the excess will be discarded Screen mode and screen font Character enlargement Allowable length...

Page 126: ...FONT ATTRIB If you assign a character string to the same function touch key more than one time the last specification will take effect 5 Keystroke trapping You may trap the pressing of a particular f...

Page 127: ...numbered 501 in the area specified with initial coordinates 20 50 and final coordinates 180 100 and displays the character string ABCDE in standard size font in ANK quadruple DIM RECT 3 KEYNO 501 User...

Page 128: ...cannot overlap If user defined touch keys are enabled characters to be displayed on the area occupied by those touch keys cannot display Disabling those touch keys will display them 2 Canceling the us...

Page 129: ...te ment For details about the software keyboard control through output port 5 by using the OUT state ment OUT 5 X refer to Appendix D Value examples of X in OUT 5 X are listed in the table given on th...

Page 130: ...Hide Hide Display Hide Display Hide Display Hide Display Software keyboard display position Upper lower area on the screen Lower area Lower area Lower area Upper area Upper area Lower area Lower area...

Page 131: ...keyboard 2 If the software keyboard is displayed characters to be displayed on the area occupied by the keyboard cannot display Hiding the keyboard will display them 3 Moving the software keyboard If...

Page 132: ...o the touch screen device reducing power consumption It is recommended that you cut off the power when you do not need to use the touch screen OUT h6120 0 Disable touch screen 2 Getting the touch scre...

Page 133: ...8 2 5 Programming for Data Files 129 8 2 6 About Drives 131 8 3 Bar Code Device 132 8 3 1 Overview 132 8 3 2 Programming for Bar Code Device 136 8 4 Communications Device 139 8 4 1 Hardware Required f...

Page 134: ...s first use the OPEN statement to open those files Input or output data to from the opened files by issuing statements or functions to them according to their file numbers Then close those files by us...

Page 135: ...E function 8 2 2 Naming Files The name of a data file generally contains filename extension The filename can have one to eight characters the extension can have one to three characters The filename ex...

Page 136: ...hin the fields will be treated as character ASCII data Each field precedes a character count byte in binary format as described above Including that one byte the maximum length of a field is 255 bytes...

Page 137: ...rds You may declare the maximum number of records registrable in a data file by using the RECORD option in the OPEN statement as shown below OPEN work DAT AS 10 RECORD 50 FIELD 10 13 AS code 5 AS pric...

Page 138: ...efficiently but also makes the retrieval speed higher The SEARCH function searches a designated data file for specified data and returns the record number where the search data is first encountered I...

Page 139: ...sed in units of a few seconds If such occurs frequently defragment the drive The beeper sound is prolonged Keys do not work No bar code entry is possible Switching the LCD screen is delayed No data ca...

Page 140: ...ve name A or omit a drive name the BHT will open the file as a read write file The XFILE and KILL statements will ignore drive names A and B The table below lists the file access details relating to d...

Page 141: ...into the illumination range No dou ble touch reading feature is supported 2 Specifying Code 128 makes it possible to read not only Code 128 but also EAN 128 Available Code Types Default Settings 2D co...

Page 142: ...n range No double touch reading feature is supported 2 Specifying Code 128 makes it possible to read not only Code 128 but also EAN 128 Available Bar Code Types Default Settings Universal product code...

Page 143: ...character occupies two bytes BHT 100B The barcode buffer will be occupied by one operator entry job and can contain up to 99 characters Options 2D codes QR Code Model Code version Split code scanning...

Page 144: ...barcode buffer stores code data by using any of the EOF INP and LOC functions and the WAIT statement Any of the INPUT and LINE INPUT statements and the INPUT function reads bar code data stored in the...

Page 145: ...re than one 2D code type the BHT 100B can do more than one bar code type Note for Reading Data in a 2D Code for the BHT 100Q A single 2D code can contain more than hundreds of digits of data From a 2D...

Page 146: ...using the OPEN BAR statement you can control whether the indicator LED should light in green or not Default Light in green whether the beeper should beep or not Default No beep The BHT 100 may contro...

Page 147: ...ner s view on the LCD when you scan the code To set the view finder on or off you use the OUT statement Actual switching of the view finder takes place at the execution of the OPEN BAR statement Exec...

Page 148: ...he read data into the code buffer In the non edit mode each time a single split QR code is read the BHT 100Q will store the read data into the code buffer The MARK returns Q in the edit mode and S in...

Page 149: ...ommunications Setting the Communications Parameters Use the OPEN COM statement to set the communications parameters For IrDA interface Parameters other than the transmission speed are fixed Parity Non...

Page 150: ...oading data files Primary station BHT Secondary station Host computer When downloading data files Primary station Host computer Secondary station BHT Protocol functions In the BHT protocol using the f...

Page 151: ...Mode For the communications specifications of the BHT Ir protocol refer to the BHT User s Manual Primary station and secondary station The primary station and the secondary station should be defined a...

Page 152: ...the communications unit CU This utility can also transfer user program files and data files to from System Mode For computers and Windows versions which are available for Ir Transfer Utility C and the...

Page 153: ...2 Event Polling 147 1 Programming sample 147 2 I O devices capable of being monitored by the event polling 148 9 3 Error Trapping 149 1 Overview 149 2 Programming for trapping errors 150 9 4 Event of...

Page 154: ...transfer control to the error handling rou tine If a run time error occurs when this trapping ability is disabled the Interpreter will terminate the current user program while showing the error messa...

Page 155: ...bar code reader and the keyboard for occurrence of events This example uses the EOF and INKEY functions to check the data input for the bar code reader and the keyboard respectively OPEN BAR AS 1 COD...

Page 156: ...t polling For the INP function refer to Appendix D I O Ports I O Devices Monitor Means Events Keyboard INKEY function Input of one character from the keyboard Bar code reader EOF or LOC function Prese...

Page 157: ...r According to this address indication you can pinpoint the program line where the run time error has occurred The error code 34h 52 in decimal notation means that the user program attempted to access...

Page 158: ...r handling routine the ERL and ERR functions allow you to pinpoint the address where the error has occurred and the error code respectively The RESUME statement may pass control from the error handlin...

Page 159: ...ified function key is pressed in its label The KEY ON statement activates the designated function key This trapping cannot take effect until both the ON KEY GOSUB and KEY ON statements have been execu...

Page 160: ...ing keyboard input this trapping facility operates as described below Statements or Functions Keystroke Trapping INPUT statement Ignores the entry of the pressed key and causes no interrupt LINE INPUT...

Page 161: ...153 Chapter 10 Sleep Function CONTENTS 10 1 Sleep Function 154...

Page 162: ...the value preset to the sleep timer will be assigned to the internal variable again and the sleep timer will start counting While a communications device file is opened by an OPEN COM statement Durin...

Page 163: ...155 Chapter 11 Resume Function CONTENTS 11 1 Resume Function 156...

Page 164: ...ay not be assured The resume function does not work after execution of System Mode or any of the following statements END POWER OFF POWER 0 NOTE Even if you become disoriented with the operation durin...

Page 165: ...TENTS 12 1 Low Battery Warning 158 12 2 Prohibited Simultaneous Operation of the Beeper and Illumination LED 158 12 3 Wakeup Function 159 12 4 Remote Wakeup Function 160 1 Outline 160 2 Remote wakeup...

Page 166: ...e Level 2 message Charge the battery or Replace the batteries when driven by the lithium ion battery cartridge or dry bat tery cartridge respectively beeps five times and then turns itself off automat...

Page 167: ...the TIME function as follows 1 Set 1 to bit 2 on port 8 Switches the TIME function to the setting of the wakeup time 2 Retrieve the wakeup time by using the TIME function TIP If you set or retrieve th...

Page 168: ...e the remote wakeup between the BHT and host computer the following is required Optical communications unit CU 7001 CU interface cable 2 Remote wakeup operation Typical operation flow At the host comp...

Page 169: ...and whether the remote wakeup func tion is activated or deactivated ID 6 byte numeric string that refers to the lower 6 digits of the BHT product number 1 The timeout period specified in 3 Remote wak...

Page 170: ...up as listed below The default is 1 9600 bps 3 Set the timeout for ready to receive state Set the timeout length during which the BHT will wait for a WAKE character string after receiving any data via...

Page 171: ...m any other user program will per form a cold start To enable the resume function of a user program running after the termination of the remote wakeup program and its chained to programs use the exten...

Page 172: ...pendix D I O Ports Making use of the execution record you may display an alarm message This means that the BHT was cold started driven by System Mode or initialized Port No Bit 0 Bit 1 Specifications...

Page 173: ...165 Chapter 13 Backlight Function CONTENTS 13 1 Backlight Function 166...

Page 174: ...h the OUT statement activates the backlight function and turns on the backlight If no key is pressed for the time length preset to port 6021h default time 5 sec onds the backlight goes off but the bac...

Page 175: ...N duration specified by the KEY statement will be ignored Backlight OFF The backlight function is deactivated when the BHT is turned on Backlight ON Backlight OFF The backlight function remains activa...

Page 176: ...1 GOSUB 223 GOTO 225 IF THEN ELSE END IF 226 INPUT 228 INPUT 231 KEY 233 KEY ON and KEY OFF 238 KILL 240 KPLOAD 242 LET 247 LINE INPUT 248 LINE INPUT 251 LOCATE 253 ON ERROR GOTO 257 ON GOSUB and ON G...

Page 177: ...by fontarrayname to the user font area specified by characode To display user defined fonts loaded by the APLOAD you use the PRINT state ment in the single byte ANK mode If you attempt to display an u...

Page 178: ...t or quadruple size is specified user defined fonts loaded by the APLOAD will be effective The system will enlarge the dot pattern of each loaded font in double width double height or quadruple size F...

Page 179: ...and stored in the area from the 1st to 12th elements of the array If you specify cursorarrayname exceeding the allowable cursor size height no of bits width no of elements the excess will be discarded...

Page 180: ...NT CHR H80 Error code and message Meaning error 71 Syntax error No fontarrayname or cursor arrayname is defined fontarrayname or cursorar rayname has an array string vari able fontarrayname or cursora...

Page 181: ...rence Statements COMMON DEFREG DIM KPLOAD PRINT and SCREEN cp 10 cp 11 cp 0 cp 1 cp 2 cp 3 cp 4 cp 5 cp 6 cp 7 cp 8 cp 9 Bit in each array element 0 LSB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 MSB Array E...

Page 182: ...fduration is 100 msec Defaults Note that specification of 0 1 or 2 to frequency produces the special beeper effects as listed below Specification of 0 1 or 2 to frequency drives the beeper or vibrator...

Page 183: ...xecution of the subsequent statement until the beeper completes sounding or vibrating Instead the execution of the subsequent statement proceeds immediately If a second BEEP statement is encountered w...

Page 184: ...lz BEEP bon count helz BEEP boff count helz BEEP bon boff BEEP bon count BEEP boff count BEEP bon helz BEEP boff helz BEEP count helz BEEP bon BEEP boff BEEP count BEEP helz BEEP Error code and messag...

Page 185: ...me realparameter A numeric expression or a string expression Description Calling an extension library FN3 function CALL calls a function specified by functionnumber from a file specified by drivename...

Page 186: ...le Reserve a storage area for a returned string variable by using a variable declara tion statement DIM COMMON or DEFREG It is not necessary to assign arbi trary data of the string length required for...

Page 187: ...address but by value So called Call by value Syntax errors NOTE Before any call to a SUB function you need to place definition of the SUB function or declaration of the SUB function by using the DECL...

Page 188: ...tension is not FN3 05h Parameter value out of range In calling an FN3 function the number of parameters exceeds 16 07h Insufficient memory space You nested calling statements of a user defined functio...

Page 189: ...rivename programfilename is an executable object program compiled by the Compiler and has the extension PD3 as shown below The extension PD3 cannot be omitted CHAIN prog1 PD3 You should download an ex...

Page 190: ...1 Syntax error drivename programfile name is not enclosed in double quotes Error code Meaning 02h Syntax error drivename programfilename is in incorrect syntax or the extension is not PD3 07h Insuffic...

Page 191: ...User programs can no longer refer to the erased data CLFILE cannot erase data in files stored in drive B Syntax errors Run time errors CLear FILE File I O statement CLFILE Erases the data stored in a...

Page 192: ...Chapter 14 Statement Reference 184 Example OPEN master Dat AS 1 FIELD 1 20 AS bar 10 AS ky CLFILE 1 CLOSE 1...

Page 193: ...a sub sequent OPEN statement If no file number is specified the CLOSE statement closes all of the opened data files and device I O files Specifying an unopened file number causes neither operation nor...

Page 194: ...e cursor to the upper left corner of the screen The CLS statement does not affect settings made by displaymode or charaattribute in the SCREEN statement For details about display mode and charaattribu...

Page 195: ...iables used in the current program should be identical with those in the chained to pro grams If not variables having indefinite values will be passed Up to two dimensional array variables can be defi...

Page 196: ...de and message Meaning error 5 Variable name redefinition A same variable name is double declared in a program error 73 Improper string length The length of a string variable is out of the range from...

Page 197: ...string specified by constname with a string constant defined by expr before compiling expr may contain labels defined by other CONST declarations However calling those labels each other recursively w...

Page 198: ...height or quadru ple size For details about the cursor refer to Chapter 7 Subsection 7 1 3 The cursor shape specified by the most recently executed LOCATE statement takes effect After execution of LOC...

Page 199: ...xact same order that those DATA statements appear in a source program Using the RESTORE statement can read a same DATA statement more than once since the RESTORE can change a location where the READ s...

Page 200: ...ubname dummyparameter dummyparameter Parameter funcname For numerics funcname Integer function name funcname Real function name For strings funcname String function name subname Real function name dum...

Page 201: ...es You cannot make double definition to a same function name The DECLARE statement should not be defined in the block structured state ments FOR NEXT IF THEN ELSE END IF SELECT CASE END SELECT WHILE W...

Page 202: ...meter functionname For numerics functionname Integer function name functionname Real function name For strings functionname String function name where the FN can be in lowercase dummyparameter A non a...

Page 203: ...ression Therefore if a variable having the same name as dummypa rameter is used outside DEF FN statement or used as a dummyparameter of any other function in the same program then it will be independe...

Page 204: ...me but expression is a real type If functionname is a real function name and expres sion is an integer type then no error occurs stringlength is out of the range stringlength is not an integer constan...

Page 205: ...5 Example 2 DEF FNappend a b 80 a b PRINT FNappend 123 AB Error code Meaning 07h Insufficient memory space You nested DEF FN statements to more than 10 levels 0Fh String length out of the range The re...

Page 206: ...yntax 3 Exiting from the function block prematurely EXIT DEF Syntax 4 Ending the function block END DEF Syntax 5 Assigning a returned value FNfunctionname generalexpression Syntax 6 Calling a function...

Page 207: ...nt block or used as a dummyparameter of any other function in the same program then it will be independently treated In user defined functions you can call other user defined functions You can nest DE...

Page 208: ...DEF FN EXIT DEF END DEF The EXIT DEF statement is speci fied outside the function definition block The END DEF statement is specified outside the function definition block error 60 Incomplete control...

Page 209: ...defining a function but realparameter is a real type in calling the function If dummypa rameter was a real variable in defining a function and realpa rameter is an integer type then no error occurs e...

Page 210: ...ition DEFREG n3 5 6 non arraystringvariable stringlength stringconstant DEFREG s1 abc123 DEFREG s2 6 abc123 arraystringvariable subscript stringlength stringinitialvaluedefinition DEFREG s2 1 3 16 sub...

Page 211: ...the string length can be specified Defaults stringlength for non array variables 40 characters stringlength for array variables 20 characters The memory area for register variables is allocated in use...

Page 212: ...t as an initial value subscript is not an integer con stant error 73 Improper string length stringlength is out of the range error 74 Improper array element number subscript is out of the range error...

Page 213: ...Position of elements in an array DEFREG a 1 1 1 3 The elements of the above array have the following initial values a 0 0 1 a 0 1 0 a 1 0 0 a 1 1 3 DEFREG b 1 1 3 123 The elements of the above array...

Page 214: ...integer constant that has a value from 1 to 255 which indicates the number of characters Description DIM declares array variables and dimensions the arrays that a program will utilize A DIM statement...

Page 215: ...me redefinition The array declared with DIM had been already declared with DEFREG error 71 Syntax error stringlength is out of the range stringlength is not an integer constant error 72 Variable name...

Page 216: ...ations takes place depending upon whether or not any application program has been selected as an execution program to be run when the BHT is turned on in System Mode If any application program has bee...

Page 217: ...le with ERASE you can use that name to declare a new array variable with the DIM statement arrayvariablename should not include subscripts or parentheses as shown below DIM a 3 b1 5 10 c 3 20 ERASE a...

Page 218: ...eld variable You can assign a same field variable to more than one field There is no difference in usage between a field variable and a general variable except that no register variable common variabl...

Page 219: ...of the range fieldwidth out of the range 34h Bad file name or number You specified filenumber of an unopened file 36h Improper file type You specified filenumber of a file other than data files 3Ah F...

Page 220: ...alue When the value of increment is positive If the value of controlvariable is equal to or less than the final value go to step 3 If it becomes greater the finalvalue the program proceeds with the fi...

Page 221: ...T statement for an outer FOR NEXT loop executes Nested loops should not be crossed Shown below is a correctly nested sample FOR i 1 TO 10 FOR j 2 TO 100 FOR k 3 TO 1000 NEXT k NEXT j NEXT i FOR l 1 TO...

Page 222: ...ng a returned value funcname generalexpression Syntax 6 Calling a function funcname realparameter realparameter Parameter funcname For numerics funcname Integer function name funcname Real function na...

Page 223: ...tly treated In user defined functions you can call other user defined functions You can nest FUNCTION END FUNCTION statements to a maximum of 10 levels When using the FUNCTION END FUNCTION together wi...

Page 224: ...in your source program Error code and message Meaning error 64 Function redefinition You made double definition to a same function name error 71 Syntax error funcname is an integer function name but...

Page 225: ...r of the real parameters is not equal to that of the dummy parameters dummyparameter was an integer variable in defining a function but realparameter is a real type in calling the function If dummypa...

Page 226: ...Chapter 14 Statement Reference 218 Example File 1 File 2 DECLARE FUNCTION add x y FUNCTION add X Y A 1 B 2 add X Y PRINT TEST END FUNCTION C add A B PRINT C Reference Statements DECLARE TEST 3...

Page 227: ...ter than that of the record read by the preceding GET state ment If no recordnumber is specified in the first GET statement after opening of a file the first record numbered 1 in the file will be read...

Page 228: ...enumber is missing Error code Meaning 34h Bad file name or number You specified filenumber of an unopened file 36h Improper file type You specified filenumber of a file other than data files 3Ah File...

Page 229: ...s the number of characters Description GLOBAL allows variables declared by varname to be referred to or updated in other programs If a same variable name as specified inside the GLOBAL statement is al...

Page 230: ...nglength is not an integer constant error 72 Variable name redefinition A same variable name is double declared inside a same GLOBAL statement A same variable name is used for a non array variable and...

Page 231: ...e main program by any means such as by placing subroutines immediately following the END or GOTO statement in order to pre vent the main part of the program from falling into those subroutines A subro...

Page 232: ...Chapter 14 Statement Reference 224 Run time errors Reference Error code Meaning 03h RETURN without GOSUB 07h Insufficient memory space Too deep nesting Statements RETURN...

Page 233: ...you to branch anywhere in your program However you should branch only to another line in a program module or subroutine at the same pro gram level Avoid transferring control to a DEF FN block or other...

Page 234: ...entblock which follows ELSE is executed Then program control passes to the first statement after END IF You can omit either THEN block or ELSE block IF statement block should terminate with END IF whi...

Page 235: ...it is not necessary to put more than one statement in a line you can describe easy to read programs according to the logical structure making cor rection and debugging easy You can use ENDIF instead o...

Page 236: ...ENT key Then the INPUT statement assigns the typed data to variable prompt is a prompting message to be displayed on the LCD The semicolon or comma after prompt has the following meaning If prompt is...

Page 237: ...12 characters The 13th typed in literal and the following will be ignored Valid literals include 0 to 9 a minus sign and a period They should be in correct numeric data form If not INPUT statement acc...

Page 238: ...ement Reference 230 Run time errors Reference Error code Meaning 06h The operation result is out of the allowable range Numeric variable is out of the range Statements LINE INPUT and LOCATE Functions...

Page 239: ...than the allowable string length it ignores only the overflowed data and completes execution causing no run time error Reading data from a bar code device file An INPUT statement reads the scanned da...

Page 240: ...tomatically assigns a zero 0 to variable For reading of Code 39 bar codes that may encode alphabetical characters therefore special care should be taken Syntax errors Run time errors Example INPUT fil...

Page 241: ...board display key Parameter keynumber A numeric expression which returns a value from 1 to 31 and 33 to 38 stringdata A string expression which returns up to two characters or a single control code ba...

Page 242: ...ead only the first one character of the assigned two The second character remains in the keyboard buffer and can be read by the INPUT or LINE INPUT statement or INKEY or INPUT function If pressed toge...

Page 243: ...re than one KEY statement the last statement takes effect That is if you define more than one key as a backlight function on off key as shown below only the function key numbered 8 operates as a backl...

Page 244: ...he description below assigns string data a to the function key numbered 3 The default backlight function on off key combination of M4 key and shift key will be restored KEY 3 BL100 KEY 3 a The descrip...

Page 245: ...237 Example Syntax 1 KEY 1 a KEY 2 F CHR 13 KEY 3 Syntax 2 KEY 1 BL60 Reference Statements KEY OFF KEY ON and ON KEY GOSUB...

Page 246: ...ned a null string by the KEY statement is specified by the KEY ON statement the keystroke trap takes place If you specify a function key which has been defined as a backlight function on off key trigg...

Page 247: ...Error code and message Meaning error 71 Syntax error keynumber is not enclosed in parentheses Neither ON or OFF follows key number Error code Meaning 05h Parameter out of the range keynumber is out o...

Page 248: ...or B but it will be ignored The specified file will be deleted from both the data and the directory in the mem ory A file to be deleted should be closed beforehand Syntax errors Run time errors File I...

Page 249: ...241 Example CLOSE IF kyIn Y THEN KILL Master Dat END IF Reference Statements CLFILE...

Page 250: ...ined Kanji font KPLOAD loads a user defined Kanji font data defined by fontarrayname to the user font area specified by kanjicode kanjicode is a shift JIS code To display user defined Kanji fonts load...

Page 251: ...rom the 1st to 16th elements of the array Also when the double width double height or quadruple size is specified user defined fonts loaded by the KPLOAD will be effective The system will enlarge the...

Page 252: ...6 elements Each element data should be an integer and stored in the area from the 1st to 6th elements of the array If the cursor size the number of elements in an array variable wide by the number of...

Page 253: ...ts Syntax errors Run time errors Error code and message Meaning error 71 Syntax error No fontarrayname or cursor arrayname is defined fontarrayname or cursorar rayname has an array string vari able fo...

Page 254: ...F2 kp 7 H4A92 kp 8 H4A97 kp 9 H2A92 kp 10 H1FF2 kp 11 H2A92 kp 12 H4A97 kp 13 H4A92 kp 14 H8AF2 kp 15 H8802 SCREEN 1 KPLOAD HEBC0 kp PRINT CHR HEB CHR HC0 Array Elements Reference Statements APLOAD CO...

Page 255: ...e The data type of a variable and an expression must correspond Syntax errors Run time errors Assignment statement LET Assigns a value to a given variable Error code and message Meaning error 71 Synta...

Page 256: ...ata the user must press the ENT key Then the LINE INPUT state ment assigns the typed data to stringvariable A LINE INPUT statement cannot assign a numeric variable An INPUT state ment can do prompt is...

Page 257: ...i cally assigns a null string to stringvariable When any echoed back data is displayed on the LCD pressing the Clear or BS key erases the whole displayed data or a most recently typed in character of...

Page 258: ...and message Meaning error 71 Syntax error INPUT is missing Neither a comma or semicolon follows prompt prompt is not a string constant stringvariable has a numeric variable A semicolon immediately fol...

Page 259: ...ly follow a CR code If a LINE INPUT statement reads data longer than the allowable string length before reading a CR code it ignores only the overflowed data and completes exe cution causing no run ti...

Page 260: ...ssing filenumber is missing prompt is not a string constant stringvariable has a numeric variable Error code Meaning 34h Bad file name or number You specified filenumber of an unopened file 36h Improp...

Page 261: ...r shape as listed below If some parameter is omitted the current value remains active If you omit col umn for example the cursor stays in the same column but moves to the newly specified row position...

Page 262: ...bove condition the cursor moves to the 1st column of the next row from where the data appears If the double width or quadruple size is specified specification of the maximum value 1 to column moves th...

Page 263: ...Example SCREEN 0 4 Double height in ANK mode LOCATE 25 If you display data on the screen under the above condition the screen scrolls and the data appears PRINT A Switching to the regular size will m...

Page 264: ...Chapter 14 Statement Reference 256 Run time errors Example LOCATE 1 2 LOCATE xPos xCSRLIN LOCATE 2 Reference Error code Meaning 05h Parameter out of the range Functions CSRLIN and POS...

Page 265: ...quent error displays a regular run time error code and termi nates the program If ON ERROR GOTO 0 is executed inside the error handling routine the Interpreter immediately displays the regular run tim...

Page 266: ...els in the label list execution of the ON GOSUB or ON GOTO block causes no run time error and passes control to the subsequent statement You can specify any number of labels so long as a statement blo...

Page 267: ...yntax error label has not been defined label is missing Error code Meaning 05h Parameter out of the range expression is negative or greater than 255 07h Insufficient memory space The program nesting b...

Page 268: ...automatically executes KEY OFF state ment for the pressed function key before passing control to an event handling rou tine specified by label in ON KEY GOSUB statement This prevents a same event hand...

Page 269: ...of 30 levels Specifying 32 to keynumber will be ignored Syntax errors Run time errors Reference Error code and message Meaning error 71 Syntax error label has not been defined label is missing keynum...

Page 270: ...me consists of a file name and a file extension The file name should be 1 to 8 characters long Usable characters for the file name include alphabet letters numerals a minus sign and an underline _ Not...

Page 271: ...filelength is omitted the default file size is 1000 records Syntax errors Run time errors Reference Error code and message Meaning error 3 missing No double quote precedes or follows drivename filenam...

Page 272: ...bar code device file has been opened with the OPEN BAR statement pressing the trigger switch 1 turns on the illumination LED 2 and makes the BHT ready to scan a bar code If the BHT reads a bar code su...

Page 273: ...itions only once with readcode More than one specification will result in a run time error BHT 100Q max code version for QR Codes and max no digits for bar codes will be subject to the restriction of...

Page 274: ...igger switch 1 the illumination LED 2 comes on Even if you release the switch the illumination LED 2 remains on until the bar code device file becomes closed or you press that switch again While the i...

Page 275: ...ch of them when a bar code is read successfully The BHT may also control the vibrator with beepercontrol You should describe parameters of readmode beepercontrol and LEDcontrol without any space inbet...

Page 276: ...ex is omitted the BHT can read all of MicroQR QR model 1 and QR model 2 codes by default mini code version and max code version are the minimal and maximal code versions for QR Codes to be read by the...

Page 277: ...to F and Parity is in a two byte hexadecimal 00 to FF The Code indicates the ordinal ID number assigned to the nth split code in a QR Code If the split code is the 1st one 0 30h will be written and i...

Page 278: ...ontinu ous reading mode you pull the BHT s reading window away from a code for three seconds or more Or in the auto off mode five seconds or more have passed after the BHT read a split code You turn t...

Page 279: ...it acts as a wild card To specify multi line code scanning the above syntax should be preceded by an ampersand and should be repeated by the number of lines of codes to be scanned code cannot be omitt...

Page 280: ...ts is omitted the BHT can only read the number of digits specified by mini no digits CD is a check digit Specifying a C to CD makes the Interpreter check bar codes with MOD 10 The check digit is inclu...

Page 281: ...d stop characters respectively Each of them should be an A B C or D If a question mark is specified it acts as a wild card The start and stop characters are included in the number of digits The A thro...

Page 282: ...only read the number of digits specified by mini no digits CD is a check digit Specifying a C to CD makes the Interpreter check bar codes with MOD 43 The check digit is included in the number of digit...

Page 283: ...ed the BHT can only read the number of digits specified by mini no dig its OPEN BAR AS 1 CODE K 6 12 Neither start stop characters nor check digit will be transferred to the barcode buffer To specify...

Page 284: ...a but transfer it excluding the FNC2 character s 3 FNC3 If the BHT reads a bar code containing an FNC3 character s it will regard the data as invalid and transfer no data to the barcode buffer while i...

Page 285: ...ODE A B A A or OPEN BAR AS 1 CODE A B A Example To scan a single line of universal product code EAN 8 and two lines of Code 39 codes write as follows OPEN BAR AS 1 CODE A B M M 2 2D code and multi lin...

Page 286: ...PEN BAR AS 1 CODE A B12 B21 However if the same code type same heading character s and same number of digits are specified to 1stline 2ndline or 3rdline as given below then the output order is indefin...

Page 287: ...t be read A single line code EAN 13 9012345678904 At multi line code EAN 13 9012345678904 EAN 13 1200000000003 The above single line code cannot be read if the following specification is made OPEN BAR...

Page 288: ...supplemental code 1stchara 2ndchara supplemental code 1stchara 2ndchara supplemental where code is A B or C specifying the following If code is omitted the default is all of the universal product cod...

Page 289: ...igits OPEN BAR AS 1 CODE I 6 10C Codabar NW 7 N Syntax N mini no digits max no digits startstop CD mini no digits max no digits startstop CD mini no digits max no digits startstop CD where mini no dig...

Page 290: ...y read the number of digits specified by mini no digits CD is a check digit Specifying a C to CD makes the Interpreter check bar codes with MOD 43 The check digit is included in the number of digits O...

Page 291: ...y such as FNC CODEA CODEB CODEC and SHIFT characters it will not transfer the data to the barcode buffer The beeper sounds only if it is activated FNC characters will be handled as follows 1 FNC1 The...

Page 292: ...top mini no digits max no digits CD startstop mini no digits max no digits CD startstop where mini no digits and max no digits are the minimum and maximum numbers of digits for bar codes to be read by...

Page 293: ...ht Error code Meaning 02h Syntax error readcode is missing 05h Parameter out of the range readcode is not correct 37h File already open 3Ah File number out of the range 45h Device files prohibited fro...

Page 294: ...meter baud For the IrDA interface 115200 57600 38400 19200 9600 or 2400 For the direct connect interface 115200 57600 38400 19200 9600 4800 2400 1200 600 or 300 parity N E or O charalength 8 or 7 stop...

Page 295: ...For details refer to the BHT User s Manual COM may be in lowercase as shown below OPEN com AS 8 If you attempt to open both the IrDA communications device file and bar code device file concurrently a...

Page 296: ...maximum waiting time length until the CS signal goes ON after the BHT becomes ready to send data It should be 0 to 255 in increment of 100 ms Specification of zero 0 causes no timeout To make the dir...

Page 297: ...meter 37h File already open 3Ah File number out of the range 45h File already open You attempted to open the bar code device file and the IrDA interface of the communications device file concurrently...

Page 298: ...port specified by portnumber portnumber is not an actual hardware port number on the BHT but a logical one which the Interpreter assigns Refer to Appendix D I O Ports If bits not assigned a hardware r...

Page 299: ...me errors Example OUT 3 7 The above example sets the LCD contrast to the maximum Reference Error code Meaning 05h Parameter out of the range portnumber or data is out of the range Statements WAIT Func...

Page 300: ...ement counter is a setting value of the power off counter in seconds Shown below is a sample program for turning off the power after 4800 seconds from execution of POWER statement POWER 4800 If no POW...

Page 301: ...ns off the power The execution of POWER OFF or POWER 0 deactivates the resume function if pre set Disabling the automatic power off facility POWER CONT disables the automatic power off facility Run ti...

Page 302: ...e execution of the PRINT statement If you omit data option a blank line is outputted That is the cursor moves to the first column of the next screen line Positive numbers and zero automatically displa...

Page 303: ...ter output If neither a comma nor semicolon is specified to CR LFcontrol the cur sor moves to the first column on the next screen line In any of the above cases the screen automatically scrolls up so...

Page 304: ...Chapter 14 Statement Reference 296 Syntax errors Reference Error code and message Meaning error 71 Syntax error data contains a comma or semico lon Statements LOCATE PRINT USING and SCREEN...

Page 305: ...a to a com munications device file specified by filenumber filenumber filenumber is a communications device file number assigned when the file is opened CR LFcontrol If CR LFcontrol is a comma the PRI...

Page 306: ...end one program line to more than 512 characters in a single PRINT state ment you should use an underline _ preceding a CR code not a comma pre ceding a CR code Syntax errors Run time errors Reference...

Page 307: ...ol A comma or a semicolon Description PRINT USING displays a number or a character string specified by expression or stringexpression on the LCD according to a format specified by numer icformat or st...

Page 308: ...are rounded Specifies the position of the decimal point If the number specified by expression has fewer digits than the number of digit positions specified by after the decimal point then the insuffi...

Page 309: ...nger than the stringexpression the string is left justified and padded with space if it is shorter the extra characters are truncated Below are statement examples containing incorrect formatting strin...

Page 310: ...PRINT USING statement executes For details refer to the CR LFcontrol in the PRINT statement Syntax errors Error code and message Meaning error 71 Syntax error numericformat is not correct expression...

Page 311: ...nt arraystringvar subscript stringlength stringinitialvaluedefinition numericinitialvaluedefinition For one dimensional numericconstant numericconstant For two dimensional numericconstant numericconst...

Page 312: ...or registerdefinition You may declare non array variables and array variables together to varname For details about registerdefinition refer to DEFREG statement Syntax errors Error code and message Me...

Page 313: ...errors Reference Statements DEFREG DIM and GLOBAL Error code Meaning 05h Parameter out of the range 07h Insufficient memory space The variable area has run out 0Ah Duplicate definition An array is dou...

Page 314: ...s omitted the default record number is one more than the last record written Record numbers to be specified do not have to be continuous If you specify record number 10 when records 1 through 7 have b...

Page 315: ...nge 07h Insufficient memory space 34h Bad file name or number You specified filenumber of an unopened file 36h Improper file type You specified filenumber of a file other than data files 3Ah Filenumbe...

Page 316: ...ce so that no run time error occurs Assigning a numeric data to a string variable The READ statement converts the numeric data into the string data type and then assigns it to the string variable Assi...

Page 317: ...hat of variables specified by the READ statement If not a run time error occurs To specify the desired DATA statement location where the READ statement should start reading data you use the RESTORE st...

Page 318: ...should be separated from it with a colon An apostrophe which may be replaced for keyword REM can begin in the first column When following any other statement an apostrophe requires no colon as a delim...

Page 319: ...DATA statements in included files If label option is omitted the default label is a DATA statement appearing first in the user program Syntax errors Reference I O statement RESTORE Specifies a DATA st...

Page 320: ...hould be put inside the error handling routine Syntax errors Error control statement RESUME Causes program execution to resume at a specified location after control is transferred to an error handling...

Page 321: ...313 Run time errors Reference Error code Meaning 14h RESUME without error RESUME statement occurs outside of an error handling rou tine Statements ON ERROR GOTO Functions ERL and ERR...

Page 322: ...nterrupt returns con trol to the program location immediately following the one where the keystroke trap occurred No label designating a return location should be specified in a RETURN state ment You...

Page 323: ...elow I O statement SCREEN Sets the display mode display angle screen mode and font size and character attributes tone character enlargement and font reverse attributes Display angle Screen mode Font s...

Page 324: ...ble width Normal SCREEN h0402 Reversed Highlighted SCREEN h0403 Double height Normal SCREEN h0404 Reversed Highlighted SCREEN h0405 Quadruple Normal SCREEN h0406 Reversed Highlighted SCREEN h0407 Ligh...

Page 325: ...values by using the following CONST definition Screen mode ANK mode Font size Standard size Display angle No rotation Tone attribute Black Character enlargement attribute Regular Font reverse attribut...

Page 326: ...4 Statement Reference 318 Example mode scMB scSmall Kanji mode small size font attrib scW2H1 scDGray Double width dark gray SCREEN mode attrib Run time errors Error code Meaning 05h Parameter out of t...

Page 327: ...If no match is found the statementblock following the CASE ELSE exe cutes and then control passes to the first statement following the END SELECT If you include no CASE ELSE control passes to the fir...

Page 328: ...nd WHILE WEND you can nest them to a maximum of 30 levels Syntax errors Run time errors Error code and message Meaning error 26 Too deep nesting error 55 Incorrect use of SELECT CASE END SELECT CASE C...

Page 329: ...the function block END SUB Syntax 4 Calling a function CALL subname realparameter realparameter Parameter subname Real function name dummyparameter A non array integer variable a non array real varia...

Page 330: ...maximum of 10 levels When using the SUB END SUB together with block structured statements DEF FN END DEF FOR NEXT FUNCTION END FUNCTION IF THEN ELSE END IF SELECT CASE END SELECT SUB END SUB and WHIL...

Page 331: ...te control struc ture SUB END SUB END SUB is missing error 94 Cannot use SUB in control structure The SUB END SUB statement is defined in other block structured state ments such as FOR and IF statemen...

Page 332: ...ile 2 DECLARE SUB add x y SUB add X Y A 1 B 2 PRINT X Y PRINT TEST END SUB CALL add A B Error code Meaning 07h Insufficient memory space You nested SUB statements to more than 10 levels 0Fh String len...

Page 333: ...to 1 in ANDbyte should be set to the values to be picked out The byte at the input port is first XORed with the XORbyte parameter Next the result is ANDed with the value of ANDbyte parameter If the f...

Page 334: ...bove statement suspends a user program until any data is inputted from the keyboard or the bar code reader Reference Error code and message Meaning error 71 Syntax error portnumber is missing ANDbyte...

Page 335: ...s to the WHILE statement Go back to step 1 to be repeated The WHILE and WEND cannot be written on a same program line If no WEND is written corresponding to the WHILE a syntax error occurs The BHT BAS...

Page 336: ...ors Reference Error code and message Meaning error 26 Too deep nesting error 57 Incorrect use of WHILE WEND WEND appears outside of the WHILE statement block error 58 Incomplete control struc ture No...

Page 337: ...nt drivename is used in conventional BHT series In the BHT 100 series it is merely for the compatibility with their specifications The drivename may be A or B but it will be ignored protocolspec proto...

Page 338: ...ber will appear in the 5 digit decimal format at the current cursor position before execution of the XFILE statement Handling of trailing space codes in a data field during file transmission Example X...

Page 339: ...ies of ENQ 20 times Retries of ENQ 120 times 3 90 sec Retries of ENQ 30 times Retries of ENQ 180 times 4 120 sec Retries of ENQ 40 times Retries of ENQ 240 times 5 150 sec Retries of ENQ 50 times Retr...

Page 340: ...the timeout values goes active RSPMT1 R S P M T 1 r s p m t 1 ABCDEFGHIJKLMNOPQRSTUVWXYZ1 2 3462 22 If you transmit a data file having the same name as that already used in the receiving station the...

Page 341: ...memory runs out 32h File type mismatch The received file is not a data file 33h Received text format not correct 34h Bad file name or number You specified filename of an unopened file 35h File not fou...

Page 342: ...gle quotes and filename As shown below if any character except for space or tab codes is placed between REM and INCLUDE in syntax 1 or between a single quote and INCLUDE in syntax 2 the program line w...

Page 343: ...335 Fatal Error Error code and message Meaning fatal error 30 Cannot find include file XXX No included file is found fatal error 31 Cannot nest include file Included files are nested...

Page 344: ...variables required only in each object If a first executed object is linked with an object where an undefined common vari able s is newly defined then an error will result Definition and initializati...

Page 345: ...CHR 346 COUNTRY 348 CSRLIN 350 DATE 351 EOF 353 ERL 355 ERR 356 ETX 357 FRE 358 HEX 359 INKEY 360 INP 361 INPUT 362 INSTR 364 INT 366 LEFT 367 LEN 368 LOC 369 LOF 371 MARK 372 MID 374 POS 376 RIGHT 3...

Page 346: ...lute value is the magnitude of numericexpression without regard to sign For example both ABS 12 34 and ABS 12 34 are equal to 12 34 If you give a real number this function returns a real number if an...

Page 347: ...rom 0 to 255 For the ASCII character codes refer to Appendix C Character Sets If stringexpression is a null string this function returns the value 0 If given a two byte Kanji character this function c...

Page 348: ...ult will be set to the 1st and 2nd characters respectively A common use for BCC is to perform block checking or to generate a BCC for a data block Block Check Character String function BCC Returns a b...

Page 349: ...341 Run time errors Error code Meaning 05h Parameter out of the range checktype is out of the range...

Page 350: ...odedata is out of the specification CHKDGT calculates the correct CD and returns it as one character string Sample coding 1 CD Data CHKDGT 494AB4458 A A and B are out of the specification of EAN or UP...

Page 351: ...as shown below The returned value will become the CD to be replaced with the dummy char acter Sample coding PRINT 4940045 CHKDGT 4940045 0 A When CDtype is H STF the length of barcodedata must be two...

Page 352: ...ecome the CD to be replaced with the dummy char acter Sample coding PRINT 12345 CHKDGT 12345 0 I When CDtype is M Code 39 the length of barcodedata must be two or more digits except for start and stop...

Page 353: ...uitable for the barcodedata Sample coding IF CHKDGT a0123 a N THEN To add a CD to barcode data Pass barcodedata followed by a dummy character and enclosed with start and stop characters to a CHKDGT as...

Page 354: ...nings in the BHT BASIC Run time errors Example To output an ACK code to a communications device file use CHR H06 The ASCII value for the ACK code is H06 PRINT 1 CHR H06 To display control codes from 8...

Page 355: ...347 To display a Kanji code use a shift JIS code as shown below The shift JIS code for is 8ABFh SCREEN 1 PRINT CHR h8A CHR hBF Reference Statements PRINT Functions ASC...

Page 356: ...20h to 127 7Fh Refer to Appendix C2 National Character Sets countrycode specifies one of the following national character sets If countrycode is omitted the default national character set is America c...

Page 357: ...remains effective in the programs chained by CHAIN statements If countrycode has more than one character only the first one takes effect If countrycode is an invalid letter other than those listed ab...

Page 358: ...r is invisible by a LOCATE statement the CSRLIN function operates For the current column number of the cursor refer to the POS function Reference CurSoR LINe I O function CSRLIN Returns the current ro...

Page 359: ...ar from 00 to 99 mm is the month from 01 to 12 and dd is the day from 01 to 31 Syntax 2 DATE sets the system date specified by date The format of date is the same as that in syntax 1 Example date 00 1...

Page 360: ...Chapter 15 Function Reference 352 Run time errors Reference Error code Meaning 05h Parameter out of the range date is out of the range Functions TIME...

Page 361: ...r of an opened device file The EOF function cannot be used for data files Specifying a data file number for filenumber causes a run time error End Of File File I O function EOF Tests whether the end o...

Page 362: ...or code Meaning 34h Bad file name or number You specified filenumber of an unopened file 36h Improper file type You specified filenumber of a data file 3Ah File number out of the range Statements INPU...

Page 363: ...with the HEX function addresses which the ERL returns correspond to ones that are outputted to the left end of the address source list in hexadecimal which may be printed out if a L option is specifie...

Page 364: ...erted from decimals to hexadecimals with the HEX function codes which the ERR returns correspond to ones that are listed in Appendix A1 Run time Errors Since the ERR function returns a significant val...

Page 365: ...ransmitted by an XFILE statement For the BHT protocol refer to the BHT User s Manual ETX is called a protocol function The initial value of a terminator ETX is 03h Syntax 2 ETX returns the current val...

Page 366: ...cated clusters For details about a cluster refer to Appendix F Memory Area The operation stack area for the Interpreter is mainly used for numeric operations string operations and for calling user def...

Page 367: ...to 32767 into the equivalent hexadecimal string which is expressed with 0 to 9 and A to F Listed below are conversion examples Run time errors HEXadecimal String function HEX Converts a decimal numbe...

Page 368: ...he LCD screen A common use for INKEY is to monitor a keystroke while the BHT is ready for bar code reading or other events If any key previously specified for keystroke trapping is pressed INKEY canno...

Page 369: ...rtnumber and returns the value For the input port numbers refer to Appendix D I O Ports If you specify an invalid value to portnumber INP returns an indeterminate value Run time errors Reference INPor...

Page 370: ...specifica tion selected by the LOCATE statement The cursor size depends upon the screen mode single byte ANK mode or two byte Kanji mode the screen font size standard size or small size and the char...

Page 371: ...ras is out of the range 34h Bad file name or number You specified filenumber of an unopened file 36h Improper file type You specified filenumber of a data file 3Ah File number out the range Statements...

Page 372: ...n returns the first character position of the search string first found startposition is the character position where the search is to begin in targetstring If you omit startposition option the search...

Page 373: ...rgetstring First character position of the search string first found If startposition is greater than the length of targetstring or 255 0 If targetstring is a null string 0 If searchstring is not foun...

Page 374: ...n by stripping off the fractional part You use INT as shown below to round off the fractional part of a real number INT realnumber 0 5 Example dat 1 5 PRINT INT dat 0 5 If numericexpression is negativ...

Page 375: ...length starting at the left side of the string If stringlength is zero LEFT returns a null string If stringlength is greater than the length of stringexpression the whole stringexpression will be retu...

Page 376: ...stringexpression that is the number of bytes in the range from 0 to 255 If stringexpression is a null string LEN returns the value 0 LEN counts a full width Kanji in the two byte code mode as two cha...

Page 377: ...des If LOC is used before execution of the first GET statement after a data file is opened it returns 1 or 0 when the data file has any or no data respectively LOcation Counter of file File I O functi...

Page 378: ...nce Error code Meaning 34h Bad file name or number You specified filenumber of an unopened file 3Ah File number out of the range 3Eh A PUT or GET statement executed without a FIELD statement No FIELD...

Page 379: ...error will occur Run time errors Reference Location Of File File I O function LOF Returns the length of a specified file File type Returned value Data file Number of written records Communications de...

Page 380: ...e representing the bar code type and the remaining two bytes indicating the number of digits of a read bar code code MARK I O function MARK Returns the bar code type and the number of digits of a read...

Page 381: ...Q If split codes are read in the non edit mode the number of digits indi cated by the returned value includes the code the number of splits and parity MARK returns a null string until bar code reading...

Page 382: ...s listed below MIDdle String function MID Returns a portion of a given string expression from anywhere in the string Conditions Returned value If stringlength option is omitted All characters from sta...

Page 383: ...375 Run time errors Reference Error code Meaning 05h Parameter out of the range Functions LEFT LEN and RIGHT...

Page 384: ...outside of the rightmost column 0 is a dummy parameter that can have any value or expression but generally it is 0 The range of the column numbers does not differ between the regular size and double w...

Page 385: ...number of characters specified by string length If stringlength is zero RIGHT returns a null string If stringlength is greater than the length of stringexpression the whole stringexpression will be re...

Page 386: ...ng for startrecord is a record number where the search is to begin in a data file The search ends when all of the written records have been searched If you omit startrecord option the search begins at...

Page 387: ...number You specified filenumber of an unopened file 36h Improper file type You specified filenumber of a file other than data files 3Ah File number out of the range 3Eh A PUT or GET statement execute...

Page 388: ...g text in the BHT protocol when a data file is transmitted by an XFILE statement For the BHT protocol refer to the BHT User s Manual SOH is called a protocol function The initial value of a header SOH...

Page 389: ...NT STR 123 LEN STR 123 To delete the leading space you should use the MID function as shown below PRINT MID STR 123 2 LEN STR 123 If numericexpression is negative STR adds a minus sign as shown below...

Page 390: ...a text in the BHT protocol when a data file is transmitted by an XFILE statement For the BHT protocol refer to the BHT User s Manual STX is called a protocol function The initial value of a header STX...

Page 391: ...rrent system time as an 8 byte string The string has the for mat below hh mm ss where hh is the hour from 00 to 23 in 24 hour format mm is the minute from 00 to 59 and ss is the second from 00 to 59 E...

Page 392: ...he same as that in syntax 1 The calendar clock is backed up by the battery For the system date refer to the DATE function For returning the current wakeup time or setting a specified wakeup time bit 2...

Page 393: ...IMEA TIMEB or TIMEC sets the count time specified by count count is a numeric value in units of 100 ms Upon execution of this function the Interpreter starts a specified timer counting down in decreme...

Page 394: ...c value If stringexpression is nonnumeric VAL returns the value 0 PRINT VAL ABC If stringexpression contains a nonnumeric in midstream VAL converts the string until it reaches the first character that...

Page 395: ...ions 390 16 3 Controlling the LCD and Touch Screen CONSOLE FN3 399 16 3 1 Function Number List of CONSOLE FN3 399 16 3 2 Detailed Function Specifications 400 16 4 Controlling system files SYSMDFY FN3...

Page 396: ...ntrol the touch screen SYSMDFY FN3 Reconfigure BHT CU systems or get set system reconfig file informa tion CRC FN3 Calculate a CRC SS FN3 Connect or disconnect the BHT to from the spread spectrum syst...

Page 397: ...uni cations software is installed to the BHT Function number Used to fcSysIGet 1 Read numeric data from System Mode settings fcSysISet 2 Write numeric data to System Mode settings fcSysSGet 3 Read str...

Page 398: ...ey 2 Assignment to M1 key R W syMkyNone 0 None 0 syMkyEnt 1 Enter key syMkyTrg 2 Trigger switch syMkySF 3 Shift key syMkyBL 4 Backlight on off function key 5 Reserved for system syM2key 3 Assignment t...

Page 399: ...ct connect interface R W syCn3 0 300 bps 6 syCn6 1 600 bps syCn12 2 1200 bps syCn24 3 2400 bps syCn48 4 4800 bps syCn96 5 9600 bps syCn192 6 19200 bps syCn384 7 38400 bps syCn576 8 57600 bps syCn1152...

Page 400: ...LnkT0 0 No timeout 1 syLnkT30 1 30 sec syLnkT60 2 60 sec syLnkT90 3 90 sec syLnkT120 4 120 sec syFldSpCn 29 Trailing spaces in a data field for direct connect interface R W sySpIgnr 0 Ignore Trim 0 sy...

Page 401: ...ON syOptData 40 Option data BHT 100Q only R W syODOff 0 OFF 0 syODOn 1 ON syLkCnt 41 Retries of establish link command R W 0 to 32767 5 syLkIntv 42 Intervals between retries of establish link command...

Page 402: ...rite numeric data to System Mode settings fcSysSGet Read string data from System Mode settings Item number PARA System menu item Attribute DATA numeric data of the sys tem menu item syVersion 1 System...

Page 403: ...m menu item specified by PARA Parameter PARA Item number of the system menu DATA String data to be specified See the System menu items list given in Function 3 Returned value None System menu items li...

Page 404: ...FN3 returns the sets of the font information by the number of elements Syntax CALL SYSTEM FN3 fcCReset Description This function resets the LAN support CU settings to the power on default Parameter N...

Page 405: ...as been established between the BHT and LAN support CU After the link has been established the BHT is transferred from the current LAN support CU onto any other CU whose link is not established syOkLk...

Page 406: ...ameter None Returned value None Note You need to open the IrDA communications device file with OPEN COM statement beforehand Run time errors fcCMdRqst Place the LAN support CU in system reconfiguratio...

Page 407: ...le fcRect 5 Draw a rectangle fcDotGet 6 Get drawn dot state fcFKey 11 Set the number of function touch keys to be enabled fcFKeyDsp 12 Set a character string to be displayed on a function touch key fc...

Page 408: ...ple Drawing a dot at the coordinates 10 50 in black DIM POINT 1 POINT 0 10 POINT 1 50 ATTRIB cnColor COLOR cnBlack CALL CONSOLE FN3 fcDot POINT ATTRIB COLOR fcDot Draw a dot POINT 0 X coordinate 0 POI...

Page 409: ...DIM RECT 3 RECT 0 3 RECT 1 5 RECT 2 100 RECT 3 60 ATTRIB cnColor COLOR cnBlack CALL CONSOLE FN3 fcLine RECT ATTRIB COLOR fcLine Draw a full line RECT 0 Initial X coordinate 0 RECT 0 199 RECT 1 Initia...

Page 410: ...ipulated in the reversed display of the current color from the MSB to LSB Example If PTN HCCCC In hex C C C C In binary 1100110011001100 BBWWBBWWBBWWBBWW where B is black and W is white The above 16 b...

Page 411: ...tax CALL CONSOLE FN3 fcRectFil RECT ATTRIB COLOR Description This function draws a filled rectangle defined by two diagonal points specified by RECT according to the attributes specified by ATTRIB and...

Page 412: ...9 RECT 1 Initial Y coordinate 0 RECT 1 303 RECT 2 Final X coordinate 0 RECT 2 199 RECT 3 Final Y coordinate 0 RECT 3 303 cnColor 0 Draw a line in the color specified by COLOR cnInvert 1 Draw a line in...

Page 413: ...Color COLOR is valid only when 0 is set to ATTRIB Returned value None fcRect Draw a rectangle RECT 0 Initial X coordinate 0 RECT 0 199 RECT 1 Initial Y coordinate 0 RECT 1 303 RECT 2 Final X coordina...

Page 414: ...mple Getting the drawn state of a dot at the coordinates 10 50 DIM POINT 1 POINT 0 10 POINT 1 50 CALL CONSOLE FN3 fcDotGet POINT COLOR Error code Meaning 05h Parameter out of the range F0h Mismatch pa...

Page 415: ...attributes specified by ATTRIB Parameter KEYNO Key number assigned to a function touch key 1 to 16 DSPDATA Character string to be displayed max 6 charac ters FONT Font to be displayed fcFKey Set the...

Page 416: ...urns a singe control code RECT Coordinates to define a touch key DSPDATA Character string to be displayed FONT Font to be used cnW1H1 0 Regular size cnW2H1 1 Double width cnW1H2 2 Double height cnW2H2...

Page 417: ...e error will occur Run time errors cnW1H1 0 Regular size cnW2H1 1 Double width cnW1H2 2 Double height cnW2H2 3 Quadruple size Error code Meaning 05h Parameter out of the range The initial coordinates...

Page 418: ...ction clears the LCD to close all of user defined touch keys Parameter None Returned value None Run time errors fcPnlGet Get coordinates on the touch screen that is pressed last POINT 0 X coordinate 0...

Page 419: ...20 take effect only when the LAN communi cations software is installed to the BHT Function number Used to fcMdBVGet 1 Get version of BHT system reconfig file fcMdBDo 2 Reconfigure BHT system fcMdBNGet...

Page 420: ...Syntax CALL SYSMDFY FN3 fcMdBDo FILE OPT Description This function automatically reconfigures the BHT system by using the BHT system reconfig file specified by FILE Parameter FILE Filename OPT Task a...

Page 421: ...f the BHT sys tem reconfig file to be used in System Mode Parameter FILE Filename consisting of drive name and file name max 14 characters Drive name omissible Returned value None Syntax CALL SYSMDFY...

Page 422: ...stem reconfig file to be used in System Mode in FILE Parameter None Returned value FILE Filename consisting of drive name and file name max 14 characters No drive name might be returned Syntax CALL SY...

Page 423: ...by STRING1 STRING2 STRING8 and returns the calculation result in CRC Up to eight character strings may be specified by assigning them to non array string variables Parameter STRING1 STRING2 STRING8 N...

Page 424: ...to eight character strings may be specified by assigning them to non array string variables Parameter STRING1 STRING2 STRING8 Non array string variables that are operands of CRC gen eration Returned...

Page 425: ...pectrum wireless block CONTENTS 17 1 Overview 418 17 2 Programming for Spread Spectrum Communication 420 17 3 Spread Spectrum Communications related Statement 421 17 4 Spread Spectrum Communication Li...

Page 426: ...ng the BHT For details refer to the BHT User s Manual Spread spectrum communications device Main system User programs written in BHT BASIC Logical device file BHT with a spread spectrum wireless block...

Page 427: ...equent opening and clos ing of the device will require much time resulting in slow response Take into account the appli cation purposes of user programs when programming When the spread spectrum commu...

Page 428: ...Spread Spectrum Communications related Statement 2 Spread spectrum library SS FN3 for controlling the spread spectrum communications device Refer to Section 17 4 Spread Spectrum Communication Library...

Page 429: ...error Refer to Chapter 14 Statement Reference Run time errors OPEN COM3 Open a spread spectrum communications device file Error code Meaning 02h Syntax error 37h File already open 3Ah File number out...

Page 430: ...run time error may occur when you set or refer to spread spectrum related parameters In such a case set or refer to them again Function Number List of SS FN3 Function number Used to fcParaIGet 1 Read...

Page 431: ...setting speci fied by PARA Parameters PARA Item number Returned value DATA Integer read from the specified wireless block setting Correspondence table Run time errors fcParaIGet Read integer from the...

Page 432: ...ParaSGet Read string from the wireless block parameter Item number PARA Wireless block parameter Parameter value DATA ssFWVerGet 1 Wireless block firmware version Character string 4 bytes ssMACIDGet 2...

Page 433: ...ake effect at execution of an OPEN COM3 statement first encountered after the parameter setting The above parameter should be set with the IrDA communications device file and spread spectrum communica...

Page 434: ...file being closed The allowable entry range of the ASCII codes is from 20h to 7Eh If you set to DATA the default will apply Run time errors fcParaSSet Write string to the wireless block parameter Ite...

Page 435: ...e with the master within the spec ified time the program will set 1 to ASSOC to end the checking opera tion If zero 0 is specified to TIMEOUT this function will check synchroni zation with the master...

Page 436: ...vice 436 18 2 2 Programming Notes for Socket API According to UDP 437 18 2 3 Programming Notes for TCP IP Communication 439 18 2 4 Sample Program 441 18 3 TCP IP over IrDA Communication System 442 18...

Page 437: ...18 5 3 Using FTP Client 465 1 Basic Procedure 465 2 Configuring FTP Client 465 3 Calculating Memory Requirements 466 4 Optimizing Drive Recommended 467 5 FTP Transfers 467 18 6 Socket Library SOCKET...

Page 438: ...tocols over the spread spectrum communication system or IrDA com munication system respectively SOCKET FN3 This library implements a subset of the BSD4 4 socket application program interface API FTP F...

Page 439: ...For the procedure in System Mode refer to the BHT User s Manual For the details of the SS FN3 refer to Section 17 4 Spread Spectrum Communication Library SS FN3 in this manual If no system settings a...

Page 440: ...FN3 refer to Section 18 6 Socket Library SOCKET FN3 Given below is a setting example with SOCKET FN3 my addr 192 168 0 125 IP address of the BHT subnetmask 255 255 255 0 Subnet mask gateway 0 0 0 0 D...

Page 441: ...interface Specify communications pathway SOCKET FN3 function 40 Returns value in interface The returned value will be used in 6 and 8 4 Open Spread Spectrum Communications Device Use the OPEN COM3 sta...

Page 442: ...e master will take a few seconds When a wireless block tries to synchronize with a new master in roaming When a wireless block is moved out of the radio wave area with the master When a wireless block...

Page 443: ...3 in interface b Use user defined values provided by the application with the extension library SOCKET FN3 Refer to Section 18 6 Socket Library SOCKET FN3 Given below is an example using SOCKET FN3 m...

Page 444: ...returned value of 3 in interface 9 Close Spread Spectrum Communications Device Use the CLOSE statement in BHT BASIC Closing the device will power off the wireless block For details about the CLOSE st...

Page 445: ...etransmission controls at each of the BHT and host BHT s retransmission control for a transmission error Assume that the BHT uses the protocol of receiving transmission completion message from the hos...

Page 446: ...for waiting a transmission completion message it will transmit the unsent message again Normal end Transmission error in a message sent from the host BHT Disconnect Host Data message Transmission com...

Page 447: ...should be carried out 2 Use the RESUME statement for transferring control to the main program 3 Close the socket 4 Disconnect the TCP IP communications pathway 5 Close the spread spectrum communicati...

Page 448: ...retransmission times and is controlled by SOCKET FN3 function 24 option 26 Example Sock Err Socket error handling routine print ERR hex err code Display error code print ERL hex err line Display error...

Page 449: ...e SOCKET FN3 function 3 sock stts 4 Set 4 to socket processing number return Err TCP Error interrupt processing Control transferred to this step if an error occurs err code ERR Get error number err li...

Page 450: ...r program Number of retries of establish link command and intervals between retries for LAN sup port CU Number of retries of release link command and intervals between retries for LAN support CU Link...

Page 451: ...he SOCKET FN3 refer to Section 18 6 Socket Library SOCKET FN3 Given below is a setting example with SOCKET FN3 my addr 192 168 0 125 IP address of the BHT subnetmask 255 255 255 0 Subnet mask gateway...

Page 452: ...ink layer call socket fn3 fcTSetup iftype layermode interface Specify communications pathway SOCKET FN3 function 40 Returns value in interface The returned value will be used in 5 and 7 4 Open IrDA Co...

Page 453: ...3 in interface b Use user defined values provided by the application with the extension library SOCKET FN3 Refer to Section 18 6 Socket Library SOCKET FN3 Given below is an example using SOCKET FN3 m...

Page 454: ...IP communications pathway SOCKET FN3 function 43 Use the returned value of 3 in interface 8 Close IrDA Communications Device Use the CLOSE statement in BHT BASIC Closing the device will power off the...

Page 455: ...to Subsection 18 2 2 18 3 3 Programming Notes for TCP IP Communica tion When using an IrDA communications device observe same programming notes as those given for a spread spectrum communications dev...

Page 456: ...I 0 TO 254 STEP 1 SENDBUFF I CHR I NEXT I TCP STTS 0 ON ERROR GOTO 0 Disable error trapping ON ERROR GOTO TCP ERR Enable error trapping Set TCP IP parameters IFTYPE 0 Specify COM1 LAYERMODE 2 Specify...

Page 457: ...ption socket identifier set Add socket identifier to read socket identifier set Equivalent to BSD4 4 socket API FD_SET macro CALL SOCKET FN3 fcFDSET SOCKFD R SOCKSET Wait for changes in socket identif...

Page 458: ...RSUB ON ERROR GOTO 0 ON ERROR GOTO ERRSUB2 IF TCP STTS 2 THEN CALL SOCKET FN3 fcClose SOCKFD Close socket END IF IF TCP STTS 1 THEN CALL SOCKET FN3 fcTDiscnn INTERFACE Disconnect TCP IP communications...

Page 459: ...ollowing flowcharts show the BSD4 4 socket API calls for the two communications proto cols required for the TCP IP transport layer transmission control protocol TCP for streams and user datagram proto...

Page 460: ...452 User Datagram Protocol UDP socket bind sendto select recvfrom close socket bind listen select recvfrom sendto close Client Server...

Page 461: ...E SOCKSET 41 Exception socket ID set Sample subroutine for TCP client TCPCLIENT Create send data FOR I 0 TO 254 STEP 1 SENDBUFF I CHR I NEXT I Create TCP socket Equivalent to BSD4 4 socket API functio...

Page 462: ...I select function MAXFD SOCKFD 1 Specify number of socket identifiers TIMEOUT 360 Specify 6 minute 360 second timeout CALL SOCKET FN3 fcSelect MAXFD R SOCKSET W SOCKSET E SOCKSET TIMEOUT RESULT IF RES...

Page 463: ...7 UDP protocol CALL SOCKET FN3 fcSocket FAMILY TYPE PROTOCOL SOCKFD Convert IP address Equivalent to BSD4 4 socket API inet_addr function IPADDRESS 192 100 100 001 Specify server IP address CALL SOCKE...

Page 464: ...KSET E SOCKSET TIMEOUT RESULT IF RESULT 0 THEN Timeout occurred Processing for timeout END IF Get socket identifier status from read socket identifier set Equivalent to BSD4 4 socket API FD_ISSET macr...

Page 465: ...error may occur In the sample below when the 65th socket is created a run time error error code h218 may occur indicating too many sockets created Example main Main program on error goto Err TCP Prepa...

Page 466: ...et fn3 fcTDiscnn interface Disconnect TCP IP communications pathway Use SOCKET FN3 function 43 goto loop Conditional branch to get out of loop loop_end close hCom3 Close spread spectrum communications...

Page 467: ...or directory and file specifications in particular 18 5 2 File Formats The FTP client classifies files into three types by their extensions user programs PD3 extension libraries FN3 and EX3 and data f...

Page 468: ...length format The number required is 128 less the number of bytes in the last record Aside To conserve memory and boost performance the BHT packs a pair of ASCII bytes into a single byte by convertin...

Page 469: ...maintain the fixed length format The number required is 130 less the number of bytes in the last record Aside When downloading extension libraries the BHT uses 128 bytes out of 130 bytes of record le...

Page 470: ...1 to 16 fields each 1 to 254 bytes long The sum of the field lengths and the number of fields however must not exceed 255 If the actual record length is different from the specified record length The...

Page 471: ...20h CR LF CR LF CR LF Specified record length Specified record length Specified length Record 1 Record 2 Record 3 Record 1 Record 2 Short Short with trailing spaces As is As is Truncated further Spac...

Page 472: ...ore any line delimiters inside downloaded data records treating them as data Note however that the specified line delimiters must appear in the specified positions between records Otherwise the FTP cl...

Page 473: ...3 Use a BHT BASIC OUT statement to optimize the drive The rest of the procedure is the same as in Section 18 2 TCP IP over Spread Spectrum Sys tem The key step is to use the FTP FN3 for the file tran...

Page 474: ..._UP HFS 128 LDS 64 MEM ROUND_UP BFS 4096 4096 Example File size of 12 345 bytes on operating system using CR LF combination BFS ROUND_UP 12345 128 2 64 ROUND_UP 94 96 64 6080 MEM ROUND_UP 6080 4096 40...

Page 475: ...Recommended File system delays can sometimes retard file FTP downloads The surest way to prevent such delays is to use a BHT BASIC OUT statement to optimize the drive Another reason for recommending...

Page 476: ...gether with their memory requirements Description Variable name Size in bytes Internet address IPADDRESS min 15 Subnet mask SUBNETMASK min 15 Default gateway GATEWAY min 15 Receive buffer RECVBUFF 1 t...

Page 477: ...network short 2 bytes to host byte order ntohs fcReadv 13 readv fcRecv 14 Receive data sent to the specified TCP socket recv fcRcvfrom 15 Receive data sent to the specified UDP socket recvfrom fcResv...

Page 478: ...t TCP IP communications pathway with system settings Unique to BHT fcTCnnUsr 42 Connect TCP IP communications pathway with user settings Unique to BHT fcTDiscnn 43 Disconnect TCP IP communications pat...

Page 479: ...ers SOCKFD Socket identifier FAMILY Protocol family PORT Port ADDRESS Local address for connection IPADDRESS Internet address in dotted quad notation The protocol family FAMILY must be 2 the value ind...

Page 480: ...socket soINet 2 ARPA Internet protocols Error code Meaning 105h Power off detected 106h An internal error has occurred in the TCP IP module during data transmission 107h The TCP IP module has not bee...

Page 481: ...soKepAliv 2 Keep alive timer enable disable soDisable 0 Disabled soEnable 1 Enabled Option Number OPTNAME Description Values for Option OPTION soSndBuff 8 Transmit buffer size byte 1 to 8192 soRcvBuf...

Page 482: ...PADDRESS ADDRESS Description This function converts an Internet address in dotted quad notation to a 4 byte Internet address BSD4 4 socket API equivalent This function is equivalent to the BSD4 4 sock...

Page 483: ...umber of bytes to receive RECVMODE Receive mode RECVFLAG Storage method optional The receive buffer RECVBUFF can be either a string non array or string array variable The maximum size for a string is...

Page 484: ...mission 107h The TCP IP module has not been initiated 108h The memory for the TCP IP module has became insufficient dur ing data transmission 209h Socket identifier is invalid 216h A parameter is inva...

Page 485: ...gs 1 2 3 4 5 125 126 127 128 1 2 3 4 4 5 6 7 8 9 0 1 2 2 3 4 5 4 5 6 7 8 8 9 0 1 Element 1 Element 3 Element 4 Element 0 Element 7 0 Strings 1 2 3 4 5 125 126 127 128 1 2 3 4 4 5 6 7 6 7 8 9 0 0 1 2 3...

Page 486: ...2 bytes After receiving remaining 512 bytes Element 0 Element 7 Strings 1 2 3 4 5 125 126 127 128 Element 0 Element 7 0 1 2 3 4 5 125 126 127 128 1 2 3 4 4 5 6 7 8 9 0 1 2 2 3 4 5 4 5 6 7 8 8 9 0 1 El...

Page 487: ...one of the following values The protocol family FAMILY must be 2 the value indicating the ARPA Internet protocols The storage method RECVFLAG is required for a string array buffer It is ignored for a...

Page 488: ...he TCP IP module has not been initiated 108h The memory for the TCP IP module has became insufficient dur ing data transmission 209h Socket identifier is invalid 216h A parameter is invalid 228h The m...

Page 489: ...set to monitor for write EXCEPTFDSET Socket identifier set to check for exception conditions TIMEOUT Waiting period in seconds The waiting period TIMEOUT must be one of the following values Return va...

Page 490: ...lent This function is equivalent to the BSD4 4 socket API FD_SET macro Parameters SOCKFD Socket identifier SOCKFDSET Socket identifier set Return value None Syntax CALL SOCKET FN3 fcFDCLR SOCKFD SOCKF...

Page 491: ...buffer to the IP address and port number connected to the specified socket identifier BSD4 4 socket API equivalent This function is equivalent to the BSD4 4 socket API sendto function Parameters SOCKF...

Page 492: ...e memory for the TCP IP module has became insufficient dur ing data transmission 209h Socket identifier is invalid 216h A parameter is invalid 228h The maximum number of bytes to receive is too small...

Page 493: ...d quad notation The transmit buffer SENDBUFF can be either a string non array or string array variable The maximum size for a string non array is 255 bytes for a string array 1472 The transmit mode SE...

Page 494: ...abled soEnable 1 Enabled Option Number OPTNAME Description Values for Option OPTION Initial values soSndBuff 8 Transmit buffer size byte 1 to 8192 8192 soRcvBuff 9 Receive buffer size byte 1 to 8192 8...

Page 495: ...HOWTO must be one of the following values Return value None Run time errors fcShutdwn Shut down socket soSdRecv 0 Receive soSdSend 1 Transmit soSdBoth 2 Both Error code Meaning 105h Power off detecte...

Page 496: ...e TYPE must be one of the following values The protocol layer PROTOCOL must be one of the following values Return value SOCKFD Socket identifier Run time errors fcSocket Create socket soINet 2 ARPA In...

Page 497: ...me errors fcClose Close socket Error code Meaning 105h Power off detected 106h An internal error has occurred in the TCP IP module during data transmission 107h The TCP IP module has not been initiate...

Page 498: ...device IFTYPE must be one of the following val ues The link layer LAYERMODE must be 2 the value indicating an Ethernet client Return value INTERFACE Communications pathway Run time errors fcTSetup Sp...

Page 499: ...n time errors fcTCnnSys Connect TCP IP communications pathway with system settings Error code Meaning 34h Communications device file not open 101h Cannot connect to communications pathway 102h Communi...

Page 500: ...quad notation GATEWAY Default gateway in dotted quad notation Return value None Run time errors fcTCnnUsr Connect TCP IP communications pathway with user set tings Error code Meaning 34h Communicatio...

Page 501: ...munications pathway Error code Meaning 104h Communications pathway already disconnected 105h Power off detected 216h A parameter is invalid 503h The CU has been linked with any other BHT 504h LAN supp...

Page 502: ...riod in milliseconds 100 ms resolution The socket state PATTERN must be h0020 the value indicating that the opposite end has sent FIN to close the socket Only TCP sockets sup port this function Note S...

Page 503: ...0 to 12 0 to 12 Field lengths FLD 1 to 64 48 FTP parameter FTP PARA Function Number Description FTP Commands fcFTPOpnS 1 Open FTP client session with system settings USER PASS fcFTPOpnU 2 Open FTP cli...

Page 504: ...articular non standard command This reply is useful only to the human user 215 NAME system type Where NAME is an official system name from the list in the Assigned Numbers document 220 Service ready f...

Page 505: ...command line too long 501 Syntax error in parameters or arguments 502 Command not implemented 503 Bad sequence of commands 504 Command not implemented for that parameter 530 Not logged in 532 Need ac...

Page 506: ...P client session with system settings Error code Meaning 105h Power off detected 106h An internal error has occurred in the TCP IP module during data transmission 107h The TCP IP module has not been i...

Page 507: ...ions REPLY Server response to FTP command Run time errors fcFTPOpnU Open FTP client session with user settings Error code Meaning 105h Power off detected 106h An internal error has occurred in the TCP...

Page 508: ...ors fcFTPClos Close FTP client session Error code Meaning 105h Power off detected 106h An internal error has occurred in the TCP IP module during data transmission 107h The TCP IP module has not been...

Page 509: ...ited to 255 bytes so do not use longer directory names on the server fcPWD Get current directory on FTP server Error code Meaning 105h Power off detected 106h An internal error has occurred in the TCP...

Page 510: ...Change current directory on FTP server Error code Meaning 105h Power off detected 106h An internal error has occurred in the TCP IP module during data transmission 107h The TCP IP module has not been...

Page 511: ...ne delimiters in records and trailing spaces in fields Note CRLF MODE will be ignored for files except data files fcRETR Download file from FTP server ftCRLF 0 CR LF combination Treat CR LF combinatio...

Page 512: ...ame as on server CRLF TYPE ftCR Server line delimiter LF CRLF MODE ftRcdSepa Data composition There are no line delimiters in the data FLD 3 2 1 Field lengths 3 2 1 CALL FTP FN3 fcRETR FTPHANDLE SERV...

Page 513: ...h cancel C key 49h Invalid program file received Invalid program size Do not down load user programs that have been run through Kanji conversion utilities 105h Power off detected 106h An internal erro...

Page 514: ...e the DISP MODE under function 6 Return value REPLY Server response to FTP command Example Uploading data file CLNT FNAME MASTER1 DAT Name of file on BHT SERV FNAME Name on server Same as on BHT CRLF...

Page 515: ...or has occurred in the TCP IP module during data transmission 107h The TCP IP module has not been initiated 108h The memory for the TCP IP module has became insufficient dur ing data transmission 110h...

Page 516: ...P PARA ftCRLFTyp 5 Line delimiter 0 CR LF 1 LF 2 CR 3 None ftCRLFMd 6 Treatment of line delimiters inside records 0 separators 1 data ftUpMd 7 Upload mode 0 overwrite 1 append ftDispMd 8 Progress disp...

Page 517: ...current directory on the FTP server Parameters FTPHANDLE FTP client handle OLD FNAME Name before change NEW FNAME Name after change Return value REPLY Server response to FTP command Run time errors f...

Page 518: ...PORT Set port number for file transfer Error code Meaning 105h Power off detected 106h An internal error has occurred in the TCP IP module during data transmission 107h The TCP IP module has not been...

Page 519: ...command Run time errors fcDELE Delete file from FTP server Error code Meaning 105h Power off detected 106h An internal error has occurred in the TCP IP module during data transmission 107h The TCP IP...

Page 520: ...er Set 527 C2 National Character Sets 528 Appendix D I O Ports 529 Appendix E Key Number Assignment on the Keyboard 540 Appendix F Memory Area 541 Appendix G Handling Space Characters in Downloading 5...

Page 521: ...ubscript is out of the array Or the array is referenced by different dimensions 0Ah Duplicate definition An array is double defined 0Bh Division by zero 0Ch CASE and END SELECT without SELECT 0Dh END...

Page 522: ...nt executed without a FIELD statement 3Fh Bad record number The record number is out of the range 40h Parameter not set ID not set 41h File damaged 42h File write error You attempted to write onto a r...

Page 523: ...ing assigned an address 225h The last close operation for the specified socket is not complete 228h The maximum number of bytes to receive is too small 229h The specified socket does not match the con...

Page 524: ...400h Failed to get the setting value Failed to set the value 401h Failed to open a spread spectrum communications device file 503h The CU has been linked with any other BHT 504h LAN support CU setting...

Page 525: ...ce for object file fatal error 14 Out of disk space for token file fatal error 15 Out of disk space for relocation information file fatal error 16 Out of disk space for cross reference file fatal erro...

Page 526: ...me fatal error 33 Preprocess Source file I O error fatal error 34 Preprocess Internal memory overflow fatal error 35 Preprocess Macro work file I O error fatal error 36 Preprocess Macro double defined...

Page 527: ...iable register variable or common variable error 8 Too many variables work integer non array error 9 Too many variables work float non array error 10 Too many variables work string non array error 11...

Page 528: ...er array two dimensional error 30 Too many variables register float array two dimensional error 31 Too many variables register string array two dimensional error 32 Too many variables common integer a...

Page 529: ...use of DEF FN EXIT DEF END DEF error 60 Incomplete control structure DEF FN END DEF error 61 Cannot use DEF FN in control structure error 62 Operator stack overflow error 63 Inside function definitio...

Page 530: ...missing error 88 TO missing error 89 INPUT missing error 90 missing error 91 Improper initial value for integer variable not integer or out of range error 92 Incorrect use of SUB EXIT SUB or END SUB e...

Page 531: ...ny records in symbol table Too many modules Too many libraries Too many objects Failed to allocate memory in TAG area Failed to allocate memory in link TAG area Undefined value set to variable type Va...

Page 532: ...e One dimensional array string work variable One dimensional array integer register variable One dimensional array float register variable One dimensional array string register variable Two dimensiona...

Page 533: ...ctname Cannot find object to be updated objectname Module already defined modulename Filename area too large Too many block information pieces Cannot open library file Seek error Cannot move to the fi...

Page 534: ...CSRLIN CURSOR D DATA DATE DEF DEFREG DIM E ELSE END EOF ERASE ERL ERR ERROR ETB ETX EXIT F FIELD FN FOR FRE G GET GO GOSUB GOTO H HEX I IF INCLUDE INKEY INP INPUT INSTR INT K KEY KILL KPLOAD L LEFT LE...

Page 535: ...state ment Refer to APLOAD statement in Chapter 14 NOTE 2 Characters assigned to codes 20h to 7Fh are default national characters when the English message version is selected on the menu screen in Sys...

Page 536: ...haracter set is America code A or Japan code J depending upon the English or Japanese message version selected on the menu screen in System Mode respec tively Listed below are national characters whic...

Page 537: ...yboard buffer and touch key buffer 0 No data pvEvKeyOn 1 Data stored 1 Barcode buffer 0 No data pvEvBarOn 1 Data stored 2 Trigger switch 1 0 OFF pvEvTrgOn 1 ON 3 Receive buffer 0 No data pvEvtCmOn 1 D...

Page 538: ...eup function 2 TIME function 0 System time selected pvWupTmSt 1 Wakeup time selected 3 Wakeup time 0 Not set pvWupTmOn 1 Set pnBarRrd Fh 7 0 Re read prevention enabled time 6 0 255 10h 1DBFh 7 0 VRAM...

Page 539: ...ivated 1 Vibrator 0 Deactivated pvVibOn 1 Activated pnKeyEnt 60B0h 7 0 Key entry system pvKyNm 0 Numeric entry pvKyAlpNm 1 Alphanumeric entry pnKeyMd 60B1h 7 0 Key entry mode pvKMNm 0 Numeric pvKMAlp...

Page 540: ...l pvScInv 1 Reversed 3 1 Character enlarge ment 20 000 Regular size pvScW2H1 001 Double width pvScW1H2 010 Double height pvScW2H2 011 Quadruple size 7 4 Tone 20 7 4 0000 3 0 0000 Black 7 4 0100 3 0 00...

Page 541: ...s If the returned value is zero 0 it means that the re read prevention is permanently enabled so that the BHT does not read same bar codes in succession 7 An 8 bit binary pattern bits 7 to 0 on the in...

Page 542: ...on port 60E1h The range of the returned value is from 1 to FFFFh The actu ally allowable maximum value is the size of the empty user area If a value exceeding the size is returned it means that the wh...

Page 543: ...ware keyboard function pvAlpOff 0 Disable pvAlpOn 1 Enable 1 Software keyboard display 0 Hide pvAlpDisp 1 Display 2 Software keyboard display position on the screen pvAlpBotm 0 Lower area pvAlpTop 1 U...

Page 544: ...On 1 Activate pnKeyEnt 60B0h 0 Key entry system pvKyNm 0 Numeric entry pvKyAlpNm 1 Alphanumeric entry pnKeyMd 60B1h 0 Key entry mode pvKMNm 0 Numeric pvKMAlp 1 Alphabet pnBprVolm 60C0h 1 0 Beeper volu...

Page 545: ...disables the sleep timer feature Refer to Chapter 10 OUT 6 30 3 seconds OUT 6 0 No sleep operation 4 To activate the wakeup function set 1 to this bit to deactivate it set 0 pnRwuSpd 60F1h 2 0 Transm...

Page 546: ...uired for powering off the BHT The setting range is from 0 1 to 25 5 seconds in increments of 0 1 second The default is 5 0 5 second 12 You can set the communications protocol type for transmitting fi...

Page 547: ...ion and the previous screen will come back To defragment the drive while showing a relative bar graph write as follows OUT h60E2 1 Defragment the drive showing relative bar graph 18 To activate the re...

Page 548: ...low Default Data Assignment The default data assignment is shown below 1 BS CR and C are a backspace 08h carriage return 0Dh and cancel 18h code respectively 30 31 36 38 17 18 19 21 22 23 25 26 27 28...

Page 549: ...524KB Font area JIS Level 1 font 16 dot 120 KB JIS Level 2 font 16 dot 112 KB JIS Level 1 font 12 dot 88 KB JIS Level 2 font 12 dot 84 KB BHT 100B BHT 100BF System program area 1792KB System work area...

Page 550: ...cks up the memory with a battery cartridge Therefore data stored in the memory will not be lost if the BHT power is turned off Memory Space Available for Variables Listed below are the maximum memory...

Page 551: ...T has a new feature which can handle trailing spaces in a data field as data The figure below shows the process in which the spaces used as padding characters are elim inated Note that spaces between...

Page 552: ...oading a data file fill the unused spaces in each field with spaces and then search for the target field data Example 2 Before downloading a data file substitute any of the characters which will not b...

Page 553: ...mple 3 When specifying a field data to be searched do not include trailing spaces in a data field A B C Send data A B C Receive data A B C Data to be searched A B C Search data to be specified denotes...

Page 554: ...EM menu XFILE statement To handle trailing spaces as data specify T to protocolspec in the XFILE statement XFILE d2 dat T The figure below shows the process in which trailing spaces in a data field ar...

Page 555: ...Making a program file named APLINT PD3 allows you to enter an ID number at the start of System Mode and set the condensed System Mode which is used for maintenance of user programs To terminate the A...

Page 556: ...no Specifies the file number which opens the bar code device file Invariant allowed bar Specifies bar code reading Invariant allowed Ex M 10 20 max Specifies the maximum length of a returned string e...

Page 557: ...case chr 24 Clear key while len rt Erase all characters entered print chr 8 rt left rt len rt 1 wend case else if len rt max then Check if only numeric data should be received print kb Echo back rt rt...

Page 558: ...550 Testing the written function while 1 Infinite loop a fnbarkey 1 A 15 DL F4 and SFT F4 as escape characters print if a D and a L then print Data a else print ESC a key push endif wend end...

Page 559: ...END IF Conditionally executes specified statement blocks depending upon the evaluation of a conditional expression ON GOSUB Branches to one of specified labels according to the value of an expression...

Page 560: ...h labels DATA Stores numeric and string literals for READ state ments DECLARE Declares user defined function FUNCTION or SUB externally defined DEFREG Defines register variables DIM Declares and dimen...

Page 561: ...er defined Kanji font in the two byte Kanji mode This statement also loads a user defined cursor LOCATE Moves the cursor to a specified position and changes the cursor shape PRINT Displays data on the...

Page 562: ...vari able ON KEY GOSUB Specifies an event handling routine for keystroke interrupt Functions INKEY Returns a character read from the keyboard INPUT Returns a specified number of characters read from...

Page 563: ...UT Reads data from a device I O file into specified variables OPEN BAR Opens the bar code device file This statement also activates or deactivates the indicator LED and the beeper vibrator individuall...

Page 564: ...ent position within a specified file LOF Returns the length of a specified file SEARCH Searches a specified data file for specified data and then returns the record number where the search data is fou...

Page 565: ...position within a specified file LOF Returns the length of a specified file SOH Modifies the value of a header SOH for the BHT protocol also returns the current value of a header STX Modifies the val...

Page 566: ...es of a given string MID Returns a portion of a given string expression from anywhere in the string RIGHT Returns the specified number of rightmost charac ters from a given string expression STR Conve...

Page 567: ...n PRINT USING WRITE For interrupt handling COM OFF ON STOP GOSUB COM ON STOP OFF COM STOP STOP ON ON STCOM GOSUB For graphics and color control CIRCLE DRAW WIDTH COLOR LINE WINDOW CONSOLE POINT CSRLIN...

Page 568: ...3 207 209 245 303 ASCII code 276 284 339 346 527 558 auto off mode 138 154 265 266 267 auto repeat 110 B backlight iii 165 166 167 234 235 236 390 535 538 backlight function on off key 166 233 234 235...

Page 569: ...16 100 101 102 186 294 383 526 553 cluster 358 392 542 code mark 137 372 comment 16 53 54 57 310 334 557 COMMON 50 54 65 67 71 75 170 171 173 178 181 182 187 188 209 243 244 246 336 526 552 common va...

Page 570: ...I O file 126 185 231 232 251 252 353 555 556 557 DIM 16 65 67 170 171 173 178 205 206 207 209 222 243 244 246 304 305 522 526 552 direct connect interface 11 141 265 286 287 288 289 391 392 533 direct...

Page 571: ...462 463 464 465 466 467 495 498 499 500 501 502 503 506 509 510 511 515 FTP library 420 495 FTP server 388 430 459 467 495 496 498 499 501 502 503 506 508 509 511 515 function operation 78 function op...

Page 572: ...1 189 223 225 257 258 259 260 261 310 311 312 314 336 355 390 517 519 521 522 526 551 552 LET 247 526 552 LINE INPUT 152 190 230 234 238 248 249 250 363 371 554 LINE INPUT 131 136 147 232 251 252 354...

Page 573: ...5 OPEN 58 61 126 129 130 132 184 185 210 211 219 220 262 263 266 267 276 283 286 287 288 298 306 307 333 370 371 379 420 514 526 556 open 17 19 21 22 24 29 40 126 131 132 133 134 240 262 263 264 265 2...

Page 574: ...0 533 535 538 reserved word iv 59 60 61 310 519 526 RESTORE 191 309 311 522 526 552 RESUME 47 59 149 150 257 312 313 355 356 441 513 526 552 resume function ii 45 155 156 163 293 392 441 RETURN 47 48...

Page 575: ...7 209 221 242 245 303 304 513 SUM 340 supplemental code 135 280 symbol table 14 30 32 33 34 39 42 523 synchronization 419 422 427 434 System Mode 3 45 50 110 142 143 144 156 163 164 208 273 281 284 34...

Page 576: ...242 243 244 247 248 250 251 304 305 306 308 309 310 321 322 323 334 468 475 479 483 485 495 517 519 520 521 522 523 524 526 542 552 554 555 556 VRAM vi 105 530 533 535 538 W WAIT 111 113 136 138 147...

Page 577: ...free to send your comments regarding any errors or omissions you may have found or any suggestions you may have for generally improving the manual In no event will DENSO WAVE be liable for any direct...

Reviews: