Denso BHT-200QW Spezifikationen

Stöbern Sie online oder laden Sie Spezifikationen nach Barcodeleser Denso BHT-200QW herunter. Denso BHT-200QW Specifications Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 587
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 0
Seitenansicht 0
1 2 3 4 5 6 ... 586 587

Inhaltsverzeichnis

Seite 2

2 1.1 Software Overview 1.1.1 Software Structure of the BHT The structure of software for the BHT is shown below. The

Seite 3 - Preface

92 7.1.3 Dot Patterns of Fonts Character fontsCharacter fontsCharacter fontsCharacter fonts In the figures below, " " shows a displ

Seite 4 - How this book is organized

Chapter 7. I/O Facilities 93 Two-byte Kanji Mode • Standard-size font Half-width Kanji 8 x 16 dots (Regular)Half-width Kanji 16 x 16 dots (Double-widt

Seite 5

94 Cursor shapeCursor shapeCursor shapeCursor shape The LOCATE statement specifies the cursor shape--Underline cursor, full block cursor, or

Seite 6

Chapter 7. I/O Facilities 95 Two-byte Kanji Mode • Standard-size font ( 8 x 16 dots) In regular size Underline cursor Full block cursor Invi

Seite 7

96 7.1.4 Mixed Display of Different Screen Modes, Font Sizes, and/or Character Enlargement Sizes [1] ANK Mode and Kanji Mode Together in One Line A

Seite 8

Chapter 7. I/O Facilities 97 [3] Regular-Size and Double-Width Characters Together on the Same Screen The regular-size and double-width characters ma

Seite 9 - Chapter 1

98 7.1.5 Displaying User-defined Characters Loading a userLoading a userLoading a userLoading a user----defined fontdefined fontdefined fontdefi

Seite 10 - 1.1 Software Overview

Chapter 7. I/O Facilities 99 7.1.6 VRAM The INP function may read the VRAM data. The OUT statement writes data into the VRAM so that graphics may be d

Seite 11

100 Setting an 8Setting an 8Setting an 8Setting an 8----bit binary patternbit binary patternbit binary patternbit binary pattern The data of a

Seite 12 - 1.1.2 Overview of BHT-BASIC

Chapter 7. I/O Facilities 101 7.1.7 Displaying the System The BHT-8000 may display the shifted key icon and alphabet input icon at the right end of t

Seite 13 - 1.2 BHT-BASIC

Chapter 1. Software Overview for the BHT 3 □□□□System Programs DriversDriversDriversDrivers A set of programs which is called by the BHT-BASIC Inte

Seite 14 - BHT-BASIC 3.0?

102 Notes when displaying the system statusNotes when displaying the system statusNotes when displaying the system statusNotes when displaying the sy

Seite 15

Chapter 7. I/O Facilities 103 7.1.8 Other Facilities for the LCD Setting national characterSetting national characterSetting national characterSe

Seite 16 - Execution

104 7.2 Input from the Keyboard 7.2.1 Alphabet Entry In addition to the numeric entry from the keypad, the BHT-8000 supports software keyboard entry

Seite 17 - Chapter 2

Chapter 7. I/O Facilities 105 Alphabet Entry ProcedureAlphabet Entry ProcedureAlphabet Entry ProcedureAlphabet Entry Procedure (1) Switch to t

Seite 18

106 When no key is ready to be established, pressing any of the function keys, BS, C, ENT, and magic keys will return the key data of the pressed key

Seite 19 - Environment

Chapter 7. I/O Facilities 107 7.3 Timer and Beeper 7.3.1 Timer Functions The timer functions (TIMEA, TIMEB, and TIMEC) are available in BHT-BASIC fo

Seite 20 - 2.1.2 Required Software

108 7.4 Controlling and Monitoring the I/Os 7.4.1 Controlling by the OUT Statement The OUT statement can control the input and output devices (I/Os

Seite 21 - Procedures

Chapter 7. I/O Facilities 109 7.4.3 Monitoring by the WAIT Statement The WAIT statement monitors the input and output devices (I/Os) listed in Append

Seite 22

110 Chapter 8 Files CONTENTSCONTENTSCONTENTSCONTENTS 8.1 File Overview...

Seite 23

Chapter 8. Files 111 8.1 File Overview 8.1.1 Data Files and Device I/O Files BHT-BASIC treats not only data files but also bar code device I/Os and c

Seite 24

4 1.1.2 Overview of BHT-BASIC With BHT-BASIC, you can customize application programs for meeting your specific needs as given below. - Retrieving

Seite 25

112 8.2 Data Files 8.2.1 Overview Like user programs, data files will be stored in the user area of the memory. The user area is located at drives A

Seite 26 - Production Procedure

Chapter 8. Files 113 8.2.3 Structure of Data Files RecRecRecRecordordordord A data file is made up of a maximum of 32767 records. A record is

Seite 27 - [ 1 ] Select a source file

114 8.2.4 Data File Management by Directory Information The Interpreter manages data files using the directory information stored in the system area

Seite 28 - [ 1 ] Create a new project

Chapter 8. Files 115 8.2.5 Programming for Data Files Input/Output for Numeric DataInput/Output for Numeric DataInput/Output for Numeric DataInpu

Seite 29

116 Restrictions on Input/Output of Data FilesRestrictions on Input/Output of Data FilesRestrictions on Input/Output of Data FilesRestrictions on

Seite 30

Chapter 8. Files 117 8.2.6 About Drives The BHT-8000 has logical drives. Drive B is provided for ensuring compatibility with other BHT series. If you

Seite 31

118 8.3 Bar Code Device 8.3.1 Overview Opening the Bar Code Device by OPENOpening the Bar Code Device by OPENOpening the Bar Code Device by OPEN

Seite 32

Chapter 8. Files 119 Specifying Options in the OPENSpecifying Options in the OPENSpecifying Options in the OPENSpecifying Options in the OPEN &quo

Seite 33 - in the toolbar

120 8.3.2 Programming for Bar Code Device Code MarkCode MarkCode MarkCode Mark The MARK$ function allows you to check the code mark (denotin

Seite 34 - [ 3 ] Building

Chapter 8. Files 121 Controlling the Indicator LED and Beeper (Vibrator) for of SuccessfulControlling the Indicator LED and Beeper (Vibrator) for

Seite 35

Chapter 1. Software Overview for the BHT 5 1.2 BHT-BASIC 1.2.1 Features BHT-BASIC is designed as an optimal programming language in making applicatio

Seite 36 - Main Window

122 8.4 Communications Device 8.4.1 Overview The available communications interface in BHT is as follows. • IrDA interface • Direct-connect interface

Seite 37

Chapter 8. Files 123 8.4.3 Programming for Data Communications Setting the Communications ParametersSetting the Communications ParametersSetting the

Seite 38 - 2.4.7 Options

124 8.4.4 Overview of Communications Protocols The BHT supports two communications protocols—BHT-protocol and BHT-Ir protocol for file transmission.

Seite 39 - [ 2 ] Linking options

Chapter 8. Files 125 [ 2 ] BHT-Ir protocol In addition to the BHT-protocol, the BHT supports the BHT-Ir protocol. If you select the BHT-Ir protocol b

Seite 40 - [ 4 ] Outputting list files

126 8.4.5 File Transfer Tools [ 1 ] Transfer Utility Transfer Utility is optionally available in two versions: MS-DOS–based and Windows-based. It s

Seite 41

127 Chapter 9 Event Polling and Error/Event Trapping CONTENTSCONTENTSCONTENTSCONTENTS 9.1 Overview...

Seite 42

128 9.1 Overview BHT-BASIC supports event polling and two types of trapping: error trapping and event trap-ping. – Event polling – Trapping Error t

Seite 43 - [ 5 ] Outputting a mapfile

Chapter 9. Event Polling and Error/Event Trapping 129 9.2 Event Polling [ 1 ] Programming sample The program below shows the event polling example wh

Seite 44

130 [ 2 ] I/O devices capable of being monitored by the event polling Listed below are the I/O devices which the event polling can monitor. I/O Dev

Seite 45 - Command Line

Chapter 9. Event Polling and Error/Event Trapping 131 9.3 Error Trapping [ 1 ] Overview If a run-time error occurs during program running, error trap

Seite 46 - [ 2 ] Options

6 1.2.2 What’s New in BHT-BASIC 3.5 Upgraded from BHT-BASIC 3.0? Based on BHT-BASIC 3.0, BHT-BASIC 3.5 newly supports the following functions: [ 1

Seite 47 - Description

132 [ 2 ] Programming for trapping errors To trap errors, use the ON ERROR GOTO statement in which you should designate the error-handling routine

Seite 48

Chapter 9. Event Polling and Error/Event Trapping 133 9.4 Event (of Keystroke) Trapping [ 1 ] Overview If any of the function keys previously specif

Seite 49

134 If function keys specified for keystroke trapping are pressed during execution of the following statements or functions relating keyboard input,

Seite 50

135 Chapter 10 Sleep Function CONTENTSCONTENTSCONTENTSCONTENTS 10.1 Sleep Function ...

Seite 51

136 10.1 Sleep Function The BHT supports the sleep function that automatically interrupts program execution if no event takes place within the specif

Seite 52 - 2.5 Downloading

137 Chapter 11 Resume Function CONTENTSCONTENTSCONTENTSCONTENTS 11.1 Resume Function ...

Seite 53 - 2.6.3 Termination

138 11.1 Resume Function The resume function automatically preserves the current status of a running application pro-gram (user program) when the BHT

Seite 54 - Chapter 3

139 Chapter 12 Power-related Functions CONTENTSCONTENTSCONTENTSCONTENTS 12.1 Low Battery Warning...

Seite 55 - 3.1 Program Overview

140 12.1 Low Battery Warning If the output voltage of the battery cartridge drops below a specified lower level limit when the BHT is in operation, t

Seite 56

Chapter 12. Power-related Functions 141 12.3 Wakeup Function The wakeup function allows you to turn the BHT on at the wakeup time (of the system clock

Seite 57 - Jump into Jump out

Chapter 1. Software Overview for the BHT 7 Defining and declaring userDefining and declaring userDefining and declaring userDefining and declaring

Seite 58 - 3.2 Handling User Programs

142 12.4 Remote Wakeup Function [1] Outline The remote wakeup function allows you to wake up the BHT from a remote location so as to run the specifie

Seite 59 - 3.2.3 Included Files

Chapter 12. Power-related Functions 143 [2] Remote wakeup operation About BHT internal operation enabling remote wakeupAbout BHT internal operati

Seite 60 - Chapter 4

144 If the host receives no response from the BHT for 30 ms, go back to step (1). (3) Perform steps (1) and (2) repeatedly for 60 seconds or more. I

Seite 61 - [ 1 ] Labels

Chapter 12. Power-related Functions 145 (4) The BHT will exit from the off state and execute t

Seite 62 - [ 3 ] Comments

146 [3] Remote wakeup program File nameFile nameFile nameFile name The BHT may handle the file named "BHTRMT.PD3" as a remote wakeu

Seite 63 - 4.1.2 Program Line Length

Chapter 12. Power-related Functions 147 (4) Set the BHT station ID to be used in the BHT response message Set a 6-byte numeric string referring to th

Seite 64 - 4.2 Usable Characters

148 Checking the execution recordChecking the execution recordChecking the execution recordChecking the execution record of remote wakeup of remo

Seite 65

149 Chapter 13 Backlight Function CONTENTSCONTENTSCONTENTSCONTENTS 13.1 Backlight Function...

Seite 66

150 13.1 Backlight Function The BHT has a backlight function (LCD backlight and key backlight). Pressing the M1 key while holding down the Shift key

Seite 67 - 4.3 Labels

Chapter 13. Backlight Function 151 Setting 0 to port 6020h deactivates the backlight function and turns off the backlight if lit. When the backlight f

Seite 68 - 4.4 Identifiers

8 1.3 Program Development and Execution BHT-BASIC consists of Compiler and Interpreter. 1.3.1 Compiler BHT-BASIC 3.5 Compiler consists of the follo

Seite 69 - 4.5 Reserved Words

152 Chapter 14 Statement Reference CONTENTSCONTENTSCONTENTSCONTENTS APLOAD...153 BEEP...

Seite 70 - Chapter 5

Chapter 14. Statement Reference 153 ____________________________________________________________________ ANK Pattern LOAD I/O statement APLOAD Loa

Seite 71 - 5.1 Constants

154 • If you issue more than one APLOAD statement specifying a same character code, the last statement takes effect. • Only when the Interpreter ex

Seite 72

Chapter 14. Statement Reference 155 • The cursor size will be as shown below. Display font Size (W×H) No. of elements Standard-size 6×8 dots LSB

Seite 73 - 5.2 Variables

156 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error • No fontarrayname or cursor

Seite 74 - [ 2 ] Numeric Variables

Chapter 14. Statement Reference 157 ____________________________________________________________________ I/O statement BEEP Drives the beeper or vibr

Seite 75

158 You may change the beeper volume with the OUT statement. (For details, refer to Appendix D, "I/O Ports.") If you set a value other than

Seite 76 - 5.3 User-defined Functions

Chapter 14. Statement Reference 159 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error T

Seite 77 - 5.4 Type Conversion

160 ____________________________________________________________________ Flow control statement CALL Calls an FN3 or SUB function. _________________

Seite 78

Chapter 14. Statement Reference 161 • filename is the name of an FN3 function. The extension of the file names is fixed to .FN3. (For the FN3 functio

Seite 79 - 5.5 Scope of Variables

9 Chapter 2 Development Environment and Procedures CONTENTSCONTENTSCONTENTSCONTENTS 2.1 Overview of Development Environment...

Seite 80

162 Calling a userCalling a userCalling a userCalling a user----defined functiondefined functiondefined functiondefined function (SUB function) (

Seite 81 - 5.5.2 Local Variables

Chapter 14. Statement Reference 163 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 02h Syntax error ("[dri

Seite 82

164 ____________________________________________________________________ Flow control statement CHAIN Transfers control to another program. ________

Seite 83 - 5.5.4 Common Variables

Chapter 14. Statement Reference 165 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 3: ’"’ missin

Seite 84 - Chapter 6

166 ____________________________________________________________________ CLear FILE File I/O statement CLFILE Erases the data stored in a data file

Seite 85 - 6.1 Overview

Chapter 14. Statement Reference 167 Example:Example:Example:Example: OPEN "master.Dat"AS #1 FIELD #1,20 AS bar$,10 AS ky$ CLFILE #1 CLOSE #1

Seite 86 - 6.2 Operator Precedence

168 ____________________________________________________________________ File I/O statement CLOSE Closes file(s). __________________________________

Seite 87 - 6.3 Operators

Chapter 14. Statement Reference 169 ____________________________________________________________________ CLear Screen I/O statement CLS Clears the L

Seite 88 - 6.3.2 Relational Operators

170 ____________________________________________________________________ Declarative statement COMMON Declares common variables for sharing between

Seite 89 - 6.3.3 Logical Operators

Chapter 14. Statement Reference 171 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 5: Variable name r

Seite 90 - [ 4 ] The XOR operator

10 2.4.7 Options...30 [ 1 ] Compiling options

Seite 91 - 6.3.5 String Operators

172 ____________________________________________________________________ Declarative statement CONST Defines symbolic constants to be replaced with

Seite 92

Chapter 14. Statement Reference 173 ____________________________________________________________________ I/O statement CURSOR Turns the cursor on or

Seite 93 - Chapter 7

174 ____________________________________________________________________ Declarative statement DATA Stores numeric and string literals for READ stat

Seite 94 - 7.1.1 Display Fonts

Chapter 14. Statement Reference 175 ____________________________________________________________________ User-defined function declarative statement

Seite 95

176 Description:Description:Description:Description: DECLARE defines a user-defined function defined in other source program files. • Declaration of

Seite 96

Chapter 14. Statement Reference 177 ____________________________________________________________________ DEFine FuNction User-defined function defin

Seite 97

178 Description:Description:Description:Description: Creating a user-defined function DEF FN creates a user-defined function. • Definition of a use

Seite 98

Chapter 14. Statement Reference 179 Syntax errors:Syntax errors:Syntax errors:Syntax errors: When defining a user-defined function Error code and me

Seite 99

180 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 07h Insufficient memory space (You nested DEF FN statements

Seite 100 - 7.1.3 Dot Patterns of Fonts

Chapter 14. Statement Reference 181 ____________________________________________________________________ DEFine FuNction...END DEFine User-defined f

Seite 101

Chapter 2. Development Environment and Procedures 11 2.1 Overview of Development Environment The following hardware and software are required for de

Seite 102

182 Description:Description:Description:Description: Creating a user-defined function DEF FN ..END DEF creates a user-defined function. The function

Seite 103

Chapter 14. Statement Reference 183 Calling a user-defined function FNfunctionname calls a user-defined function. • The number of realparameters sho

Seite 104

184 When calling a user-defined function Error code and message Meaning error 68: Mismatch argument typeor number • The number of the real parame

Seite 105 - Same Screen

Chapter 14. Statement Reference 185 ____________________________________________________________________ DEFine REGister Declarative statement DEFRE

Seite 106

186 numericinitialvaluedefinition For one-dimensional: {numericconstant[,numericconstant...]} DEFREG n6%(3)={9,8,7,6} For two-dimensional: {{numericc

Seite 107 - 7.1.6 VRAM

Chapter 14. Statement Reference 187 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 6: Variable name

Seite 108

188 Example:Example:Example:Example: Example 1: Valid DEFREG statements DEFREG a,e$ DEFREG b=100,c(10),d$(2,4)[ 10] DEFREG bps$="19200" DEF

Seite 109 - 7.1.7 Displaying the System

Chapter 14. Statement Reference 189 ____________________________________________________________________ DIMension Memory control statement DIM Decla

Seite 110

190 • In declaring an array string variable, you can specify the string length. If its specification is omitted, the default value of 20 characters

Seite 111

Chapter 14. Statement Reference 191 ____________________________________________________________________ Flow control statement END Terminates progra

Seite 112 - 7.2 Input from the Keyboard

Copyright © 2003 DENSO WAVE INCORPORATED All rights reserved. No part of this publication may be reproduced i

Seite 113

12 2.1.2 Required Software • OS • Editor Windows95/98/NT/2000/XP • BHT-BASIC 3.5 Compiler • Transfer Utility (option) • Ir-Transfer Utility C

Seite 114 - [ 2 ] Shift key

192 ____________________________________________________________________ Memory control statement ERASE Erases array variables. ____________________

Seite 115 - 7.3 Timer and Beeper

Chapter 14. Statement Reference 193 ____________________________________________________________________ File I/O statement FIELD Allocates string va

Seite 116

194 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error filenumber is missing. RunRunRun

Seite 117

Chapter 14. Statement Reference 195 ____________________________________________________________________ Flow control statement FOR…NEXT Defines a lo

Seite 118 - Chapter 8

196 • The default value of increment is 1. • You can nest FOR ..NEXT statements to a maximum of 10 levels. • When using the FOR ..NEXT statement t

Seite 119 - 8.1 File Overview

Chapter 14. Statement Reference 197 ____________________________________________________________________ User-defined function statement FUNCTION…END

Seite 120 - 8.2 Data Files

198 Description:Description:Description:Description: Creating a user-defined function FUNCTION...END FUNCTION creates a user-defined function. The f

Seite 121

Chapter 14. Statement Reference 199 • If you specify a global variable in realparameter when calling a user-defined function, the user-defined functi

Seite 122 - Information

200 When calling a user-defined function Error code and message Meaning error 68: Mismatch argument type or number • The number of the real para

Seite 123

Chapter 14. Statement Reference 201 ____________________________________________________________________ File I/O statement GET Read a record from a

Seite 124

Chapter 2. Development Environment and Procedures 13 2.2 Overview of Developing Procedures 2.2.1 Developing Procedures The program developing procedu

Seite 125 - 8.2.6 About Drives

202 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error filenumber is missing. RunRunRu

Seite 126 - 8.3 Bar Code Device

Chapter 14. Statement Reference 203 ____________________________________________________________________ Declarative statement GLOBAL Declares one or

Seite 127

204 subscript For one-dimensional: integerconstant For two-dimensional: integerconstant,integerconstant Where integerconstant is a numeric

Seite 128

Chapter 14. Statement Reference 205 ____________________________________________________________________ Flow control statement GOSUB Branches to a s

Seite 129

206 ____________________________________________________________________ Flow control statement GOTO Branches to a specified label. ________________

Seite 130 - 8.4 Communications Device

Chapter 14. Statement Reference 207 ____________________________________________________________________ Flow control statement IF…THEN…ELSE…END IF C

Seite 131

208 • A block-structured IF statement block has the following advantages over a single-line IF statement (which is not supported in BHT-BASIC): - Mo

Seite 132 - [ 1 ] BHT-protocol

Chapter 14. Statement Reference 209 ____________________________________________________________________ I/O statement INPUT Reads input from the key

Seite 133 - [ 2 ] BHT-Ir protocol

210 • The cursor shape specified by the most recently executed LOCATE statement takes effect. • Even after execution of the CURSOR OFF statement, th

Seite 134 - 8.4.5 File Transfer Tools

Chapter 14. Statement Reference 211 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 06h The operation result is

Seite 135 - Chapter 9

14 2.2.2 Functions of BHT-BASIC 3.5 BHT-BASIC 3.5 contains Compiler, Linker, and Librarian whose functions are listed below. Functions of Compiler

Seite 136 - 9.1 Overview

212 ____________________________________________________________________ File I/O statement INPUT # Reads data from a device I/O file into specified

Seite 137 - 9.2 Event Polling

Chapter 14. Statement Reference 213 • Notes for entering numeric data: Valid characters include 0 to 9, a minus sign (-), and a period (.). They shou

Seite 138

214 ____________________________________________________________________ I/O statement KEY Assigns a string or a control code to a function key; als

Seite 139 - 9.3 Error Trapping

Chapter 14. Statement Reference 215 Description:Description:Description:Description: Assigning a string or a control code to a function key KEY in sy

Seite 140

216 • Pressing the M1 key (key number 30) while holding down the shift key functions as a backlight on/off control key by default. • If pressed tog

Seite 141 - [ 1 ] Overview

Chapter 14. Statement Reference 217 NOTE If you issue KEY statements specifying a same function key, only the lastKEY statement takes effect. The

Seite 142

218 ____________________________________________________________________ I/O statement KEY ON and KEY OFF Enables or disables keystroke trapping for

Seite 143 - Chapter 10

Chapter 14. Statement Reference 219 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error •

Seite 144 - 10.1 Sleep Function

220 ____________________________________________________________________ File I/O statement KILL Deletes a specified file from the memory. _________

Seite 145 - Chapter 11

Chapter 14. Statement Reference 221 Example:Example:Example:Example: CLOSE IF kyIn$="Y"THEN KILL "Master.Dat" END IF Reference:Re

Seite 146 - 11.1 Resume Function

Chapter 2. Development Environment and Procedures 15 2.3 Writing a Source Program 2.3.1 Writing a Source Program by an Editor To write a source prog

Seite 147 - Chapter 12

222 ____________________________________________________________________ Kanji Pattern LOAD I/O statement KPLOAD Loads a user-defined Kanji font in

Seite 148 - Backlight

Chapter 14. Statement Reference 223 • The loaded user-defined fonts are effective during execution of the user program which loaded those fonts and d

Seite 149 - 12.3 Wakeup Function

224 • An array integer variable--a work array, register array, or common array--for cursorarrayname should be declared by the DIM, DEFREG, or COMM

Seite 150 - 12.4 Remote Wakeup Function

Chapter 14. Statement Reference 225 • If the double-width is specified, then user-defined cursors loaded by the KPLOAD will display in double-width,

Seite 151 - [2] Remote wakeup operation

226 Example:Example:Example:Example: DIM kp%(15) kp%(0)=&H0000 kp%(1)=&H8011 kp%(2)=&H6022 kp%(3)=&H1844 kp%(4)=&H0600 kp%(5)=&am

Seite 152

Chapter 14. Statement Reference 227 ____________________________________________________________________ Assignment statement LET Assigns a value to

Seite 153

228 ____________________________________________________________________ LINE INPUT LINE INPUT Reads input from the keyboard into a string variable.

Seite 154 - [3] Remote wakeup program

Chapter 14. Statement Reference 229 If "prompt" is followed by a comma, the statement displays the prompting message but no question mark or

Seite 155

230 ____________________________________________________________________ File I/O statement LINE INPUT # Reads data from a device I/O file into a st

Seite 156

Chapter 14. Statement Reference 231 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error •

Seite 157 - Chapter 13

16 • Comment lines starting with a single quotation mark (') and those with a REM should have the following description rules each. A single qu

Seite 158 - 13.1 Backlight Function

232 ____________________________________________________________________ I/O statement LOCATE Moves the cursor to a specified position and changes t

Seite 159

Chapter 14. Statement Reference 233 • The entry ranges of the column and row are the same in the regular-size, double-width. • Any parameter value o

Seite 160 - Chapter 14

234 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the range Example:Example:Example:Exam

Seite 161

Chapter 14. Statement Reference 235 ____________________________________________________________________ Error control statement ON ERROR GOTO Enable

Seite 162

236 ____________________________________________________________________ Flow control statement ON…GOSUB, ON…GOTO Branches to one of specified label

Seite 163

Chapter 14. Statement Reference 237 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error •

Seite 164

238 ____________________________________________________________________ I/O statement ON KEY…GOSUB Specifies an event-handling routine for keystrok

Seite 165

Chapter 14. Statement Reference 239 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error •

Seite 166

240 ____________________________________________________________________ File I/O statement OPEN Opens a data file for I/O activities. _____________

Seite 167

Chapter 14. Statement Reference 241 • filelength is the maximum number of registrable records in a file. It can be set only when a new data file is c

Seite 168

Chapter 2. Development Environment and Procedures 17 2.4 Producing a User Program 2.4.1 Starting the BHT-BASIC 3.5 Compiler Start the Compiler, e.g.

Seite 169

242 ____________________________________________________________________ File I/O statement OPEN "BAR: " Opens the bar code device file. T

Seite 170

Chapter 14. Statement Reference 243 • Only a single bar code device file can be opened at a time. The total number of files which can be opened at a

Seite 171

244 □□□□Auto-off mode (F) OPEN "BAR :F"AS #7 CODE "A" If you press the trigger switch *1 , the illumination LED *2 comes on. When

Seite 172

Chapter 14. Statement Reference 245 • If readmode is omitted, the BHT defaults to the auto-off mode. • In the momentary switching mode, alternate swit

Seite 173

246 readcode The BHT supports seven types of bar codes--the universal product codes, Interleaved 2 of 5 (ITF), Standard 2 of 5 (STF), Codabar

Seite 174

Chapter 14. Statement Reference 247 □□□□Interleaved 2 of 5 (ITF) (I) Syntax : I[:[mini.no.digits[-max.no.digits]][CD] [,[mini.no.digits[-max.no.dig

Seite 175

248 CD is a check digit. Specifying a C to CD makes the Interpreter check bar codes with MOD-16. The check digit is included in the number of digits.

Seite 176

Chapter 14. Statement Reference 249 □□□□Code 128 ((((K)))) Syntax : K[:[mini.no.digits[-max.no.digits]] [,[mini.no.digits[-max.no.digits]]] [,[mini.n

Seite 177

250 (4) FNC4 An FNC4 converts data encoded by the code set A or B into a set of extended ASCII-encoded data (128 added to each official ASCII code va

Seite 178

Chapter 14. Statement Reference 251 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error T

Seite 179

18 2.4.2 Outline of User Program or Library Production Procedure Unlike the BHT-BASIC 3.0 Compiler that converts a single source program into a user

Seite 180

252 ____________________________________________________________________ File I/O statement OPEN "COM: " Opens a communications device fil

Seite 181

Chapter 14. Statement Reference 253 Description:Description:Description:Description: OPEN "COM:" opens a communications device file and asso

Seite 182

254 charalength charalength is a character length or the number of data bits. It should be 8(default) or 7 bits. stopbit stopbit is th

Seite 183 - DECLARE

Chapter 14. Statement Reference 255 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error f

Seite 184

256 ____________________________________________________________________ I/O statement OUT Sends a data byte to an output port. ____________________

Seite 185

Chapter 14. Statement Reference 257 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the ran

Seite 186

258 ____________________________________________________________________ I/O statement POWER Controls the automatic power-off facility. ____________

Seite 187

Chapter 14. Statement Reference 259 Turning off the power immediately Execution of POWER OFF or POWER 0 immediately turns off the power. • The execut

Seite 188

260 ____________________________________________________________________ I/O statement PRINT Displays data on the LCD screen. ______________________

Seite 189 - DEF FN…END DEF

Chapter 14. Statement Reference 261 CR/LFcontrol CR/LFcontrol determines where the cursor is to be positioned after the PRINT statement executes. • I

Seite 190

Chapter 2. Development Environment and Procedures 19 2.4.3 Designating a Single Source File or a Project File 2.4.3.1 Designating a single source fi

Seite 191

262 ____________________________________________________________________ File I/O statement PRINT # Outputs data to a communications device file. __

Seite 192

Chapter 14. Statement Reference 263 • If CR/LFcontrol is a semicolon (;), the PRINT # statement outputs data without adding spaces or control codes. S

Seite 193

264 ____________________________________________________________________ I/O statement PRINT USING Displays data on the LCD screen under formatting

Seite 194

Chapter 14. Statement Reference 265 numericformat numericformat is a formatting string consisting of #, decimal point (.), and/or +,each of which cau

Seite 195

266 stringformat stringformat is a formatting string consisting of !, @, and/or &&, each of which causes a special printing effect as descri

Seite 196

Chapter 14. Statement Reference 267 CR/LFcontrol CR/LFcontrol determines where the cursor is to be positioned after the PRINT USING statement execute

Seite 197

268 ____________________________________________________________________ Declarative statement PRIVATE Declares one or more work variables or regist

Seite 198

Chapter 14. Statement Reference 269 subscript For one-dimensional: integerconstant For two-dimensional: integerconstant,integerconstant Wher

Seite 199

270 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the range 07h Insufficient memory spac

Seite 200

Chapter 14. Statement Reference 271 ____________________________________________________________________ File I/O statement PUT Writes a record from

Seite 201

20 2.4.3.2 Designating a project file To build a library out of a single source file or to build a user program or library out of multiple source fi

Seite 202

272 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error filenumber is missing. RunRunRu

Seite 203 - FOR…NEXT

Chapter 14. Statement Reference 273 ____________________________________________________________________ I/O statement READ Reads data defined by DAT

Seite 204

274 If the string data is invalid as numeric data, the READ statement assigns the value 0 to the numeric variable. Statement example:

Seite 205 - FUNCTION…END FUNCTION

Chapter 14. Statement Reference 275 ____________________________________________________________________ Declarative statement REM Declares the rest

Seite 206

276 ____________________________________________________________________ I/O statement RESTORE Specifies a DATA statement location where the READ st

Seite 207

Chapter 14. Statement Reference 277 ____________________________________________________________________ Error control statement RESUME Causes progra

Seite 208

278 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 14h RESUME without error (RESUME statement occurs outside o

Seite 209

Chapter 14. Statement Reference 279 ____________________________________________________________________ Flow control statement RETURN Returns contro

Seite 210

280 ____________________________________________________________________ I/O statement SCREEN Sets the display mode (screen mode, and font size) and

Seite 211

Chapter 14. Statement Reference 281 • At the start of program execution, the following settings apply: Screen mode ANK mode Font size Standard-siz

Seite 212

Chapter 2. Development Environment and Procedures 21 [ 2 ] Select an existing project file You may select an existing project file in the Select Proj

Seite 213

282 ____________________________________________________________________ Flow control statement SELECT…CASE…END SELECT Conditionally executes one of

Seite 214

Chapter 14. Statement Reference 283 • You can nest the SELECT…CASE…END SELECT statements to a maximum of 10 levels. SELECT a CASE 1 SELECT b CASE 3 P

Seite 215 - IF…THEN…ELSE…END IF

284 ____________________________________________________________________ User-defined function statement SUB…END SUB Names and defines user-defined

Seite 216

Chapter 14. Statement Reference 285 Description:Description:Description:Description: Creating a user-defined function SUB...END SUB creates a user-de

Seite 217

286 Syntax errors:Syntax errors:Syntax errors:Syntax errors: When defining a user function Error code and message Meaning error 64: Function redefi

Seite 218

Chapter 14. Statement Reference 287 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 07h Insufficient memory s

Seite 219

288 ____________________________________________________________________ I/O statement WAIT Pauses program execution until a designated input port p

Seite 220 - INPUT #

Chapter 14. Statement Reference 289 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error •

Seite 221

290 ____________________________________________________________________ Flow control statement WHILE…WEND Continues to execute a statement block as

Seite 222

Chapter 14. Statement Reference 291 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 26 : Too deep nest

Seite 223

i Preface This manual describes the syntax and development procedure of BHT-BASIC 3.5 which is a programming language for developing application pr

Seite 224

22 [ 3 ] Add files to a project file You may add one or more source files and libraries to a project file at a time. (1) Create a new project (Refe

Seite 225

292 ____________________________________________________________________ I/O statement XFILE Transmits a designated file according to the specified

Seite 226 - KEY ON and KEY OFF

Chapter 14. Statement Reference 293 - Transmission direction Parameter omitted (default) Transmits a file from the BHT. R or r Receives a file from t

Seite 227

294 - Timeout length when a link will be established Specify the timeout length by 1 to 9. Uploading Set value DownloadingBHT-protocol BHT-Ir protoco

Seite 228

Chapter 14. Statement Reference 295 • A communications device file should be opened before execution of the XFILE statement. (For the file opening,

Seite 229

296 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 02h Syntax error ([drivename:]filename is not correct.) 07h

Seite 230

Chapter 14. Statement Reference 297 ____________________________________________________________________ File I/O statement $INCLUDE Specifies an inc

Seite 231

298 Fatal Error:Fatal Error:Fatal Error:Fatal Error: Error code and message Meaning fatal error 30: Cannot find include file "XXX" No inc

Seite 232

Chapter 14. Statement Reference 299 Additional Explanation for Statements Effective range of labels Labels are effective only in a file. Definition

Seite 233

300 Chapter 15 Function Reference CONTENTSCONTENTSCONTENTSCONTENTS ABS ...301 ASC ...

Seite 234

Chapter 15. Function Reference 301 ____________________________________________________________________ ABSolute Numeric function ABS Returns the abs

Seite 235

Chapter 2. Development Environment and Procedures 23 [ 4 ] Select files in the active project From files existing in the active project, you may selec

Seite 236 - LINE INPUT

302 ____________________________________________________________________ ASCii code String function ASC Returns the ASCII code value of a given cha

Seite 237

Chapter 15. Function Reference 303 ____________________________________________________________________ Block Check Character String function BCC$ R

Seite 238 - LINE INPUT #

304 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the range (checktype is out of the

Seite 239

Chapter 15. Function Reference 305 ____________________________________________________________________ CHecK DiGiT String function CHKDGT$ Returns

Seite 240

306 Sample coding 1: CD.Data$=CHKDGT$("a123Qa","N") "Q" is a CD position character, so CHKDGT$ calculates the correct

Seite 241

Chapter 15. Function Reference 307 When CDtype is I (ITF), the length of barcodedata must be an even number of two or more digits. If not, CHKDGT$ re

Seite 242

308 When CDtype is N (Codabar), the length of barcodedata must be three digits or more including start and stop characters. If not, CHKDGT$ returns

Seite 243 - ON ERROR GOTO

Chapter 15. Function Reference 309 ____________________________________________________________________ CHaRacter code String function CHR$ Returns

Seite 244 - ON…GOSUB, ON…GOTO

310 • 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)

Seite 245

Chapter 15. Function Reference 311 ____________________________________________________________________ COUNTRY I/O function COUNTRY$ Sets a national

Seite 246 - ON KEY…GOSUB

24 • Main Object display area This area shows the name of a main object in a user program if you have selected "User program (PD3)" with t

Seite 247

312 • After setting a national character set, you may display national characters assigned to 32 (20h) to 127 (7Fh), on the LCD. • "countrycode

Seite 248

Chapter 15. Function Reference 313 ____________________________________________________________________ CurSoR LINe I/O function CSRLIN Returns the

Seite 249

314 ____________________________________________________________________ DATE I/O function DATE$ Returns the current system date or sets a specifie

Seite 250 - OPEN "BAR: "

Chapter 15. Function Reference 315 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the r

Seite 251

316 ____________________________________________________________________ End Of File File I/O function EOF Tests whether the end of a device I/O fi

Seite 252

Chapter 15. Function Reference 317 ____________________________________________________________________ ERror Line Error-handling function ERL Retur

Seite 253

318 ____________________________________________________________________ ERRor code Error-handling function ERR Returns the error code of the most

Seite 254 - □Universal product codes (A)

Chapter 15. Function Reference 319 ____________________________________________________________________ End of TeXt I/O function ETX$ Modifies the v

Seite 255

320 ____________________________________________________________________ FREe area Memory management function FRE Returns the number of bytes avail

Seite 256

Chapter 15. Function Reference 321 ____________________________________________________________________ HEXadecimal String function HEX$ Converts a d

Seite 257

Chapter 2. Development Environment and Procedures 25 2.4.4 Compiling and Building First specify the options and then proceed to the compiling or buil

Seite 258

322 ____________________________________________________________________ INput KEYboard I/O function INKEY$ Returns a character read from the keybo

Seite 259

Chapter 15. Function Reference 323 ____________________________________________________________________ INPort data I/O function INP Returns a byte

Seite 260 - OPEN "COM: "

324 ____________________________________________________________________ INPUT File I/O function INPUT$ Returns a specified number of characters re

Seite 261

Chapter 15. Function Reference 325 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the r

Seite 262

326 ____________________________________________________________________ IN STRing String function INSTR Searches a specified target string for a s

Seite 263

Chapter 15. Function Reference 327 • A returned value of INSTR is a decimal number from 0 to 255, depending upon the conditions as listed below. Con

Seite 264

328 ____________________________________________________________________ INTeger Numeric operation function INT Returns the largest whole number les

Seite 265

Chapter 15. Function Reference 329 ____________________________________________________________________ LEFT String function LEFT$ Returns the specif

Seite 266

330 ____________________________________________________________________ LENgth String function LEN Returns the length (number of bytes) of a given

Seite 267

Chapter 15. Function Reference 331 ____________________________________________________________________ LOcation Counter of file File I/O function L

Seite 268

26 [ 2 ] Compiling In any of the following methods, compile the currently selected source file(s) into an object file(s): From the Build menu, choo

Seite 269

332 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 34h Bad file name or number (You specified filenumber of

Seite 270 - PRINT #

Chapter 15. Function Reference 333 ____________________________________________________________________ Location Of File File I/O function LOF Retur

Seite 271

334 ____________________________________________________________________ code MARK I/O function MARK$ Returns the bar code type and the number of d

Seite 272 - PRINT USING

Chapter 15. Function Reference 335 ____________________________________________________________________ MIDdle String function MID$ Returns a portion

Seite 273

336 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the range Reference:Reference:Refe

Seite 274

Chapter 15. Function Reference 337 ____________________________________________________________________ POSition I/O function POS Returns the current

Seite 275

338 ____________________________________________________________________ RIGHT String function RIGHT$ Returns the specified number of rightmost char

Seite 276 - PRIVATE

Chapter 15. Function Reference 339 ____________________________________________________________________ SEARCH File I/O function SEARCH Searches a

Seite 277

340 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the range 34h Bad file name or numb

Seite 278

Chapter 15. Function Reference 341 ____________________________________________________________________ Start Of Heading I/O function SOH$ Modifies

Seite 279

Chapter 2. Development Environment and Procedures 27 2.4.5 Setting the Editor for Displaying Files Set the editor that you want to use for displaying

Seite 280

342 ____________________________________________________________________ STRing String function STR$ Converts the value of a numeric expression into

Seite 281

Chapter 15. Function Reference 343 ____________________________________________________________________ Start of TeXt I/O function STX$ Modifies the

Seite 282

344 ____________________________________________________________________ TIME I/O function TIME$ Returns the current system time or wakeup time, or

Seite 283

Chapter 15. Function Reference 345 Syntax 2 Setting the system time TIME$ sets the system time specified by "time." The format of "tim

Seite 284 - RESTORE

346 ____________________________________________________________________ TIMER-A/TIMER-B/TIMER-C I/O function TIMEA/TIMEB/TIMEC Returns the current

Seite 285

Chapter 15. Function Reference 347 ____________________________________________________________________ VALue String function VAL Converts a string i

Seite 286

348 Chapter 16 Extended Functions CONTENTSCONTENTSCONTENTSCONTENTS 16.1 Overview...

Seite 287

Chapter 16. Extended Functions 349 16.1 Overview In addition to the BHT-BASIC statements and functions, the BHT-8000 series supports the following ext

Seite 288

350 16.2 Reading or writing system settings from/to the memory (SYSTEM.FN3) 16.2.1 Function Number List of SYSTEM.FN3 The SYSTEM.FN3 may read or w

Seite 289

Chapter 16. Extended Functions 351 16.2.2 Detailed Function Specifications .fcSysIGet(=1) Read numeric data from System Mode settings Synta

Seite 290 - SELECT…CASE…END SELECT

28 2.4.6 Error Messages and Their Indication onto the Main Window [ 1 ] Selecting either an editor or main window as an error message output device

Seite 291

352 Item number (PARA%) System menu item Attribute*1 DATA%, numeric data of the system menu item Initial value .syCmifOpt 0 IrDA interface .syCmif

Seite 292 - SUB…END SUB

Chapter 16. Extended Functions 353 Item number (PARA%) System menu item Attribute*1 DATA%, numeric data of the system menu item Initial value .syHP

Seite 293

354 .fcSysISet(=2) Write numeric data to System Mode settings Syntax: CALL "SYSTEM.FN3" .fcSysISet PARA%,DATA% Description:

Seite 294

Chapter 16. Extended Functions 355 .fcSysSSet(=4) Write string data to System Mode settings Syntax: CALL "SYSTEM.FN3" .fcSysSSe

Seite 295

356 16.3 Controlling system files(SYSMDFY.FN3) 16.3.1 Function Number List of SYSMDFY.FN3 The SYSMDFY.FN3 may reconfigure the BHT system , as well

Seite 296

Chapter 16. Extended Functions 357 .fcMdBDo(=2) Reconfigure BHT system Syntax: CALL "SYSMDFY.FN3" .fcMdBDo FILE$, OPT% Description: T

Seite 297

358 16.4 Calculating a CRC (CRC.FN3) 16.4.1 Function Number List of CRC.FN3 The CRC.FN3 may calculate a CRC depending upon the function number spec

Seite 298 - WHILE…WEND

359 Chapter 17 TCP/IP (BHTs with Bluetooth communications device) CONTENTSCONTENTSCONTENTSCONTENTS 17.1 Two Sides...

Seite 299

360 17.5 Socket Library (SOCKET.FN3)... 386 17.5.1 Overview ...

Seite 300

Chapter 17. TCP/IP 361 17.1 Two Sides 17.1.1 BHT The BHT equipped with a spread spectrum communications device or IrDA communications device includes

Seite 301

Chapter 2. Development Environment and Procedures 29 [ 2 ] How error messages are displayed on the editor or main window During building, the BHT-BAS

Seite 302

362 17.2 Programming Procedure 17.2.1 Bluetooth Communication System The following is the procedure for using TCP/IP over a Bluetooth communications

Seite 303

Chapter 17. TCP/IP 363 [ 2 ] Configure TCP/IP System To connect to the TCP/IP pathway, specify the following system settings by using the extension l

Seite 304

364 [ 3 ] Declare TCP/IP Communications Pathway Specify the following system settings by using the socket library (SOCKET.FN3): • Communications de

Seite 305 - $INCLUDE

Chapter 17. TCP/IP 365 [ 4 ] Connect to TCP/IP Communications Pathway Use the extension library SOCKET.FN3. Connecting to the TCP/IP communications p

Seite 306

366 [ 5 ] Transfer Data or File via Socket Interface To transfer data via the socket interface, use the extension library SOCKET.FN3. Refer to 17.3,

Seite 307

Chapter 17. TCP/IP 367 17.3 Socket API 17.3.1 Overview The SOCKET.FN3 library implements a subset of the BSD4.4 socket application program interface

Seite 308 - Chapter 15

368 User Datagram Protocol (UDP)

Seite 309

Chapter 17. TCP/IP 369 17.3.2 Programming Notes for Socket API [ 1 ] Programming Notes for TCP (a) Avoid retransmission control in application pro

Seite 310

370 [ 2 ] Programming Notes for UDP The user datagram protocol (UDP) has no flow control, so send/receive data may go missing due to poor line condi

Seite 311

Chapter 17. TCP/IP 371  Host's retransmission cHost's retransmission cHost's retransmission cHost's retransmission control for a

Seite 312

30 2.4.7 Options To specify compiling options and linking options, select the check-box options you want in the Set Options dialog box. Each of avail

Seite 313 - CHKDGT$

372 [ 3 ] Programming Notes for Socket API If TCP/IP communication becomes no longer possible during data transmission, extended functions SOCKET.FN

Seite 314

Chapter 17. TCP/IP 373 (Example) STATUS% = 0 ON ERROR GOTO TCP.ERR 'Prepare for error interrupt (To TCP.ERR 'at the time of error

Seite 315

374 IF STATUS% > 2 THEN '<<<<< Close the socket processing (CALL “SOCKET.FN3 28) >>>>> IF (WERR<&g

Seite 316

Chapter 17. TCP/IP 375  Note for runNote for runNote for runNote for run----time error 105htime error 105htime error 105htime error 105h Socket cl

Seite 317

376 17.4 FTP Client 17.4.1 Overview The FTP.FN3 library implements FTP client services for file transfers to and from FTP servers. Note that there ar

Seite 318

Chapter 17. TCP/IP 377 The FTP client automatically pads the last record of a downloaded program file with null codes (00h) to maintain the fixed-leng

Seite 319 - COUNTRY$

378 [ 2 ] Extension Libraries (*.FN3 and *.EX3) The FTP client treats files with extensions .FN3 and .EX3 as extension libraries. Extension librarie

Seite 320

Chapter 17. TCP/IP 379 Aside: When downloading extension libraries, the BHT uses 128 bytes out of 130 bytes of record length (the remaining 2 bytes w

Seite 321

380 [ 3 ] Data Files The FTP client treats files with extensions other than .PD3, .FN3, and .EX3 as data files. Data file records consist of fields

Seite 322

Chapter 17. TCP/IP 381 The treatment of short records is under application control. The default is to delete any trailing spaces (20h). Alternativ

Seite 323

Chapter 2. Development Environment and Procedures 31 [ 2 ] Linking options Linking Options Description Mapfile Outputs map information to the file

Seite 324

382 Line delimiters inside data records The FTP client can send and receive all codes from 00h to FFh as described above. The treatment of line delim

Seite 325

Chapter 17. TCP/IP 383 17.4.3 Using FTP Client [ 1 ] Basic Procedure First, set up for using the FTP client, as necessary, with the following steps.

Seite 326

384 [ 3 ] Calculating Memory Requirements The FTP protocol specifications do not provide for checking the amount of BHT memory available during down

Seite 327

Chapter 17. TCP/IP 385 Data Files Determine MEM from the field lengths and number of records. BPR = bytes per record = (number of fields) + (sum o

Seite 328

386 17.5 Socket Library (SOCKET.FN3) 17.5.1 Overview String Variables The following are the string variables used by this library together with t

Seite 329

Chapter 17. TCP/IP 387 Function Number List Number Used to: Corresponding Socket API Function .fcAccept 1* –– accept() .fcBind 2 Assign address to

Seite 330

388 Number Used to: Corresponding Socket API Function .fcSocket 26 Create socket socket() .fcWritev 27*–– writev() .fcClose 28 Close socket close(

Seite 331

Chapter 17. TCP/IP 389 17.5.2 Detailed Function Specifications Function #2 .fcBind Assign address to socket Syntax: CALL "SOCKET.FN3" .fcB

Seite 332

390 Function #3 .fcConnect Connect socket Syntax: CALL "SOCKET.FN3" .fcConnect SOCKFD%, FAMILY%, PORT%, address where address is ADDRES

Seite 333

Chapter 17. TCP/IP 391 Run-time errors: Error code Meaning 105h Power-off detected 106h An internal error has occurred in the TCP/IP module during dat

Seite 334

ii How this book is organized This manual is made up of 16 chapters and appendices. Chapter 1. Software Overview for the BHTChapter 1. Software Overv

Seite 335

32 [ 4 ] Outputting list files The Compiler may output three types of list files as listed below depending upon the options specified at the start o

Seite 336

392 Function #6 .fcGSckOpt Get socket option Syntax: CALL "SOCKET.FN3" .fcGSckOpt SOCKFD%, OPTNAME%, option where option is OPTION% or

Seite 337

Chapter 17. TCP/IP 393 Run-time errors: Error code Meaning 105h Power-off detected. 106h An internal error has occurred in the TCP/IP module during da

Seite 338

394 Function #7 .fcHToNL Convert host long (4 bytes) to network byte order Syntax: CALL "SOCKET.FN3" .fcHToNL HOSTLONG, NETLONG Descript

Seite 339

Chapter 17. TCP/IP 395 Function #11 .fcNToHL Convert network long (4 bytes) to host byte order Syntax: CALL "SOCKET.FN3" .fcNToHL NETLONG

Seite 340

396 Function #14 .fcRecv Receive data sent to the specified TCP socket Syntax: CALL "SOCKET.FN3" .fcRecv SOCKFD%, RECVBUFF$[()], RECVLEN

Seite 341

Chapter 17. TCP/IP 397 Run-time errors: Error code Meaning 105h Power-off detected 106h An internal error has occurred in the TCP/IP module during dat

Seite 342

398 Example: Append operation Incoming data: 1024 bytes ("0123456789...0123") Receive buffer: 8 elements, 128 characters each for a

Seite 343

Chapter 17. TCP/IP 399 Example: Overwrite operation Incoming data: 1024 bytes ("0123456789...0123") Receive buffer: 8 elements, 128 c

Seite 344

400 Function #15 .fcRcvfrom Receive data sent to the specified UDP socket Syntax: CALL "SOCKET.FN3" .fcRcvfrom SOCKFD%, RECVBUFF$[()], R

Seite 345

Chapter 17. TCP/IP 401 Run-time errors: Error code Meaning 105h Power-off detected 106h An internal error has occurred in the TCP/IP module during dat

Seite 346

Chapter 2. Development Environment and Procedures 33 •••• Address of object programAddress of object programAddress of object programAddress of ob

Seite 347 - SEARCH

402 Function #17 .fcSelect Monitor socket requests Syntax: CALL "SOCKET.FN3" .fcSelect MAXFD%, READFDSET$, WRITEFDSET$, EXCEPTFDSET$, TI

Seite 348

Chapter 17. TCP/IP 403 Function #18 .fcFDZERO Initialize socket identifier set Syntax: CALL "SOCKET.FN3" .fcFDZERO SOCKFDSET$ Description

Seite 349

404 Parameters: SOCKFD% Socket identifier SOCKFDSET$ Socket identifier set Return value: (None)

Seite 350

Chapter 17. TCP/IP 405 Function #21 .fcFDISSET Get socket identifier status from socket identifier set Syntax: CALL "SOCKET.FN3" .fcFDISS

Seite 351

406 Function #22 .fcSend Send message to another TCP socket Syntax: CALL "SOCKET.FN3" .fcSend SOCKFD%, SENDBUFF$[()], SENDLEN%, SENDMODE

Seite 352

Chapter 17. TCP/IP 407 Run-time errors: Error code Meaning 105h Power-off detected 106h An internal error has occurred in the TCP/IP module during dat

Seite 353

408 Function #23 .fcSendto Send message to another UDP socket Syntax: CALL "SOCKET.FN3" .fcSendto SOCKFD%, SENDBUFF$[()], SENDLEN%, SEND

Seite 354 - TIMEA/TIMEB/TIMEC

Chapter 17. TCP/IP 409 Run-time errors: Error code Meaning 105h Power-off detected 209h Socket identifier is invalid. 216h A parameter is invalid. 228

Seite 355

410 Function #24 .fcSSckOpt Set socket options Syntax: CALL "SOCKET.FN3" .fcSSckOpt SOCKFD%, OPTNAME%, option where option is OPTION% o

Seite 356 - Chapter 16

Chapter 17. TCP/IP 411 Run-time errors: Error code Meaning 105h Power-off detected. 106h An internal error has occurred in the TCP/IP module during da

Seite 357 - 16.1 Overview

34 •••• Symbol table for common variableSymbol table for common variableSymbol table for common variableSymbol table for common variablessss L

Seite 358 - (SYSTEM.FN3)

412 Function #25 .fcShutdwn Shut down socket Syntax: CALL "SOCKET.FN3" .fcShutdwn SOCKFD%, HOWTO% Description: This function shuts down

Seite 359 - R/W: Read and write possible

Chapter 17. TCP/IP 413 Function #26 .fcSocket Create socket Syntax: CALL "SOCKET.FN3" .fcSocket FAMILY%, TYPE%, PROTOCOL%, SOCKFD% Descri

Seite 360

414 Run-time errors: Error code Meaning 105h Power-off detected. 106h An internal error has occurred in the TCP/IP module during data transmission. 1

Seite 361 - Read and write possible

Chapter 17. TCP/IP 415 Function #28 .fcClose Close socket Syntax: CALL "SOCKET.FN3" .fcClose SOCKFD% Description: This function closes t

Seite 362

416 Function #40 .fcTSetup Specify TCP/IP communications pathway Syntax: CALL "SOCKET.FN3" .fcTSetup IFTYPE%, LAYERMODE%, INTERFACE% Des

Seite 363

Chapter 17. TCP/IP 417 Function #41 .fcTCnnSys Connect TCP/IP communications pathway with system settings Syntax: CALL "SOCKET.FN3" .fcTC

Seite 364 - 16.3 Controlling system

418 Function #42 .fcTCnnUsr Connect TCP/IP communications pathway with user settings Syntax: CALL "SOCKET.FN3" .fcTCnnUsr INTERFACE%, I

Seite 365

Chapter 17. TCP/IP 419 Run-time errors: Error code Meaning 34h Communications device file not open 101h Cannot connect to communications pathway 102h

Seite 366

420 Function #43 .fcTDiscnn Disconnect TCP/IP communications pathway Syntax: CALL "SOCKET.FN3" .fcTDiscnn INTERFACE% Description: This

Seite 367 - Chapter 17

Chapter 17. TCP/IP 421 Function #44 .fcTSysGet Get TCP/IP system settings Syntax: CALL "SOCKET.FN3" .fcTSysGet PARA%, data where data i

Seite 368

Chapter 2. Development Environment and Procedures 35 [ 5 ] Outputting a mapfile Select the Mapfile check box of the Linking Options in the Set Option

Seite 369 - 17.1 Two Sides

422 Function #45 .fcTSysSet Set TCP/IP system settings Syntax: CALL "SOCKET.FN3" .fcTSysSet PARA%, data where data is DATA% or DATA$ D

Seite 370 - 17.2 Programming Procedure

Chapter 17. TCP/IP 423 Function #46 .fcTStsGet Get TCP socket status Syntax: CALL "SOCKET.FN3" .fcTStsGet SOCKFD%, PATTERN%, TIMEOUT%, RE

Seite 371

424 17.6 FTP Library (FTP.FN3) 17.6.1 Overview String Variables The following are the string variables used by this library together with their m

Seite 372

Chapter 17. TCP/IP 425 Reply Codes The messages that FTP servers send during and after FTP operations vary, but servers all use the same reply code

Seite 373

426 Reply Codes Description 426 Connection closed; transfer aborted. 450 Requested file action not taken. File unavailable (e.g., file busy). 451 R

Seite 374 - 'interface%

Chapter 17. TCP/IP 427 17.6.2 Detailed Function Specifications Function #1 .fcFTPOpnS Open FTP client session with system settings Syntax: CALL &quo

Seite 375 - 17.3 Socket API

428 Function #2 .fcFTPOpnU Open FTP client session with user settings Syntax: CALL "FTP.FN3" .fcFTPOpnU FTPHANDLE%, SERV.IP$, USERNAME$,

Seite 376

Chapter 17. TCP/IP 429 Function #3 .fcFTPClos Close FTP client session Syntax: CALL "FTP.FN3" .fcFTPClos FTPHANDLE%, REPLY% Description

Seite 377

430 Function #4 .fcPWD Get current directory on FTP server Syntax: CALL "FTP.FN3" .fcPWD FTPHANDLE%, CURDIR$, REPLY% Description: This

Seite 378

Chapter 17. TCP/IP 431 Function #5 .fcCWD Change current directory on FTP server Syntax: CALL "FTP.FN3" .fcCWD FTPHANDLE%, NEWDIR$, REPLY

Seite 379

36 •••• Map for userMap for userMap for userMap for user----defined functiondefined functiondefined functiondefined functionssss Shows the sym

Seite 380

432 Function #6 .fcRETR Download file from FTP server Syntax: CALL "FTP.FN3" .fcRETR FTPHANDLE%, SERV.FNAME$, CLNT.FNAME$, CRLF.TYPE%, CRL

Seite 381 - (Example)

Chapter 17. TCP/IP 433 .ftRcdData1 Treat line delimiters in records as DATA. TRIM trailing spaces in fields. .ftLspDel 10 Treat line delimiters in r

Seite 382

434 CRLF.MODE% = .ftRcdSepa 'Data composition: Will be ignored for 'files except data files DISP.MODE% = .ftDisp 'Enable prog

Seite 383

Chapter 17. TCP/IP 435 Run-time errors: Error code Meaning 02h Syntax error (Incorrect file name) 05h Number of field items or number of digits in a f

Seite 384 - 17.4 FTP Client

436 Function #7 .fcSTOR Upload file to FTP server Syntax: CALL "FTP.FN3" .fcSTOR FTPHANDLE%, SERV.FNAME$, CLNT.FNAME$, CRLF.TYPE%, UP.MOD

Seite 385

Chapter 17. TCP/IP 437 Example: Uploading program file, with progress display CLNT.FNAME$ = "SAMPLE.PD3" 'Name of file on BHT SER

Seite 386

438 Function #8 .fcFSysGet Get FTP system settings Syntax: CALL "FTP.FN3" .fcFSysGet PARA%, ftp.para where ftp.para is FTP.PARA% or FTP

Seite 387

Chapter 17. TCP/IP 439 Function #9 .fcFSysSet Change FTP system settings Syntax: CALL "FTP.FN3" .fcFSysSet PARA%, ftp.para where ftp.para

Seite 388 - [ 3 ] Data Files

440 Function #10 .fcRNFR Change file name on FTP server Syntax: CALL "FTP.FN3" .fcRNFR FTPHANDLE%, OLD.FNAME$, NEW.FNAME$, REPLY% Descri

Seite 389

Chapter 17. TCP/IP 441 Function #11 .fcPORT Set port number for file transfer Syntax: CALL "FTP.FN3" .fcPORT FTPHANDLE%, PORT% Descriptio

Seite 390

Chapter 2. Development Environment and Procedures 37 2.4.8 Starting the BHT-BASIC Compiler from the Command Line You may start the BHT-BASIC Compiler

Seite 391 - 17.4.3 Using FTP Client

442 Function #12 .fcDELE Delete file from FTP server Syntax: CALL "FTP.FN3" .fcDELE FTPHANDLE%, SERV.FNAME$, REPLY% Description: This f

Seite 392 - User Programs (*.PD3)

443 Chapter 18 Bluetooth (BHTs with Bluetooth communications device) CONTENTSCONTENTSCONTENTSCONTENTS 18.1 Bluetooth Communications...

Seite 393 - [ 5 ] FTP Transfers

444 18.1 Bluetooth Communications 18.1.1 Introduction The BHT supports the following profiles based on the BluetoothTM Specification Ver.1.1. • The

Seite 394 - 17.5.1 Overview

Chapter 18. Bluetooth 445 18.1.2 System Components The following figures give examples of Bluetooth networks using the BHT. For further details, refer

Seite 395 - Function Number List

446 • The BHT does not support multiple simultaneous links (Piconet.) As master, the BHT supports only one slave at a time. • As a slav

Seite 396

Chapter 18. Bluetooth 447 18.2 Programming Overview 18.2.1 Software Components The BHT system consists of the BHT main system and Bluetooth communicat

Seite 397 - Assign address to socket

448 18.2.2 Statements and Functions Used Bluetooth communications uses the following statements and functions. (1) Statements and functions Refer t

Seite 398 - Connect socket

Chapter 18. Bluetooth 449 18.2.3 Programming Procedures 18.2.3.1 Discovering Accessible Remote Devices in the Vicinity (Inquiry) The BHT supports the

Seite 399 - Run-time errors:

450 There are two ways to specify the above parameters. • Use the system settings • Specify them in the OPEN statement The user modifies the system

Seite 400 - Get socket option

Chapter 18. Bluetooth 451 18.2.3.2 Serial Link with Remote Device The BHT supports the Serial Port Profile for RS232 (or similar) serial cable emulat

Seite 401

38 [ 2 ] Options The BHT-BASIC 3.5 Compiler supports three types of options—compiler processing options, compiling options, and linking option. 

Seite 402

452 to the specified slave device. Otherwise, the Bluetooth communications device waits for a call from a master before connecting. For further detai

Seite 403 - Function #12 .fcNToHS

Chapter 18. Bluetooth 453 OPEN "COM4:M,SPP,112233AABBCC" AS #4 ' Address for remote device: ' 11:22:33:AA:BB:CC" ' U

Seite 404 - Function #14 .fcRecv

454 18.2.3.3 Dial-Up Networking via Remote Device The BHT supports the Dial-up Networking Profile for accessing the Internet via a modem or other de

Seite 405

Chapter 18. Bluetooth 455 Dial-up networking connections have the following parameters. • Bluetooth device address for remote device •

Seite 406 - Example: Append operation

456 OPEN "COM4:M,DUN" AS #4 (b) Specifying parameters in the OPEN statement OPEN "COM4:M,DUN,112233AABBCC,BHT,30,2" AS #4 &a

Seite 407 - Example: Overwrite operation

Chapter 18. Bluetooth 457 auh% = .soPPPPAP ' PPP authentication procedure: PAP usr$ = "USER" ' User name for PPP authenticat

Seite 408 - Function #15 .fcRcvfrom

458 18.2.3.4 Service Discovery The BHT supports the Service Discovery Application Profile for querying and browsing for services offered by another B

Seite 409

Chapter 18. Bluetooth 459 (a) Using the system settings OPEN "COM4:M,SDAP" as #4 (b) Specifying parameters in the OPEN statement OPEN &q

Seite 410 - Monitor socket requests

460 18.2.4 Programming Notes 18.2.4.1 Retransmission control in serial communications Any system design using wireless communications must assume da

Seite 411

Chapter 18. Bluetooth 461 18.2.4.2 Reading data received in serial communications We recommend that user programs always follow the approach shown be

Seite 412 - Return value: (None)

Chapter 2. Development Environment and Procedures 39 Compiling optionsCompiling optionsCompiling optionsCompiling options Compiling options D

Seite 413 - Function #21 .fcFDISSET

462 Do not use INPUT# or LINE INPUT# statement for reading data received. The INPUT# or LINE INPUT# statement waits for reception of CR (0Dh) or com

Seite 414 - Function #22 .fcSend

Chapter 18. Bluetooth 463 18.2.4.3 Resume Operation Bluetooth communications does not support resume operation. If the BHT shuts itself down due to lo

Seite 415

464 18.2.4.4 Power Supply Control  Power supply control of Power supply control of Power supply control of Power supply control of Bluetooth commun

Seite 416 - Function #23 .fcSendto

Chapter 18. Bluetooth 465 • Power-saving mode introduces delays. For operations involving real-time communications, we recommend that

Seite 417

466 18.3 Bluetooth Statements and Functions 18.3.1 Overview The following statements and functions are available for use with the Bluetooth communi

Seite 418 - Set socket options

Chapter 18. Bluetooth 467 Statement or FunctionUsed to: EOF Read whether there is data in the Bluetooth communications device file receive buffer LOC

Seite 419

468 18.3.2 Detailed Specifications OPEN "COM4:I" Open the Bluetooth communications device file in inquiry mode, discovering accessible re

Seite 420 - Shut down socket

Chapter 18. Bluetooth 469 COM4 This indicates the Bluetooth interface. Note that the BHT cannot open this communications device file concurrentl

Seite 421 - Create socket

470 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 105h Power-off detected 600h Failed to open a Bluetooth

Seite 422

Chapter 18. Bluetooth 471 OPEN "COM4:M" Open the Bluetooth communications device file with the BHT as master and connect to a slave Synta

Seite 423 - Close socket

40 [ 3 ] Error Level Indication by ERRORLEVEL If you specify a +E option at the command line and run the BHT-BASIC 3.5 Compiler, the ERRORLEVEL of M

Seite 424 - Function #40 .fcTSetup

472 COM4 This indicates the Bluetooth interface. Note that the BHT cannot open this communications device file concurrently with the IrDA inter

Seite 425 - Function #41 .fcTCnnSys

Chapter 18. Bluetooth 473 timeout This specifies a time limit for completing the operation. The unit is seconds; the range, 1 to 255. Leaving thi

Seite 426 - Function #42 .fcTCnnUsr

474 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 47h Abnormal end of communications or termination of com

Seite 427

Chapter 18. Bluetooth 475 OPEN "COM4:S" Open the Bluetooth communications device file with the BHT as a slave and wait for a master Synta

Seite 428 - Function #43 .fcTDiscnn

476 COM4 This indicates the Bluetooth interface. Note that the BHT cannot open this communications device file concurrently with the IrDA inter

Seite 429 - Get TCP/IP system settings

Chapter 18. Bluetooth 477 Leaving this parameter blank specifies the use of the system setting. Specifying a parameter does not affect the system sett

Seite 430 - Set TCP/IP system settings

478 CLOSE Close the Bluetooth communications device file Refer to Chapter 14, "Statement Reference." INPUT # Read data from the Bluetoo

Seite 431 - Get TCP socket status

Chapter 18. Bluetooth 479 PRINT # Write data to the Bluetooth communications device file Syntax:Syntax:Syntax:Syntax: Refer to Chapter 14, "

Seite 432 - 17.6 FTP Library (FTP.FN3)

480 WAIT Wait for a change in Bluetooth communications device file receive buffer status Refer to Chapter 14, "Statement Reference." XFI

Seite 433 - Reply Codes

Chapter 18. Bluetooth 481 18.4 Bluetooth Extended Functions (BT.FN3) 18.4.1 Overview The Bluetooth extended functions (BT.FN3) used in a BHT-BASIC CA

Seite 434

Chapter 2. Development Environment and Procedures 41 2.4.9 Output from the BHT-BASIC 3.5 Compiler The BHT-BASIC 3.5 Compiler outputs the following in

Seite 435 - Function #1 .fcFTPOpnS

482 18.4.2 Detailed Specifications Function #1 .fcBTGetVal Read Bluetooth integer setting Syntax: CALL "BT.FN3" .fcBTGetVal PARA%,DATA% De

Seite 436 - Function #2 .fcFTPOpnU

Chapter 18. Bluetooth 483 Function #2 .fcBTSetVal Write Bluetooth integer setting Syntax: CALL "BT.FN3" .fcBTSetVal PARA%,DATA% Descripti

Seite 437 - Close FTP client session

484 Function #3 .fcBTGetStr Read Bluetooth string setting Syntax: CALL "BT.FN3" .fcBTGetStr PARA%,DATA$ Description: This function reads

Seite 438 - Function #4 .fcPWD

Chapter 18. Bluetooth 485 Run-time errors: Error code Meaning 05h Parameter out of the range F0h Mismatch parameter number F1h Mismatch parameter typ

Seite 439 - Function #5 .fcCWD

486 Function #4 .fcBTSetStr Write Bluetooth string setting Syntax: CALL "BT.FN3" .fcBTSetStr PARA%,DATA$ Description: This function wri

Seite 440 - Function #6 .fcRETR

Chapter 18. Bluetooth 487 Function #7 .fcBTSysVer Read Bluetooth system version Syntax: CALL "BT.FN3" .fcBTSysVer BTSYSVER$ Description:

Seite 441

488 Function #8 .fcBTDevInf Read Bluetooth device information Syntax: CALL "BT.FN3" .fcBTDevInf PARA%,DATA$ Description: This function re

Seite 442

Chapter 18. Bluetooth 489 Run-time errors: Error code Meaning 05h Parameter out of the range 34h Bad file name or number. (The Bluetooth communicatio

Seite 443

490 Function #9 .fcBTRmtNam Get remote device name Syntax: CALL "BT.FN3" .fcBTRmtNam BDADDR$,BDNAME$ Description: This function gets the

Seite 444 - Upload file to FTP server

Chapter 18. Bluetooth 491 Run-time errors: Error code Meaning 05h Parameter out of the range 34h Bad file name or number. (The Bluetooth communicati

Seite 445

iii Chapter 12. PowerChapter 12. PowerChapter 12. PowerChapter 12. Power----related Functionsrelated Functionsrelated Functionsrelated Functions D

Seite 446 - Get FTP system settings

42 Output Destination Conditions Address–Source list If the Address-source List check box is selected in the Set Options dialog box. Symbol table

Seite 447 - Change FTP system settings

492 Function #10 .fcBTInqRes Read remote device discovery results Syntax: CALL "BT.FN3" .fcBTInqRes NUM%,BDADDR$[()] Description: This

Seite 448 - Function #10 .fcRNFR

Chapter 18. Bluetooth 493 Run-time errors: Error code Meaning 05h Parameter out of the range 34h Bad file name or number. (The Bluetooth communicati

Seite 449 - Function #11 .fcPORT

494 Function #11 .fcBTRmtInf Get Bluetooth device address for remote device Syntax: CALL "BT.FN3" .fcBTRmtInf BDADDR$ Description: This

Seite 450 - Delete file from FTP server

Chapter 18. Bluetooth 495 Function #12 .fcBTGetStt Read connection status Syntax: CALL "BT.FN3" .fcBTGetStt STATUS% Description: This fun

Seite 451 - Chapter 18

496 Function #13 .fcBTGetLnk Read authenticated Bluetooth device addresses Syntax: CALL "BT.FN3" .fcBTGetLnk NUM%,BDADDR$[()] Description

Seite 452 - 18.1.1 Introduction

Chapter 18. Bluetooth 497 Function #14 .fcBTClrLnk Erase authenticated Bluetooth device addresses Syntax: CALL "BT.FN3" .fcBTClrLnk [BDADD

Seite 453 - 18.1.2 System Components

498 Function #15 .fcBTHold Control power-saving mode Syntax: CALL "BT.FN3" .fcBTHold INTERVAL% Description: This function shifts into th

Seite 454 - Availabl

Chapter 18. Bluetooth 499 Run-time errors: Error code Meaning 05h Parameter out of the range 34h Bad file name or number. (The Bluetooth communicati

Seite 455 - 18.2 Programming Overview

500 Function #20 .fcBTChkSnd Check data transmit result Syntax: CALL "BT.FN3" .fcBTChkSnd STATUS% Description: This function checks whet

Seite 456

Chapter 18. Bluetooth 501 Example: Transmit a message and wait for completion of the transmission PRINT #4, "1234567890" ' Transmit da

Seite 457 - Vicinity (Inquiry)

Chapter 2. Development Environment and Procedures 43 2.4.10 Structure of User Programs and Libraries If you specify a user program to be produced in

Seite 458

502 Function #21 .fcBTGetSvc Read service discovery results Syntax: CALL "BT.FN3" .fcBTGetSvc NUM%,SCLASS%[()],SNAME$[()] Description: T

Seite 459

Chapter 18. Bluetooth 503 SNAME$ entries, the interface stops when the arrays are full. If the service name is longer than the string length of SNAME$

Seite 460

504 AppendicesAppendicesAppendicesAppendices CONTENTSCONTENTSCONTENTSCONTENTS Appendix A Error Codes and Error Messages...

Seite 461 - Chapter 18. Bluetooth

Appendices 505 Appendix AAppendix AAppendix AAppendix A Error Codes and Error MessagesError Codes and Error MessagesError Codes and Error MessagesE

Seite 462

506 Error code Meaning 36h Improper file type (The statement attempts an operation that conflicts with the file type-- data file, communications de

Seite 463

Appendices 507 Error code Meaning 100h Cannot specify communications pathway 101h Cannot connect to communications pathway 102h Communications pa

Seite 464

508 Error code Meaning 293h The problem occurred on the communication pathway. 295h There is no user for login request. 600h Failed to open a Bl

Seite 465

Appendices 509 A2. Compilation ErrorsA2. Compilation ErrorsA2. Compilation ErrorsA2. Compilation Errors Fatal ErrorsFatal ErrorsFatal ErrorsFa

Seite 466 - 18.2.3.4 Service Discovery

510 Syntax ErrorsSyntax ErrorsSyntax ErrorsSyntax Errors Error code & Message error 1: Improper label format error 2: Improper label name

Seite 467

Appendices 511 Error code & Message error 21: Too many variables (register float array) error 22: Too many variables (register string array) erro

Seite 468 - 18.2.4 Programming Notes

44 2.5 Downloading 2.5.1 Overview of Transfer Utility/Ir-Transfer Utility C/Ir-Transfer Utility E Transfer Utility/Ir-Transfer Utility C/Ir-Transfer

Seite 469

512 Error code & Message error 46: error 47: error 48: error 49: error 50: Incorrect use of IF...THEN...ELSE...ENDIF error 51: Incomplete

Seite 470

Appendices 513 Error code & Message error 77: Initial string too long error 78: Array symbols exceed 30 for one DIM, GLOBAL, or PRIVATE statement

Seite 471 - 18.2.4.3 Resume Operation

514 Linking ErrorsLinking ErrorsLinking ErrorsLinking Errors Error Message PRC area size different Out of space in RFG area Out of space in PR

Seite 472

Appendices 515 Error Message Non-array integer register variable area overflow Non-array float register variable area overflow Register memory pool a

Seite 473 - User Program

516 Library ErrorsLibrary ErrorsLibrary ErrorsLibrary Errors Error Message Cannot find object to be deleted [objectname] Designated object alr

Seite 474 - Functions

Appendices 517 Appendix BAppendix BAppendix BAppendix B Reserved WordsReserved WordsReserved WordsReserved Words The following list shows reser

Seite 475

518 Appendix CAppendix CAppendix CAppendix C Character SetsCharacter SetsCharacter SetsCharacter Sets C1. Character SetC1. Character SetC1. Cha

Seite 476 - [#]filenumber

Appendices 519 C2. National Character SetsC2. National Character SetsC2. National Character SetsC2. National Character Sets You may switch characte

Seite 477 - Syntax errors:Syntax errors:

520 Appendix DAppendix DAppendix DAppendix D I/O PortsI/O PortsI/O PortsI/O Ports Input PortsInput PortsInput PortsInput Ports A user p

Seite 478

Appendices 521 Port No. Bit assign- ment Monitors the following: - 0 Deactivated 0 Wakeup function .pvWupOn 1Activated - 0 Initiated by the power key

Seite 479

Chapter 2. Development Environment and Procedures 45 2.6 Executing a User Program 2.6.1 Starting To run a user program, start System Mode and select

Seite 480

522 Port No. Bit assign-ment Monitors the following: - 0 Released 0 Magic key 1 .pvM1kyOn 1 Held down - 0 Released 1 Magic key 2 .pvM2kyOn 1 Held

Seite 481

Appendices 523 Port No. Bit assign-ment Monitors the following: .pvRwuOff 0 Deactivated .pnRwuCtrl 60F0h 0 Remote wakeup function *13 .pvRwuOn 1 Acti

Seite 482

524 *8 A user program returns the A/D converted value (0 to 255) of the battery voltage level (0 to 7V). The returned value is an instantaneous valu

Seite 483

Appendices 525 Output PortsOutput PortsOutput PortsOutput Ports A user program can control the hardware through the output ports by using the

Seite 484

526 Port No. Bit assign-ment Controls the following: .pnTmPOff 6030h 7-0 Effective held-down time of power key *10 - 1-255 .pvCPBHT 0 BHT-protocol .

Seite 485

Appendices 527 *1 The indicator LED is controllable only when the bar code device file is closed. If the file is opened, the OUT statement will be ig

Seite 486

528 *11 You can set the communications protocol type for transmitting files with the XFILE statement. *12 You may set the BHT’s ID number to be used

Seite 487

Appendices 529 Appendix EAppendix EAppendix EAppendix E Key Number Assignment on the Key Number Assignment on the Key Number Assignment on the Key

Seite 488

530 Appendix FAppendix FAppendix FAppendix F Memory AreaMemory AreaMemory AreaMemory Area Memory MapMemory MapMemory MapMemory Map The

Seite 489 - (BT.FN3)

Appendices 531 ROM 8MB, RAM 512KB Type (except BHT8048DB)System work area (512KB) Font area JIS Level 1 font

Seite 490 - Function #1 .fcBTGetVal

46 Chapter 3 Program Structure CONTENTSCONTENTSCONTENTSCONTENTS 3.1 Program Overview ...

Seite 491 - Function #2 .fcBTSetVal

532 Memory ManagementMemory ManagementMemory ManagementMemory Management The BHT manages the user area of the memory for user programs and dat

Seite 492 - Function #3 .fcBTGetStr

Appendices 533 Appendix GAppendix GAppendix GAppendix G Handling Space CharactersHandling Space CharactersHandling Space CharactersHandling Space C

Seite 493

534 To handle space characters as data To handle trailing spaces in a data field as data (not as padding characters), you must take special co

Seite 494 - Function #4 .fcBTSetStr

Appendices 535 Example 3 When specifying a field data to be searched, do not include trailing spaces in a data field. A B CA B CA B CA B

Seite 495 - Function #7 .fcBTSysVer

536 To make the BHT handle space characters as dataTo make the BHT handle space characters as dataTo make the BHT handle space characters as data

Seite 496 - Function #8 .fcBTDevInf

Appendices 537 Appendix HAppendix HAppendix HAppendix H Programming NotesProgramming NotesProgramming NotesProgramming Notes Program file na

Seite 497

538 Appendix IAppendix IAppendix IAppendix I Program SamplesProgram SamplesProgram SamplesProgram Samples Writing the function for receiving b

Seite 498 - Get remote device name

Appendices 539 .kb$ = input$(1) while .kb$<>"" if instr(esc$, .kb$) then'Key designated in esc$? fnbarkey$ = .kb$ 'Then, ret

Seite 499

540 Testing the written functionTesting the written functionTesting the written functionTesting the written function while 1 '

Seite 500 - Function #10 .fcBTInqRes

Appendices 541 Appendix JAppendix JAppendix JAppendix J Quick ReferenceQuick ReferenceQuick ReferenceQuick Reference for Statements and Functifo

Seite 501

Chapter 3. Program Structure 47 3.1 Program Overview 3.1.1 Statement Blocks A statement block is a significant set of statements (which is also called

Seite 502 - Function #11 .fcBTRmtInf

542 Handling errors Statements ON ERROR GOTO Enables error trapping. RESUME Causes program execution to resume at a specified location after

Seite 503 - Read connection status

Appendices 543 Controlling the LCD screen Statements APLOAD Loads a user-defined font in the single-byte ANK mode. CLS Clears the LCD screen. CUR

Seite 504 - Function #13 .fcBTGetLnk

544 Controlling the keyboard input Statements INPUT Reads input from the keyboard into a variable. KEY Assigns a string or a control code to a f

Seite 505 - Function #14 .fcBTClrLnk

Appendices 545 Communicating with I/Os Statements OUT Sends a data byte to an output port. POWER Controls the automatic power-off facility. WAIT Pau

Seite 506 - Control power-saving mode

546 Manipulating data files and user program files Statements CLFILE Erases the data stored in a data file. CLOSE Closes file(s). FIELD Allocate

Seite 507

Appendices 547 Functions BCC$ Returns a block check character (BCC) of a data block. EOF Tests whether the end of a device I/O file has been reache

Seite 508 - Check data transmit result

548 Manipulating string data Functions ASC Returns the ASCII code value of a given character. CHR$ Returns the character corresponding to a giv

Seite 509

Appendices 549 Appendix KAppendix KAppendix KAppendix K Unsupported Statements and Unsupported Statements and Unsupported Statements and Unsupporte

Seite 510 - Function #21 .fcBTGetSvc

550 SupplementSupplementSupplementSupplement CONTENTSCONTENTSCONTENTSCONTENTS Supplement A What's different from the BHT-5000?...

Seite 511

Supplement 551 Suuplement ASuuplement ASuuplement ASuuplement A What's different from the What's different from the What's different

Seite 512 - AppendicesAppendices

48 [ 3 ] User-defined Functions Before calling user-defined functions, it is necessary to define those functions with any of the following statement

Seite 513

552 •••• Switching time between sending and receiving on the IrDA interfaceSwitching time between sending and receiving on the IrDA interfaceSwit

Seite 514

Supplement 553 A.3 Screen displayA.3 Screen displayA.3 Screen displayA.3 Screen display Item BHT-5000 BHT-8000 BHT-2000 compatible mode Available

Seite 515

554 A.4 KeyboardA.4 KeyboardA.4 KeyboardA.4 Keyboard Item BHT-5000 BHT-8000 Magic keys *1 M1 and M2 keys M1, M2, M3, and M4 keys Default trigger

Seite 516

Supplement 555 A.6 FilesA.6 FilesA.6 FilesA.6 Files Item BHT-5000 BHT-8000 File storage device(s) RAM (Drive A) Flash ROM (Drive B) Flash ROM (The

Seite 517 - A2. Compilation Errors

556 A.A.A.A.8 Beeper & vibrator control8 Beeper & vibrator control8 Beeper & vibrator control8 Beeper & vibrator control Item BHT-

Seite 518

Supplement 557 Supplement BSupplement BSupplement BSupplement B What's different from the What's different from the What's different

Seite 519

558 B.3 Screen displB.3 Screen displB.3 Screen displB.3 Screen displayayayay Item BHT-6000 BHT-8000 Standard-size font: 16 x 6 (6 x 8) Standard-s

Seite 520

Supplement 559 B.4 KeyboardB.4 KeyboardB.4 KeyboardB.4 Keyboard Item BHT-6000 BHT-8000 Magic keys *1 M1 and M2 keys M1, M2, M3, and M4 keys Defau

Seite 521

560 B.6 FilesB.6 FilesB.6 FilesB.6 Files Item BHT-6000 BHT-8000 File storage device(s) RAM (Drive A) Flash ROM (Drive B) Flash ROM (The RAM is use

Seite 522

Supplement 561 B.8 Beeper & vibrator controlB.8 Beeper & vibrator controlB.8 Beeper & vibrator controlB.8 Beeper & vibrator control

Seite 523

Chapter 3. Program Structure 49 3.1.2 Notes for Jumping into/out of Statement Blocks It is not recommended to jump control from a main routine or sub

Seite 524

562 Supplement CSupplement CSupplement CSupplement C What's different from the What's different from the What's different fro

Seite 525

Supplement 563 C.3 Monitor the CUC.3 Monitor the CUC.3 Monitor the CUC.3 Monitor the CU state state state state Item BHT-7000 BHT-8000 Get the CU s

Seite 526 - C1. Character Set

564 C.7 Remote wakeupC.7 Remote wakeupC.7 Remote wakeupC.7 Remote wakeup Item BHT-7000 BHT-8000 When the rechargeable battery cartridge is loaded

Seite 527 - C2. National Character Sets

IndexIndexIndexIndex _ _(underline, underscore), 433, 436 1 12-dot font, 87 16-dot font, 87 A ACK, 143, 144, 309 address-source list, 30, 33, 3

Seite 528

BEEP, 85, 107, 129, 152, 157, 158, 159, 517, 544, 556, 561, 563 beeper, ii, iii, 107, 121, 136, 140, 157, 158, 191, 242, 245, 249, 524, 528, 544, 54

Seite 529

170, 171, 223, 312, 517, 541 chained, 50, 67, 147, 153, 154, 164, 170, 223, 312 chaining, ii, 50 charaattribute, 88, 169, 280, 281 character attribu

Seite 530

counter, 216, 258, 259 country code, 246, 311, 312, 543 countrycode, 311, 312, 519 CRC-16, 303, 358 cross reference, 5, 30, 39, 51, 297, 509 CU, v,

Seite 531

469, 472, 476, 523 directories, 27 directory, 27, 37, 41, 43, 114, 115, 166, 220, 376, 385, 424, 426, 430, 431, 432, 436, 438, 440 directory, direct

Seite 532

FD_ISSET, 387, 405 FD_SET, 387, 403 FD_ZERO, 387, 403 field, 113, 115, 124, 193, 194, 201, 266, 271, 292, 293, 295, 339, 353, 380, 385, 432, 433, 43

Seite 533

239, 275, 279, 505, 517, 541, 549 GOTO, 16, 47, 49, 53, 129, 152, 205, 206, 208, 236, 237, 275, 374, 517, 541, 549 H header, 32, 124, 296, 341, 343,

Seite 534

50 3.2 Handling User Programs 3.2.1 User Programs in the Memory The user area of the memory (memories) in the BHT can store more than one user prog

Seite 535

239, 279, 322, 517, 527, 543, 544, 554, 559, 562 KEY OFF, 152, 217, 218, 238, 239, 322, 544 KEY ON, 133, 152, 217, 218, 238, 239, 322, 544 keyboard

Seite 536

Multi-statements, 54 N national character, 103, 311, 312, 518, 519, 543 non-array integer variable, 66, 170, 175, 177, 197, 284 non-array real varia

Seite 537

461, 517 OUT, 6, 85, 87, 96, 97, 99, 100, 101, 102, 104, 105, 108, 116, 121, 125, 136, 146, 150, 151, 152, 158, 245, 256, 257, 281, 289, 323, 345, 3

Seite 538

register variable, 6, 7, 30, 34, 35, 36, 39, 67, 71, 136, 138, 185, 186, 187, 192, 193, 203, 268, 299, 510, 512, 515, 532, 542 Relational operations

Seite 539

440, 441, 442, 456, 457, 507 socket API, 367, 369, 387, 388, 389, 390, 392, 394, 395, 396, 400, 402, 403, 405, 406, 408, 410, 412, 413, 415 socket a

Seite 540

286, 548 subnet mask, 363 Subnet mask, 363, 365, 386, 418, 421 subroutine, 47, 205, 206, 279, 541 subscript, 57, 65, 66, 185, 187, 189, 190, 203, 20

Seite 541

447, 449, 450, 452, 455, 458, 460, 461, 463, 464, 479, 487, 492, 494, 496, 520, 523, 524, 525, 527, 532, 537, 542, 546, 556, 561, 563 user-defined f

Seite 542

BHT-BASIC (BHT-8000 series) Programmer’s Manual 3rd Edition, June 2003 DENSO WAVE INCORPORATED The purpo

Seite 543

Chapter 3. Program Structure 51 3.2.3 Included Files "Included files" are separate source programs which may be called by the INCLUDE metaco

Seite 544

iv Notational Conventions Used in This BookNotational Conventions Used in This BookNotational Conventions Used in This BookNotational Conventions

Seite 545

52 Chapter 4 Basic Program Elements CONTENTSCONTENTSCONTENTSCONTENTS 4.1 Structure of a Program Line ...

Seite 546

Chapter 4. Basic Program Elements 53 4.1 Structure of a Program Line 4.1.1 Format of a Program Line A program line consists of the following element

Seite 547 - 'the initial state

54 [ 2 ] Statements Statements can come in two types: executable and declarative statements. • Executable statements• Executable statements• Executa

Seite 548

Chapter 4. Basic Program Elements 55 4.1.2 Program Line Length A program line is terminated with a CR code by pressing the carriage return key. The a

Seite 549 - Controlling program flow

56 4.2 Usable Characters 4.2.1 Usable Characters Listed below are characters which can be used for writing programs. Note that a double quote ("

Seite 550 - Statements

Chapter 4. Basic Program Elements 57 4.2.2 Special Symbols and Control Codes Symbols and control codes used outside of a character string have the fo

Seite 551 - Controlling the LCD screen

58 Symbols and control codes Typical use : (Colon) • Separates statements. • Separates time information in TIME$ function. ; (Semicolon) Line feed c

Seite 552

Chapter 4. Basic Program Elements 59 4.3 Labels A label can contain the following characters: • Alphabet characters • Numeral characters • Period (.)

Seite 553 - Communicating with I/Os

60 4.4 Identifiers Identifiers for the names of variables should comprise the same alphanumerics as the labels. Rules for naming identifiersRule

Seite 554

Chapter 4. Basic Program Elements 61 4.5 Reserved Words "Reserved words" are keywords to be used in statements, functions, and operators. F

Seite 555 - Manipulating numeric data

v Icons Used in This BookIcons Used in This BookIcons Used in This BookIcons Used in This Book Statements and functions unique to BHT-BASIC.

Seite 556

62 Chapter 5 Data Types CONTENTSCONTENTSCONTENTSCONTENTS 5.1 Constants...

Seite 557

Chapter 5. Data Types 63 5.1 Constants 5.1.1 Types of Constants A constant is a data item whose value does not change during program execution. Const

Seite 558 - SupplementSupplement

64 Real ConstantsReal ConstantsReal ConstantsReal Constants Real constants should be formatted as shown below. Syntax: sign mantissa Syntax:

Seite 559 - A.1 Communication

Chapter 5. Data Types 65 5.2 Variables A variable is a symbolic name that refers to a unit of data storage. The contents of a variable can change duri

Seite 560 - A.2 Bar code reading

66 Memory OccupationMemory OccupationMemory OccupationMemory Occupation A string variable occupies the memory space by (the number of characte

Seite 561 - A.3 Screen display

Chapter 5. Data Types 67 5.2.2 Classification of Variables Work VariablesWork VariablesWork VariablesWork Variables A work variable is intended

Seite 562

68 5.3 User-defined Functions Out of user-defined functions, the SUB and FUNCTION functions can be called from other files. The DEF FN function can b

Seite 563

Chapter 5. Data Types 69 5.4 Type Conversion 5.4.1 Type Conversion BHT-BASIC has the type conversion facility which automatically converts a value of

Seite 564

70 5.4.2 Type Conversion Examples The following examples show the type conversion from real to integer. Assignment of Real Expressions to Integer

Seite 565

Chapter 5. Data Types 71 5.5 Scope of Variables You may scope work variables and register variables to be local or global with the PRIVATE or GLOBAL s

Seite 566

vi AbbreviationsAbbreviationsAbbreviationsAbbreviations ANK Alpha-Numeric and Katakana BASIC Beginners All purpose Symbolic Instruction Code

Seite 567

72 If used inside the SUB or FUNCTION function in the same file where the global variable is defined, the variable will also have the same value. (Ex

Seite 568

Chapter 5. Data Types 73 5.5.2 Local Variables A local variable can be accessed only in a file where it is defined. Write PRIVATE preceding a desired

Seite 569

74 5.5.3 Variables Not Declared to be Global or Local If not declared to be global or local, a variable is closed in each file where it is defined.

Seite 570

Chapter 5. Data Types 75 5.5.4 Common Variables A common variable should be declared in a main object beforehand. To share the common variable by file

Seite 571

76 Chapter 6 Expressions and Operators CONTENTSCONTENTSCONTENTSCONTENTS 6.1 Overview...

Seite 572

Chapter 6. Expressions and Operators 77 6.1 Overview An expression is defined as a combination of constants, variables, and other expressions which ar

Seite 573 - IndexIndex

78 6.2 Operator Precedence When an expression contains more than one operator, BHT-BASIC performs the operations in the standard precedence as shown

Seite 574

Chapter 6. Expressions and Operators 79 6.3 Operators 6.3.1 Arithmetic Operators Arithmetic operators include a negative sign (-) and operators for mu

Seite 575

80 6.3.2 Relational Operators A relational operator compares two values. Depending upon whether the comparison is true or false, the operator returns

Seite 576

Chapter 6. Expressions and Operators 81 6.3.3 Logical Operators A logical operator combines multiple tests and manipulates Boolean operands, then retu

Seite 577

1 Chapter 1 Software Overview for the BHT CONTENTSCONTENTSCONTENTSCONTENTS 1.1 Software Overview...

Seite 578

82 [ 2 ] The AND operator The AND operator ANDs the same order bits in two expressions on either side of the operator, then sets 1 to the resultant

Seite 579

Chapter 6. Expressions and Operators 83 6.3.4 Function Operators The following two types of functions are available in BHT-BASIC, both of which work a

Seite 580

84 Comparison of Character StringsComparison of Character StringsComparison of Character StringsComparison of Character Strings The string ope

Seite 581

85 Chapter 7 I/O Facilities CONTENTSCONTENTSCONTENTSCONTENTS 7.1 Output to the LCD Screen...

Seite 582

86 7.1 Output to the LCD Screen 7.1.1 Display Fonts [1] Screen mode and font size Listed below are the fonts available on BHT. Screen mode Font s

Seite 583

Chapter 7. I/O Facilities 87 Screen modeScreen modeScreen modeScreen mode The ANK mode displays ANK characters listed in Appendices C1 and C2.

Seite 584

88 [2] Character attributes (Reverse font and enlargement attribute) Reverse font attributeReverse font attributeReverse font attributeReverse f

Seite 585

Chapter 7. I/O Facilities 89 7.1.2 Coordinates on the LCD To locate characters on the coordinates of the LCD screen, use the LOCATE statement. To obt

Seite 586

90 Two-byte Kanji Mode • Standard-size font Be careful about the specification of line numbers in figures below. A single column shown below represen

Seite 587 - BHT-BASIC

Chapter 7. I/O Facilities 91 • Small-size font Be careful about the specification of line numbers in figures below. A single column shown below repres

Kommentare zu diesen Handbüchern

Keine Kommentare