Denso Power Net Terminal BHT-7500 Spezifikationen

Stöbern Sie online oder laden Sie Spezifikationen nach Barcodeleser Denso Power Net Terminal BHT-7500 herunter. Denso Power Net Terminal BHT-7500 Specifications Benutzerhandbuch

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

Inhaltsverzeichnis

Seite 2

1Chapter 1 Software Overview for the BHTCONTENTS1.1 Software Overview...

Seite 3

Chapter 7. I/O Facilities91[ 2 ] BHT-4000 Displaying Kanji CharactersTo display characters in the condensed two-byte Kanji mode, the BHT-4000 condens

Seite 4 - How this book is organized

92Two-byte Kanji Mode 10 columns x 5 lines for full-width characters only,20 columns x 5 lines for half-width characters onlyBe careful about the spec

Seite 5

Chapter 7. I/O Facilities93Condensed Two-byte Kanji Mode 13 columns x 5 lines for full-width characters only,26 columns x 5 lines for half-width chara

Seite 6

94[ 3 ] BHT-5000 Displaying Kanji CharactersTo display Kanji characters, it is necessary to download the Kanji font file consisting of JISLevel 1 and

Seite 7 - Icons Used in This Book

Chapter 7. I/O Facilities95Two-byte Kanji Mode 8 columns x 4 lines for full-width characters only,16 columns x 4 lines for half-width characters onlyB

Seite 8 - BHT and CU

96Condensed Two-byte Kanji Mode 10 columns x 4 lines for full-width characters only,21 columns x 4 lines for half-width characters onlyBe careful abou

Seite 9 - Screen Indication

Chapter 7. I/O Facilities97[ 4 ] BHT-6000/BHT-6500 Displaying Kanji CharactersTo display Kanji characters, it is necessary to download the Kanji font

Seite 10 - Chapter 1

98Small-size font (16 columns x 8 lines)Standard-size font6 columns x 3 lines for full-width characters only,12 columns x 3 lines for half-width chara

Seite 11 - 1.1 Software Overview

Chapter 7. I/O Facilities99Small-size font 8 columns x 4 lines for full-width characters only,16 columns x 4 lines for half-width characters onlyBe ca

Seite 12

100[ 5 ] BHT-7000(1) Normal-width(2) Double-width Displaying Kanji CharactersTo display Kanji characters, it is necessary to download Kanji font files

Seite 13 - ■ BHT-5000/BHT-6000/BHT-6500

21.1 Software Overview1.1.1 Software Structure of the BHTThe structure of software for the BHT is shown below. BHT-3000When downloaded, user progra

Seite 14

Chapter 7. I/O Facilities101 Locating Characters on the LCD ScreenUsing the LOCATE statement locates characters on the coordinates of the LCD screen.

Seite 15

102Standard-size font 8 columns x 4 lines for full-width characters only,4 columns x 4 lines for full-width characters in double-width mode only,16 co

Seite 16 - 1.1.2 Overview of BHT-BASIC

Chapter 7. I/O Facilities103Small-size font 10 columns x 5 lines for full-width characters only,5 columns x 5 lines for full-width characters in doubl

Seite 17 - 1.2 BHT-BASIC

104[ 6 ] BHT-7500(1) Normal-width(2) Double-width Displaying Kanji CharactersTo display Kanji characters, it is necessary to download Kanji font files

Seite 18 - BHT-BASIC 3.0?

Chapter 7. I/O Facilities105 Locating Characters on the LCD ScreenUsing the LOCATE statement locates characters on the coordinates of the LCD screen.

Seite 19 - Defining constants

106Standard-size font 10 columns x 10 lines for full-width characters only,5 columns x 10 lines for full-width characters in double-width mode only,20

Seite 20 - 1.3.2 Interpreter

Chapter 7. I/O Facilities107Small-size font 13 columns x 13 lines for full-width characters only,6 columns x 13 lines for full-width characters in dou

Seite 21 - Chapter 2

1087.1.3 Dot Patterns of Fonts Character fontsIn the figures below, " " shows a display area for characters. Any character is displayed wi

Seite 22

Chapter 7. I/O Facilities109Standard-size fontSmall-size font*1 The BHT-7000/BHT-7500 fonts do not use the lowermost dot line of the letter frame.Two-

Seite 23 - 2.1.1 Required Hardware

110 Cursor shapeThe LOCATE statement specifies the cursor shape--Underline cursor, full block cursor, orinvisible.In the BHT-7000/BHT-7500, you may d

Seite 24 - 2.1.2 Required Software

Chapter 1. Software Overview for the BHT3 BHT-4000Of all the system programs, the drivers, BHT-BASIC Interpreter, and System Mode will bestored in th

Seite 25 - 2.2.1 Developing Procedures

Chapter 7. I/O Facilities111Standard-size font (8 x 16 dots)Small-size font (6 x 12 dots)*2In the BHT-7500, the underline cursor of the standard-size

Seite 26

1127.1.4 Mixed Display of Different Character Types orDifferent-size Fonts[ 1 ] Displaying ANK, Kanji, and Condensed Kanji in OneLineIt is possible to

Seite 27 - 2.3 Writing a Source Program

Chapter 7. I/O Facilities113[ 3 ] Displaying Normal- and Double-width Characters on theSame ScreenThe BHT-7000/BHT-7500 can mix-display the normal- an

Seite 28

1147.1.6 VRAMThe INP function may read the VRAM data. The OUT statement writes data into the VRAM sothat graphics may be displayed on the LCD dotwise

Seite 29 - 2.4 Producing a User Program

Chapter 7. I/O Facilities115 Setting an 8-bit binary patternThe data of an 8-bit binary pattern should be designated by bit 7 (LSB) to bit 0 (MSB). I

Seite 30 - Procedure

1167.1.7 Displaying the System Status (BHT-4000/BHT-5000/BHT-6000/BHT-6500)The BHT-4000 may display the voltage level icon and shifted key icon on the

Seite 31 - [ 1 ] Select a source file

Chapter 7. I/O Facilities117 Notes relating to the system statusNotes when the system status is displayedThe following statements and functions will c

Seite 32 - [ 1 ] Create a new project

118[ 2 ] BHT-5000/BHT-6000/BHT-6500 Turning the system status indication on or offYou may turn the system status indication on or off on the SET DISP

Seite 33

Chapter 7. I/O Facilities1197.1.8 Other Facilities for the LCD Setting national charactersUsing the COUNTRY$ function displays currency symbols and s

Seite 34

1207.2 Input from the Keyboard7.2.1 Function KeysAny of the following operations makes the pressed key act as a function key:- Pressing one of the fun

Seite 35

4 BHT-5000/BHT-6000/BHT-6500The BHT-5000/BHT-6000/BHT-6500 has a flash ROM and RAM. In the flash ROM reside thedrivers, BHT-BASIC Interpreter, Syste

Seite 36

Chapter 7. I/O Facilities121 Defining a function key as the LCD backlight function on/off keyYou can define a particular function key as the backlight

Seite 37 - 2.4.4 Compiling and Building

1227.2.3 Alphabet Entry FunctionThe alphabet entry function allows you to enter alphabetic characters, a space, and symbolsfrom the BHT keyboard (keyp

Seite 38 - [ 3 ] Building

Chapter 7. I/O Facilities123(2) Entering alphabetic characters from the keypad1) Find a target key which is assigned an alphabetic character to be inp

Seite 39

124In the example below, the character "A" may be entered with the alphabet entry functionor may be generated by pressing the F1 key which h

Seite 40 - Main Window

Chapter 7. I/O Facilities1252) Hold down the trigger switch.3) Without releasing the trigger switch, press the 5 key.4) Release the trigger switch.5)

Seite 41

1267) Release the trigger switch.8) Press the Enter key to complete the entry operation.[ 2 ] BHT-5000/BHT-7000/BHT-7500 (32-key pad models)The BHT-50

Seite 42 - 2.4.7 Options

Chapter 7. I/O Facilities127[ 3 ] BHT-7000 (26-key pad model)In addition to the numeric entry from the keypad, the BHT-7000 with a 26-key pad supports

Seite 43 - • Label–address file (.LBL)

128 Alphabet Entry Procedure(1) Switch to the alphanumeric entry system as follows:Issue "OUT &h60B0,1".(2) Switch to the alphabet entry

Seite 44 - Address-source list

Chapter 7. I/O Facilities129When no key is ready to be established, pressing any of the function keys, BS, C,ENT, and magic keys will return the key d

Seite 45 - Symbol table

1307.2.4 Other Facilities for the Keyboard[ 1 ] Auto-repeatThe keys on the BHT series are not auto-repeat.[ 2 ] Shift key BHT-3000The Shift key can b

Seite 46 - • Symbol table for labels

Chapter 1. Software Overview for the BHT5 BHT-7000/BHT-7500The BHT-7000/BHT-7500 has a flash ROM and RAM. All of the system programs, user pro-grams

Seite 47 - Cross reference

Chapter 7. I/O Facilities1317.3 Timer and Beeper7.3.1 Timer FunctionsThe timer functions (TIMEA, TIMEB, and TIMEC) are available in BHT-BASIC for accu

Seite 48 - [ 5 ] Outputting a mapfile

1327.4 Controlling and Monitoring the I/Os7.4.1 Controlling by the OUT StatementThe OUT statement can control the input and output devices (I/Os) list

Seite 49 - • Details of object codes

Chapter 7. I/O Facilities1337.4.3 Monitoring by the WAIT StatementThe WAIT statement monitors the input and output devices (I/Os) listed in Appendix D

Seite 50 - Command Line

134Chapter 8 FilesCONTENS8.1 File Overview... 1338.1.1 Da

Seite 51 - [ 2 ] Options

Chapter 8. Files1358.1 File Overview8.1.1 Data Files and Device I/O FilesBHT-BASIC treats not only data files but also bar code device I/Os and commun

Seite 52

1368.2 Data Files8.2.1 OverviewLike user programs, data files will be stored in the user area of the memory. The location of theuser area differs dep

Seite 53

Chapter 8. Files1378.2.3 Structure of Data Files RecordA data file is made up of a maximum of 32767 records. A record is a set of data in a datafile

Seite 54

138• Maximum Number of Registrable RecordsYou may declare the maximum number of records registrable in a data file by using theRECORD option in the OP

Seite 55

Chapter 8. Files1398.2.5 Programming for Data Files Input/Output for Numeric Data- To write numeric data into a data file:It is necessary to use the

Seite 56

140 Restrictions on Input/Output of Data FilesNo INPUT#, LINE INPUT#, or PRINT# statement or INPUT$ function can access datafiles. To access data fil

Seite 57 - 2.5 Downloading

6 System ProgramsDriversA set of programs which is called by the BHT-BASIC Interpreter or System Mode anddirectly controls the hardware. The drivers

Seite 58 - 2.5.2 Setting up the BHT

Chapter 8. Files1418.2.6 About DrivesThe BHT-5000/BHT-6000/BHT-6500/BHT-7000/BHT-7500 has logical drives. BHT-5000/BHT-6000/BHT-6500Drive A and drive

Seite 59 - BHT-7000/BHT-7500

1428.3 Bar Code Device8.3.1 Overview Opening the Bar Code Device by OPEN "BAR:" StatementThe OPEN "BAR:" statement opens the bar

Seite 60 - 2.6 Executing a User Program

Chapter 8. Files143 Specifying Options in the OPEN "BAR:" StatementYou may also specify several options as listed below for each of the bar

Seite 61 - Chapter 3

144 Read Mode of the Trigger SwitchIn the BHT-6000/BHT-6500/BHT-7000/BHT-7500, the trigger switch function is assigned tothe following magic keys by d

Seite 62 - 3.1 Program Overview

Chapter 8. Files145 Controlling the Reading Confirmation LED and Beeper (Vibrator) at theTime of Scanning for Confirmation of Successful Reading (BHT-

Seite 63 - [ 3 ] User-defined Functions

1468.4 Communications Device8.4.1 Hardware Required for Data Communications[ 1 ] BHT-3000/BHT-4000/BHT-5000The following hardware is required for comm

Seite 64

Chapter 8. Files1478.4.2 Programming for Data CommunicationsSetting the Communications ParametersUse the OPEN "COM:" statement to set the co

Seite 65 - 3.2 Handling User Programs

148 For direct-connect interface*1The 115200 bps and 57600 bps are available in the BHT-7000/BHT-7500.*2The parity, character length, and stop bit len

Seite 66 - 3.2.3 Included Files

Chapter 8. Files1498.4.3 Overview of Communications ProtocolsThe BHT series supports the three communications protocols—BHT-protocol, BHT-Ir protocol,

Seite 67 - Chapter 4

150[ 2 ] BHT-Ir protocol (BHT-6000/BHT-6500/BHT-7000/BHT-7500)In addition to the BHT-protocol, the BHT-6000/BHT-6500/BHT-7000/BHT-7500 supports theBHT

Seite 68 - [ 1 ] Labels

Chapter 1. Software Overview for the BHT71.1.2 Overview of BHT-BASICWith BHT-BASIC, you can customize application programs for meeting your specific n

Seite 69 - [ 3 ] Comments

Chapter 8. Files151[ 3 ] Multilink protocol (BHT-5000 only)In addition to the BHT-protocol, the BHT-5000 may support the multilink protocol which is u

Seite 70 - 4.1.2 Program Line Length

1528.4.4 File Transfer Tools[ 1 ] Transfer UtilityTransfer Utility is optionally available in two versions: MS-DOS–based and Windows-based. Itsupport

Seite 71 - 4.2 Usable Characters

Chapter 8. Files153[ 4 ] Multilink Transfer Utility (BHT-5000 only)Multilink Transfer Utility is optional MS-DOS–based software. It supports the mult

Seite 72 - DATE$ function

154Chapter 9 Event Polling and Error/Event TrappingCONTENTS9.1 Overview...

Seite 73

Chapter 9. Event Polling and Error/Event Trapping1559.1 OverviewBHT-BASIC supports event polling and two types of trapping: error trapping and event

Seite 74 - 4.3 Labels

1569.2 Event Polling[ 1 ] Programming sampleThe program below shows the event polling example which monitors the bar code reader andthe keyboard for o

Seite 75 - 4.4 Identifiers

Chapter 9. Event Polling and Error/Event Trapping157[ 2 ] I/O devices capable of being monitored by the event poll-ingListed below are the I/O devices

Seite 76 - 4.5 Reserved Words

1589.3 Error Trapping[ 1 ] OverviewIf a run-time error occurs during program running, error trapping makes the program cause aninterrupt upon completi

Seite 77 - Chapter 5

Chapter 9. Event Polling and Error/Event Trapping159[ 2 ] Programming for trapping errorsTo trap errors, use the ON ERROR GOTO statement in which you

Seite 78 - 5.1 Constants

1609.4 Event (of Keystroke) Trapping[ 1 ] OverviewIf any of the function keys previously specified for keystroke trapping is pressed, event trappingma

Seite 79 - Real Constants

81.2 BHT-BASIC1.2.1 FeaturesBHT-BASIC is designed as an optimal programming language in making application programsfor the bar code handy terminal BHT

Seite 80 - [ 1 ] String Variables

Chapter 9. Event Polling and Error/Event Trapping161The RETURN statement in the event-handling routine will return control to the statement imme-diate

Seite 81 - [ 2 ] Numeric Variables

162Chapter 10 Sleep FunctionCONTENTS10.1 Sleep Function...

Seite 82 - Register Variables

Chapter 10. Sleep Function16310.1 Sleep FunctionThe BHT supports the sleep function that automatically interrupts program execution if noevent takes p

Seite 83 - 5.3 User-defined Functions

164Chapter 11 Resume FunctionCONTENTS11.1 Resume Function... 16

Seite 84 - 5.4 Type Conversion

Chapter 11. Resume Function16511.1 Resume FunctionThe resume function automatically preserves the current status of a running application pro-gram (us

Seite 85 - AND, OR, NOT, and XOR

166Chapter 12 Power-related FunctionsCONTENTS12.1 Low Battery Warning ...

Seite 86 - Chapter 6

Chapter 12. Power-related Functions16712.1 Low Battery Warning BHT-3000If the battery voltage is below the specified level when the BHT-3000 is power

Seite 87 - 6.1 Overview

16812.2 Prohibited Simultaneous Opera-tion of the Beeper*, Illumination LED (Laser Source**), and LCD Backlight(* Beeper and vibrator in the BHT-6500/

Seite 88 - 6.2 Operator Precedence

Chapter 12. Power-related Functions16912.3 Wakeup Function BHT-5000/BHT-6000/BHT-6500/BHT-7000/BHT-7500The wakeup function allows you to turn on the

Seite 89 - 4.5-1 (=3.5)

17012.4 Remote Wakeup Function (BHT-7000/BHT-7500)[ 1 ] OutlineThe remote wakeup function allows you to remotely power on the BHT and run the specifie

Seite 90 - 6.3 Operators

Chapter 1. Software Overview for the BHT91.2.2 What’s New in BHT-BASIC 3.5 Upgraded fromBHT-BASIC 3.0?Based on BHT-BASIC 3.0, BHT-BASIC 3.5 newly supp

Seite 91 - 6.3.2 Relational Operators

Chapter 12. Power-related Functions171(5) The BHT will exit from the sleep state and execute the remote wakeup program developedby the user. At the ho

Seite 92 - NOT operator

172If in the BHT no remote wakeup program exists:If in the BHT the remote wakeup is deactivated:Host computerSends 1st timeSends 2nd timeReceives resp

Seite 93 - XOR operator

Chapter 12. Power-related Functions173[ 3 ] Remote wakeup program File nameThe BHT may handle the file named "BHTRMT.PD3" as a remote wakeu

Seite 94 - 6.3.5 String Operators

174(4) Set the BHT station ID to be used in the BHT response messageSet a 6-byte numeric string referring to the lower 6 digits of the BHT serial numb

Seite 95 - PRINT a1$<b1$

Chapter 12. Power-related Functions175 Checking the execution record of remote wakeupWhen starting, a user program (including a remote wakeup program)

Seite 96 - Chapter 7

176Chapter 13 LCD Backlight FunctionCONTENTS13.1 LCD Backlight Function ...

Seite 97 - 7.1 Output to the LCD Screen

Chapter 13. LCD Backlight Function17713.1 LCD Backlight FunctionThe BHT has an LCD backlight function. Pressing the trigger switch* while holding dow

Seite 98 - [ 1 ] BHT-3000

178In the BHT-5000/BHT-6000/BHT-6500/BHT-7000/BHT-7500, you can control the backlightfunction by using the OUT statement as described below.Setting 1

Seite 99

179Chapter 14Statement ReferenceCONTENTSAPLOAD ...180BEEP ...

Seite 100 - LOCATE 26,10

Chapter 14. Statement Reference180*ANK: Alphanumeric and KatakanaSyntax:Syntax 1 (Loading a user-defined font):APLOAD characode,fontarraynameSyntax 2

Seite 101 - LOCATE 20,2

10 Defining and declaring user-defined functions more easilyBHT-BASIC 3.5 has added FUNCTION…END FUNCTION, SUB...END SUB, and DECLAREstatements. With

Seite 102 - LOCATE 26,9

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

Seite 103 - LOCATE 21,8

Chapter 14. Statement Reference182• The cursor size will differ depending upon the display font currently selected, asshown below.• An array integer v

Seite 104 - LOCATE 1,2 LOCATE 16,2

183• In the double-width screen mode, user-defined cursors loaded by the APLOADwill be doubled in width when displayed, as shown below.When the standa

Seite 105 - LOCATE 21,2

Chapter 14. Statement Reference184Run-time errors:Example:DIM cp%(5)cp%(0)=&H00cp%(1)=&H08cp%(2)=&H1Ccp%(3)=&H3Ecp%(4)=&H7Fcp%(5)=

Seite 106 - LOCATE 16,6

185Syntax:BEEP[onduration[,offduration[,repetitioncount[,frequency]]]]Parameter:onduration, offduration, and repetitioncountNumeric expressions, each

Seite 107

Chapter 14. Statement Reference186In the BHT-6500/BHT-7000/BHT-7500, specification of 0, 1, or 2 to frequencydrives the beeper or vibrator depending u

Seite 108

187• The BEEP statement does not suspend execution of the subsequent statementuntil the beeper completes sounding or vibrating. Instead, the executio

Seite 109 - [ 5 ] BHT-7000

Chapter 14. Statement Reference188Syntax:Syntax 1 (Calling an FN3):CALL "[drivename:]filename" functionnumber [data [,data]...]Syntax 2 (Cal

Seite 110

189•filename is the name of an FN3 function. The extension of the file names isfixed to .FN3. (For the FN3 functions, refer to Chapter 16, "Ext

Seite 111

Chapter 14. Statement Reference190 Calling a user-defined function (SUB function)This statement calls a user-defined function specified by functionna

Seite 112

Copyright © DENSO CORPORATION, 2000All rights reserved. No part of this publication may be reproduced in any form or by any meanswithout permission i

Seite 113 - [ 6 ] BHT-7500

Chapter 1. Software Overview for the BHT111.3 Program Development and Execu-tionBHT-BASIC consists of Compiler and Interpreter.1.3.1 CompilerBHT-BASIC

Seite 114

191Run-time errors:Reference:Statements: DECLARE and SUB...END SUBError code Meaning02hSyntax error("[drivename:]filename" is in incorrect s

Seite 115

Chapter 14. Statement Reference192Syntax:CHAIN "[drivename:]programfilename"Parameter:"[drivename:]programfilename"A string expres

Seite 116

193Syntax errors:Run-time errors:Reference:Error code and message Meaningerror 3: ’"’ missingNo double quote precedes or follows [drivename:]prog

Seite 117 - 7.1.3 Dot Patterns of Fonts

Chapter 14. Statement Reference194Syntax:CLFILE [#]filenumberParameter:filenumberA numeric expression which returns a value from 1 to 16.Description:C

Seite 118

195Example:OPEN "master.Dat" AS #1FIELD #1,20 AS bar$,10 AS ky$CLFILE #1CLOSE #1

Seite 119 - Cursor shape

Chapter 14. Statement Reference196Syntax:CLOSE [[#]filenumber[,[#]filenumber...]]Parameter:filenumberA numeric expression which returns a value from 1

Seite 120

197Syntax:CLSDescription:CLS clears the liquid crystal display (LCD) screen and returns the cursor to theupper left corner of the screen.• The CLS sta

Seite 121 - Different-size Fonts

Chapter 14. Statement Reference198Syntax:COMMON commonvariable[,commonvariable...]Parameter:commonvariableA non-array integer variable, a non-array re

Seite 122 - Same Screen

199Syntax errors:Run-time errors:Example:COMMON a%,b,c$,d%(2,3),e(4),f$(5)Reference:Error code and message Meaningerror 5: Variable name redefinitionA

Seite 123 - 7.1.6 VRAM

Chapter 14. Statement Reference200Syntax:CONST constname = exprParameter:constnameA label, identifier, or string expression of a maximum of 10 charact

Seite 124

12Chapter 2 Development Environment and ProceduresCONTENTS2.1 Overview of Development Environment ...

Seite 125 - 5000/BHT-6000/BHT-6500)

201Syntax:CURSOR {ON|OFF}Description:When a user program is initiated, the cursor is set to OFF. CURSOR ON turns on thecursor for keyboard entry oper

Seite 126

Chapter 14. Statement Reference202Syntax:DATA literal[,literal...]Parameter:literalA numeric or string constant.Description:DATA stores numeric and st

Seite 127

203Syntax:Syntax 1 (Defining a numeric FUNCTION):DECLARE FUNCTION funcname [(dummyparameter[,dummyparameter...])]Syntax 2 (Defining a character FUNCTI

Seite 128 - Specifying the cursor shape

Chapter 14. Statement Reference204Description:DECLARE defines a user-created function defined in other source program files.• Declaration of a user-de

Seite 129 - 7.2 Input from the Keyboard

205Syntax:Syntax 1 (Defining a numeric function):DEF FNfunctionname[(dummyparameter[,dummyparameter ...])]=expressionSyntax 2 (Defining a string funct

Seite 130 - 7.2.2 Keystroke Trapping

Chapter 14. Statement Reference206Description: Creating a user-defined functionDEF FN creates a user-defined function.• Definition of a user-defined

Seite 131 - 7.2.3 Alphabet Entry Function

207Syntax errors: When defining a user-defined function When calling a user-defined functionError code and message Meaningerror 61: Cannot use DEF F

Seite 132 - Center Center

Chapter 14. Statement Reference208Run-time errors:Example: Example 1DEF FNadd(a%,b%)=a%+b%PRINT FNadd(3,5) Example 2DEF FNappend$(a$,b$)[80]=a$+b$PR

Seite 133 - Alphabet Entry Example

209Syntax:Syntax 1 (Defining a numeric function):DEF FNfunctionname[(dummyparameter[,dummyparameter ...])]Syntax 2 (Defining a character function):DEF

Seite 134

Chapter 14. Statement Reference210Description: Creating a user-defined functionDEF FN...END DEF creates a user-defined function. The function defini

Seite 135 - BHT-7000/7500

Chapter 2. Development Environment and Procedures13[ 1 ] Compiling options... 33[

Seite 136 - Entry System

211 Calling a user-defined functionFNfunctionname calls a user-defined function.• The number of realparameters should be equal to that of dummyparame

Seite 137 - Alphabet Entry Procedure

Chapter 14. Statement Reference212 When calling a user-defined functionRun-time errors:Example:DEF FNappend$(a$,b%)[128] C$="" FOR i%=1

Seite 138

213Syntax:DEFREG registerdefinition[,registerdefinition ...]Parameter:registerdefinitionnon-arraynumericvariable [=numericconstant]DEFREG n1%=10DEFREG

Seite 139 - [ 2 ] Shift key

Chapter 14. Statement Reference214numericinitialvaluedefinitionFor one-dimensional:numericconstant[,numericconstant...]}DEFREG n6%(3)={9,8,7,6}For two

Seite 140 - 7.3 Timer and Beeper

215Syntax errors:Error code and message Meaningerror 6: Variable name redefinitionA same register variable name is dou-ble declared in a program.error

Seite 141 - INP Function

Chapter 14. Statement Reference216Example:Example 1: Valid DEFREG statementsDEFREG a,e$DEFREG b=100,c(10),d$(2,4)[10]DEFREG bps$="19200"DEF

Seite 142 - WAIT Statement

217sSyntax:DIM arraydeclaration[,arraydeclaration...]Parameter:arraydeclarationnumericvariable (subscript)DIM n1%(12)DIM n2(5,6)stringvariable (subscr

Seite 143 - Chapter 8

Chapter 14. Statement Reference218• In declaring an array string variable, you can specify the string length. If its speci-fication is omitted, the d

Seite 144 - 8.1 File Overview

219Syntax:ENDDescription:END terminates program execution and sounds the beeper for a second.• An END can appear anywhere in a source program.• When a

Seite 145 - 8.2 Data Files

Chapter 14. Statement Reference220Syntax:ERASE arrayvariablename[,arrayvariablename...]Parameter:arrayvariablenameAn array numeric or array string var

Seite 146 - 8.2.3 Structure of Data Files

142.1 Overview of Development Environ-mentThe following hardware and software are required for developing user programs:2.1.1 Required Hardware Perso

Seite 147

221Syntax:FIELD [#]filenumber,fieldwidth AS fieldvariable[,fieldwidth AS fieldvariable...]Parameter:filenumberA numeric expression which returns a val

Seite 148 - Deletion of Data Files

Chapter 14. Statement Reference222Syntax errors:Run-time errors:Example:fileNumber% = 4OPEN "Datafile.dat" AS #fileNumber%FIELD #fileNumber%

Seite 149

223Syntax:FOR controlvariable = initialvalue TO finalvalue [STEP increment]...NEXT [controlvariable]Parameter:controlvariableA non-array numeric varia

Seite 150 - 8.2.6 About Drives

Chapter 14. Statement Reference224• The default value of increment is 1.• You can nest FOR...NEXT statements to a maximum of 10 levels.• When using th

Seite 151 - 8.3 Bar Code Device

225Syntax:Syntax 1 (Defining a numeric function):FUNCTION funcname [(dummyparameter [,dummyparameter...])]Syntax 2 (Defining a character function):FUN

Seite 152 - Multiple Code Reading

Chapter 14. Statement Reference226Description: Creating a user-defined functionFUNCTION...END FUNCTION creates a user-defined function. The function

Seite 153 - Generation of Check Digit

227• If you specify a global variable in realparameter when calling a user-definedfunction, the user-defined function cannot update the value of the g

Seite 154

Chapter 14. Statement Reference228 When calling a user-defined functionRun-time errors:Error code and message Meaningerror 96: Incomplete control str

Seite 155 - 8.4 Communications Device

229Example:File 1 File 2DECLARE FUNCTION add(x,y) FUNCTION add(X,Y)A=1:B=2 add=X+YPRINT "TEST" END FUNCTIONC=add(A,B)PRINT C...Reference:S

Seite 156 - For optical interface

Chapter 14. Statement Reference230Syntax:GET [#]filenumber[,recordnumber]Parameter:filenumberA numeric expression which returns a value from 1 to 16.r

Seite 157 - For direct-connect interface

Chapter 2. Development Environment and Procedures152.1.2 Required Software• OS Windows95/98 or WindowsNT4.0/Windows2000• Editor• BHT-BASIC 3.5 Compile

Seite 158 - [ 1 ] BHT-protocol

231Syntax errors:Run-time errors:Example:GET #filNo,RecordNoGET #4GET #3,100Reference:Error code and message Meaningerror 71: Syntax error filenumber

Seite 159 - Protocol functions

Chapter 14. Statement Reference232Syntax:GLOBAL varname [,varname...]Parameter:varnamenumericvariable [(subscript)]stringvariable [(subscript)[stringl

Seite 160

233Syntax errors:Run-time errors:Reference:Statements: DIM and PRIVATEError code and message Meaningerror 7: Variable name redefinitionThe array decla

Seite 161 - 8.4.4 File Transfer Tools

Chapter 14. Statement Reference234Syntax:GOSUB labelDescription:GOSUB calls a subroutine specified by label.• Within the subroutine itself, you use a

Seite 162 - XFILE statement

235Run-time errors:Reference:Error code Meaning03h RETURN without GOSUB statement07hInsufficient memory space(Too deep nesting)Statements:RETURN

Seite 163 - Chapter 9

Chapter 14. Statement Reference236Syntax:GOTO labelDescription:GOTO unconditionally transfers control to a label specified by label.• In an IF stateme

Seite 164 - 9.1 Overview

237Syntax:Syntax 1:IF conditionalexpression THENstatementblock1[ELSEstatementblock2]END IFSyntax 2:IF conditionalexpression ELSEstatementblockEND IFPa

Seite 165 - 9.2 Event Polling

Chapter 14. Statement Reference238• A block-structured IF statement block has the following advantages over a sin-gle-line IF statement (which is not

Seite 166

239Syntax:INPUT [;]["prompt"{,|;}]variableParameter:"prompt"A string constant.variableA numeric or string variable.Description:Whe

Seite 167 - 9.3 Error Trapping

Chapter 14. Statement Reference240• Even after execution of the CURSOR OFF statement, the INPUT statement dis-plays the cursor.• Data inputted by the

Seite 168

162.2 Overview of Developing Proce-dures2.2.1 Developing ProceduresThe program developing procedures using BHT-BASIC 3.5 are outlined below.• Making s

Seite 169 - [ 1 ] Overview

241Syntax errors:Run-time errors:Reference:Error code and message Meaningerror 71: Syntax error• Neither a comma (,) nor semicolon (;)follows "pr

Seite 170

Chapter 14. Statement Reference242Syntax:INPUT #filenumber,variable[,variable...]Parameter:filenumberA numeric expression which returns a value from 1

Seite 171 - Chapter 10

243• Notes for entering numeric data:Valid characters include 0 to 9, a minus sign (-), and a period (.). They should bein correct numeric data form.

Seite 172 - 10.1 Sleep Function

Chapter 14. Statement Reference244Syntax:Syntax 1 (Assigning a string or a control code to a function key):KEY keynumber,stringdataSyntax 2 (Definin

Seite 173 - Chapter 11

245backlightkeynumber(BHT-3000/BHT-4000) A numeric expression which returnsa value from 0 to 29.(BHT-5000 with 32-key pad) A numeric expression which

Seite 174 - 11.1 Resume Function

Chapter 14. Statement Reference246• If pressed together with the Shift key, any numerical key can operate as a functionkey.• If you issue more than on

Seite 175 - Chapter 12

247• If you issue more than one KEY statement, the last statement takes effect. Thatis, if you define more than one key as the backlight function on/

Seite 176 - 12.1 Low Battery Warning

Chapter 14. Statement Reference248Syntax errors:Run-time errors:Example:Syntax 1:KEY 1,"a"KEY 2,"F"+CHR$(13)KEY 3,""Synt

Seite 177 - Backlight

249Syntax:KEY (keynumber){ON|OFF}Parameter:keynumber(BHT-3000/BHT-4000) A numeric expression which returns avalue from 1 to 29.(BHT-5000 with 32-key p

Seite 178 - 12.3 Wakeup Function

Chapter 14. Statement Reference250• When a program waits for the keyboard entry by the INPUT, LINE INPUT state-ment or INPUT$ function, pressing a fun

Seite 179 - (BHT-7000/BHT-7500)

Chapter 2. Development Environment and Procedures172.2.2 Functions of BHT-BASIC 3.5BHT-BASIC 3.5 contains Compiler, Linker, and Librarian whose functi

Seite 180 - Transmission control sequence

251Syntax:KILL "[drivename:]filename"Parameter:"[drivename:]filename"A string expression.Description:KILL deletes a data file or a

Seite 181

Chapter 14. Statement Reference252Run-time errors:Example:CLOSEIF kyIn$="Y" THENKILL "Master.Dat"END IFReference:Error code Meanin

Seite 182 - [ 3 ] Remote wakeup program

253Syntax:Syntax 1 (Loading a user-defined Kanji font):KPLOAD kanjicode, fontarraynameSyntax 2 (Loading a user-defined cursor. Valid in the BHT-7000/

Seite 183 - CHAIN statement, the

Chapter 14. Statement Reference254• The loaded user-defined fonts are effective during execution of the user programwhich loaded those fonts and durin

Seite 184

255• An array integer variable--a work array, register array, or common array--for cur-sorarrayname should be declared by the DIM, DEFREG, or COMMON s

Seite 185 - Chapter 13

Chapter 14. Statement Reference256• In double-width display mode, the cursor will appear in double width as shownbelow:When the standard-size font is

Seite 186 - 13.1 LCD Backlight Function

257Run-time errors:Example:DIM kp%(15)kp%(0)=&H0000kp%(1)=&H8011kp%(2)=&H6022kp%(3)=&H1844kp%(4)=&H0600kp%(5)=&H8802kp%(6)=&am

Seite 187

Chapter 14. Statement Reference258Syntax:Syntax 1:[LET] stringvariable = stringexpressionSyntax 2:[LET] numericvariable = numericexpressionDescription

Seite 188 - Chapter 14

259Run-time errors:Error code Meaning06hThe operation result is out of the allowable range.0FhString length out of the range(In a string assignment, t

Seite 189 - Description:

Chapter 14. Statement Reference260Syntax:LINE INPUT ["prompt"{,|;}]stringvariableParameter:"prompt"A string constant.stringvariabl

Seite 190

182.3 Writing a Source Program2.3.1 Writing a Source Program by an EditorTo write a source program, use an editor designed for operating environments

Seite 191

261If "prompt" is followed by a comma, the statement displays the prompting mes-sage but no question mark or space is appended to the prompt

Seite 192 - Syntax errors:

Chapter 14. Statement Reference262Syntax errors:Reference:Error code and message Meaningerror 71: Syntax error • INPUT is missing.• Neither a comma (,

Seite 193 - Reference:

263Syntax:LINE INPUT #filenumber,stringvariableParameter:filenumberA numeric expression which returns a value from 1 to 16.stringvariableA string vari

Seite 194

Chapter 14. Statement Reference264Syntax errors:Run-time errors:Example:LINE INPUT #fileNo,dat$Reference:Error code and message Meaningerror 71: Synta

Seite 195

265Syntax:Syntax 1:LOCATE [column][,row[,cursorswitch]]Syntax 2:LOCATE,,cursorswitchParameter:A numeric expression which returns a value given below.S

Seite 196

Chapter 14. Statement Reference266Two-byte Kanji ModeCondensed Two-byte Kanji Mode* Values in parentheses will be returned when the system status indi

Seite 197

267• Specification of the maximum value to column moves the cursor off the screenand out of sight.Example: Single-byte ANK mode in the BHT-3000If you

Seite 198

Chapter 14. Statement Reference268Syntax:ON ERROR GOTO labelDescription:ON ERROR GOTO enables error trapping so as to pass control to the first line o

Seite 199

269Syntax:Syntax 1:ON expression GOSUB label [,label...]Syntax 2:ON expression GOTO label [,label...]Parameter:expressionA numeric expression which re

Seite 200

Chapter 14. Statement Reference270Syntax errors:Run-time errors:Reference:Error code and message Meaningerror 71: Syntax error • label has not been de

Seite 201

Chapter 2. Development Environment and Procedures19• Comment lines starting with a single quotation mark (') and those with a REM should havethe

Seite 202

271Syntax:ON KEY (keynumber) GOSUB labelParameter:keynumber(BHT-3000/BHT-4000) A numeric expression which returnsa value from 1 to 29.(BHT-5000 with 3

Seite 203

Chapter 14. Statement Reference272• If a keystroke trap occurs, the Interpreter automatically executes KEY OFF state-ment for the pressed function key

Seite 204

273Syntax:OPEN "[drivename:]filename" AS [#] filenumber [RECORD filelength]Parameter:filenumberA numeric expression which returns a value fr

Seite 205

Chapter 14. Statement Reference274• In the BHT-7000/BHT-7500, if the drivename is B:, the file specified byfilename will be opened as a read-only file

Seite 206

275Syntax:OPEN "BAR:[readmode][beepercontrol][LEDcontrol]" AS [#]filenumber CODE readcode[,readcode...]Parameter:readmodeA string expression

Seite 207

Chapter 14. Statement Reference276• If the BHT reads a bar code successfully, the indicator LED for reading confirma-tion will illuminate in green. T

Seite 208

277Auto-off mode (F)OPEN "BAR:F" AS #7 CODE "A"If you press the trigger switch*1, the illumination LED (laser source*2) comeson.

Seite 209

Chapter 14. Statement Reference278Continuous reading mode (C)OPEN "BAR:C" AS #7 CODE "A"Upon execution of the above statement, th

Seite 210

279 readcodeThe BHT supports six types of bar codes--the universal product codes, Inter-leaved 2 of 5 (ITF), Codabar (NW-7), Code 39, Code 93, and Cod

Seite 211

Chapter 14. Statement Reference280Interleaved 2 of 5 (ITF) (I)Syntax 1:I[:[mini.no.digits[-max.no.digits]][CD]]Syntax 2 (BHT-6500/BHT-7000/BHT-7500)

Seite 212

202.4 Producing a User Program2.4.1 Starting the BHT-BASIC 3.5 CompilerStart the Compiler, e.g., by choosing the "BHTC35W.EXE" from the Wind

Seite 213

281Codabar (NW-7) (N)Syntax 1:N[:[mini.no.digits[-max.no.digits]][startstop][CD]]Syntax 2 (BHT-6500/BHT-7000/BHT-7500):N[:[mini.no.digits[-max.no.dig

Seite 214 - DEF FN (Single-line form)

Chapter 14. Statement Reference282Code 39 (M)Syntax 1:M[:[mini.no.digits[-max.no.digits]][CD]]Syntax 2 (BHT-6500/BHT-7000/BHT-7500):M[:[mini.no.digit

Seite 215

283Code 128 (K)Syntax 1:K[:[mini.no.digits[-max.no.digits]]]Syntax 2 (BHT-6500/BHT-7000/BHT-7500):K[:[mini.no.digits[-max.no.digits]][,[mini.no.digit

Seite 216

Chapter 14. Statement Reference284(2) FNC2If the BHT reads a bar code containing an FNC2 character(s), it will notbuffer such data but transfer it exc

Seite 217

285Standard 2 of 5 (STF) (H) (For the BHT-4000/BHT-5000/BHT-6000/BHT-6500/BHT-7000/BHT-7500)Syntax 1:H[:[mini.no.digits[-max.no.digits]][CD][start-s

Seite 218 - (Block form)

Chapter 14. Statement Reference286Syntax errors:Run-time errors:Error code and message Meaningerror 71: Syntax errorThe number of the specified readco

Seite 219

287Syntax:Syntax 1 (For the BHT-3000 and the direct-connect interface of the BHT-6000/BHT-6500/BHT-7000/BHT-7500):OPEN "COMn:[baud][,[parity][,[c

Seite 220

Chapter 14. Statement Reference288parityN, E, or Ocharalength8 or 7stopbit1 or 2RS/CS0, 1, 2, 3 or 4timeoutAn integer numeral from 0 to 255.RS0 or 1ER

Seite 221

289 COMnCOMn is a communications device file name.For the BHT-3000 which supports both the optical and direct-connect interfacesand can open them conc

Seite 222

Chapter 14. Statement Reference290 stopbitstopbit is the number of stop bits. It should be 1 (default) or 2 bits. RS/CSRS/CS enables or disables the

Seite 223

iPrefaceThis manual describes the syntax and development procedure of BHT-BASIC 3.5 which is aprogramming language for developing application programs

Seite 224

Chapter 2. Development Environment and Procedures212.4.2 Outline of User Program or Library ProductionProcedureUnlike the BHT-BASIC 3.0 Compiler that

Seite 225

291Shown below is a coding sample for enabling the RS/CS control. OPEN "COM:,,,,1" AS #16Instead of the OPEN "COM:" statement, you

Seite 226

Chapter 14. Statement Reference292Syntax errors:Run-time errors:Error code and message Meaningerror 71: Syntax error filenumber is missing.Error code

Seite 227

293Syntax:OUT portnumber,dataParameter:portnumberA numeric expression.dataA numeric expression which returns a value from 0 to 255.Description:OUT sen

Seite 228

Chapter 14. Statement Reference294Run-time errors:Example:OUT 3,7The above example sets the LCD contrast to the maximum.Reference:Error code Meaning0

Seite 229

295Syntax:Syntax 1 (Turning off the power according to the power-off counter):POWER counterSyntax 2 (Turning off the power immediately):POWER {OFF|0}S

Seite 230

Chapter 14. Statement Reference296 Turning off the power immediatelyExecution of POWER OFF or POWER 0 immediately turns off the power.• The execution

Seite 231

297Syntax:PRINT [data[CR/LFcontrol...]]Parameter:dataA numeric or string expression.CR/LFcontrolA comma (,) or a semicolon (;).Description:PRINT displ

Seite 232 - FOR...NEXT

Chapter 14. Statement Reference298• In the BHT-6000/BHT-6500/BHT-7000/BHT-7500, data may be displayed instandard size or small size depending upon the

Seite 233

299• If neither a comma (,) nor semicolon (;) is specified to CR/LFcontrol, the cur-sor moves to the first column on the next screen line.In any of th

Seite 234 - FUNCTION…END FUNCTION

Chapter 14. Statement Reference300Syntax:PRINT #filenumber[,data[CR/LFcontrol...]]Parameter:filenumberA numeric expression which returns a value from

Seite 235

222.4.3 Designating a Single Source File or a Project File2.4.3.1 Designating a single source fileJust as in the conventional BHT-BASIC 3.0 Compiler,

Seite 236

301• If CR/LFcontrol is a semicolon (;), the PRINT # statement outputs data with-out adding spaces or control codes.Statement example:PRINT #1,"A

Seite 237

Chapter 14. Statement Reference302Syntax:Syntax 1 (Displaying numbers):PRINT USING "numericformat";expression[CR/LFcontrol [expression]...]S

Seite 238

303 numericformatnumericformat is a formatting string consisting of #, decimal point (.), and/or +,each of which causes a special printing effect as d

Seite 239

Chapter 14. Statement Reference304 stringformatstringformat is a formatting string consisting of !, @, and/or &&, each of whichcauses a specia

Seite 240

305 CR/LFcontrolCR/LFcontrol determines where the cursor is to be positioned after the PRINTUSING statement executes. For details, refer to the CR/LF

Seite 241

Chapter 14. Statement Reference306Syntax:Syntax 1:PRIVATE varname [,varname...]Syntax 2:PRIVATE DEFREG registerdefinition [,registerdefini-tion...]Par

Seite 242

307subscriptFor one-dimensional: integerconstantFor two-dimensional:integerconstant,integerconstantWhere integerconstant is a numeric expression which

Seite 243

Chapter 14. Statement Reference308Run-time errors:Reference:Statements: DEFREG, DIM, and GLOBALError code Meaning05hParameter out of the range07hInsuf

Seite 244

309Syntax:PUT [#]filenumber[,recordnumber]Parameter:filenumberA numeric expression which returns a value from 1 to 16.recordnumberA numeric expression

Seite 245

Chapter 14. Statement Reference310Syntax errors:Run-time errors:Reference:Error code and message Meaningerror 71: Syntax error filenumber is missing.E

Seite 246 - IF...THEN...ELSE...END IF

Chapter 2. Development Environment and Procedures232.4.3.2 Designating a project fileTo build a library out of a single source file or to build a user

Seite 247

311Syntax:READ variable[,variable...]Parameter:variableA numeric or string variable.Description:READ reads as many data values as necessary in turn fr

Seite 248

Chapter 14. Statement Reference312If the string data is invalid as numeric data, the READ statement assigns the value0 to the numeric variable.• The n

Seite 249

313Syntax:Syntax 1:REM commentSyntax 2:’ commentDescription:REM causes the rest of a program line to be treated as a programmer’s remark orcomment for

Seite 250

Chapter 14. Statement Reference314Syntax:RESTORE [label]Description:RESTORE specifies a DATA statement location where the READ statement shouldstart r

Seite 251

315Syntax:Syntax 1:RESUME [0]Syntax 2:RESUME NEXTSyntax 3:RESUME labelDescription:RESUME returns control from the error-handling routine to a specifie

Seite 252

Chapter 14. Statement Reference316Run-time errors:Reference:Error code Meaning14h RESUME without error(RESUME statement occurs outside of an error-han

Seite 253

317Syntax:RETURNDescription:RETURN statement in a subroutine returns control to the statement immediately fol-lowing the GOSUB that called the subrout

Seite 254

Chapter 14. Statement Reference318Syntax:Syntax 1:SCREEN screenmode[,charaattribute]Syntax 2:SCREEN ,charaattributeParameter:screenmode and charaattri

Seite 255

319• At program startup, the defaults--single-byte ANK mode and normal display--areactive.• If a parameter is omitted, the corresponding screen mode o

Seite 256

Chapter 14. Statement Reference320Syntax:SELECT conditionalexpressionCASE test1[statementblock][CASE test2[statementblock]]...[CASE ELSE[statementbloc

Seite 257

24[ 2 ] Select an existing project fileYou may select an existing project file in the Select Project File dialog box or in the Open Filedialog box.Sel

Seite 258 - KEY ON and KEY OFF

321• You can nest the SELECT…CASE…END SELECT statements to a maximum of10 levels.SELECT a CASE 1 SELECT b CASE 3 PRINT "

Seite 259

Chapter 14. Statement Reference322Syntax:Syntax 1 (Defining a numeric function):SUB subname [(dummyparameter[,dummyparameter]...)]Syntax 2 (Exiting fr

Seite 260

323Description: Creating a user-defined functionSUB...END SUB creates a user-defined function. The function definition blockbetween SUB and END SUB

Seite 261

Chapter 14. Statement Reference324Syntax errors: When defining a user functionNOTEBefore any call to a SUB...END SUB function, you need to place defi

Seite 262

325 When calling a user-defined functionRun-time errors:Reference:Statements: DECLAREExample:File 1 File 2DECLARE SUB add(x,y) SUB add(X,Y)A=1:B=2 PR

Seite 263

Chapter 14. Statement Reference326Syntax:WAIT portnumber,ANDbyte[,XORbyte]Parameter:portnumberA numeric expressionANDbyte and XORbyteA numeric express

Seite 264

327Syntax errors:Run-time errors:Example:WAIT 0,&H03The above statement suspends a user program until any data is inputted from thekeyboard or the

Seite 265

Chapter 14. Statement Reference328Syntax:WHILE conditionalexpression [statementblock]WENDDescription:A WHILE...WEND continues to execute statemen

Seite 266

329Syntax errors:Reference:Error code and message Meaningerror 26: Too deep nesting.error 57: Incorrect use of WHILE...WENDWEND appears outside of the

Seite 267

Chapter 14. Statement Reference330Syntax:XFILE "[drivename:]filename"[,"protocolspec"]Parameter:"[drivename:]filename" a

Seite 268

Chapter 2. Development Environment and Procedures25[ 3 ] Add files to a project fileYou may add one or more source files and libraries to a project fi

Seite 269 - LINE INPUT

331- Transmission directionExample: XFILE "d2.dat","R""[drivename:]filename" cannot be omitted even in file reception.-

Seite 270

Chapter 14. Statement Reference332- Timeout length when a link will be established (for the BHT-5000/BHT-6000/BHT-6500/BHT-7000/BHT-7500)Specify the t

Seite 271

333• A communications device file should be opened before execution of the XFILEstatement. (For the file opening, refer to the OPEN "COM:"

Seite 272 - LINE INPUT #

Chapter 14. Statement Reference334Run-time errors:Example:The sample below transmits a data file by adding a serial number and horizontalparity checki

Seite 273

335Syntax:Syntax 1:REM $INCLUDE:’filename’Syntax 2:’$INCLUDE:’filename’Description:$INCLUDE reads a source program specified by ’filename’ into the pr

Seite 274

Chapter 14. Statement Reference336Fatal Error:Error code and message Meaningfatal error 30: Cannot find include file "XXX"No included file i

Seite 275

337Additional Explanation for Statements Effective range of labelsLabels are effective only in a file. Definition of common variables (by COMMON sta

Seite 276

338Chapter 15Function ReferenceCONTENTSABS ...339ASC ...

Seite 277 - ON ERROR GOTO

Chapter 15. Function Reference339Syntax:ABS(numericexpression)Description:ABS returns the absolute value of numericexpression. The absolute value ist

Seite 278 - ON...GOSUB and ON...GOTO

340Syntax:ASC(stringexpression)Description:ASC returns the ASCII code value of the first character of stringexpression,which is an integer from 0 to 2

Seite 279

26[ 4 ] Select files in the active projectFrom files existing in the active project, you may select files that you want to compile or build.(1) In eit

Seite 280 - ON KEY...GOSUB

Chapter 15. Function Reference341Syntax:BCC$(datablock,checktype)Parameter:datablockA string expression.checktypeA numeric expression which returns a

Seite 281

342Run-time errors:Error code Meaning05hParameter out of the range (checktype is out of the range.)

Seite 282

Chapter 15. Function Reference343Syntax:CHKDGT$(barcodedata,CDtype)Parameter:barcodedata and CDtypeString expressions.Description:CHKDGT$ calculates a

Seite 283

344Sample coding 4:CD.Data$=CHKDGT$("a123Qa","N")"Q" is a CD position character, so CHKDGT$ calculates thecorrect CD and

Seite 284 - OPEN "BAR:"

Chapter 15. Function Reference345 When CDtype is I (ITF), the length of barcodedata must be an even num-ber of two or more digits. If not, CHKDGT$ r

Seite 285

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

Seite 286

Chapter 15. Function Reference347Syntax:CHR$(characode)Parameter:characodeA numeric expression which returns a value from 0 to 255.Description:CHR$ co

Seite 287

348• To display a Kanji code, use a shift JIS code as shown below. The shift JIS codefor is 8ABFh.SCREEN 1PRINT CHR$(&h8A);CHR$(&hBF)Referenc

Seite 288

Chapter 15. Function Reference349Syntax:Syntax 1 (Setting a national character set):COUNTRY$="countrycode"Syntax 2 (Returning a country code

Seite 289

350• After setting a national character set, you may display it for codes from 32 (20h) to127 (7Fh), on the LCD.• If "countrycode" is omitt

Seite 290

Chapter 2. Development Environment and Procedures27• Main ObjectThis display area shows the name of a main object in a user program if you haveselecte

Seite 291

Chapter 15. Function Reference351Syntax:CSRLINDescription:CSRLIN returns the current row number of the cursor as an integer, in the currentscreen mode

Seite 292

352Syntax:Syntax 1 (Retrieving the current system date):DATE$Syntax 2 (Setting the current system date):DATE$="date"Parameter:dateA string e

Seite 293 - OPEN statement

Chapter 15. Function Reference353Run-time errors:Reference:Error code Meaning05hParameter out of the range (date is out of the range.)Functions:TIME$

Seite 294

354Syntax:EOF([#]filenumber)Parameter:filenumberA numeric expression which returns a value from 1 to 16.Description:EOF tests for an end of a device I

Seite 295

Chapter 15. Function Reference355Run-time errors:Reference:Error code Meaning34hBad file name or number(You specified filenumber of an unopened file.)

Seite 296 - OPEN "COM:"

356Syntax:ERLDescription:ERL returns the current statement location of the program where a run-time erroroccurred most recently.• The ERL function wor

Seite 297

Chapter 15. Function Reference357Syntax:ERRDescription:ERR returns the code of a run-time error that invoked the error-handling routine.• The returned

Seite 298

358Syntax:Syntax 1 (Changing the value of a terminator):ETX$=stringexpressionSyntax 2 (Returning the current value of a terminator):ETX$Parameter:stri

Seite 299

Chapter 15. Function Reference359Syntax:FRE(areaspec)Parameter:areaspecA numeric expression which returns a value from 0 to 3.Description:FRE returns

Seite 300

360Syntax:HEX$(numericexpression)Parameter:numericexpressionA numeric expression which returns a value from -32768 to 32767.Description:HEX$ function

Seite 301

282.4.4 Compiling and BuildingFirst specify the options and then proceed to the compiling or building process.[ 1 ] Specifying the compiling and linki

Seite 302

Chapter 15. Function Reference361Syntax:INKEY$Description:INKEY$ reads from the keyboard to see whether a key has been pressed, andreturns one charact

Seite 303

362Syntax:INP(portnumber)Parameter:portnumberA numeric expression which returns a value from 0 to 32767.Description:INP reads one-byte data from an in

Seite 304

Chapter 15. Function Reference363Syntax:Syntax 1 (Reading from the keyboard):INPUT$(numcharas)Syntax 2 (Reading from a device file):INPUT$(numcharas,[

Seite 305

364Run-time errors:Reference:Error code Meaning05hParameter out of the range (numcharas is out of the range.)34hBad file name or number(You specified

Seite 306

Chapter 15. Function Reference365Syntax:INSTR([startposition,]targetstring,searchstring)Parameter:startpositionA numeric expression which returns a va

Seite 307

366• A returned value of INSTR is a decimal number from 0 to 255, depending uponthe conditions as listed below.Run-time errors:Reference:Conditions Re

Seite 308

Chapter 15. Function Reference367Syntax:INT(numericexpression)Parameter:numericexpressionA real expression.Description:INT returns the largest whole n

Seite 309

368Syntax:LEFT$(stringexpression,stringlength)Parameter:stringlengthA numeric expression which returns a value from 0 to 255.Description:LEFT$ extract

Seite 310

Chapter 15. Function Reference369Syntax:LEN(stringexpression)Description:LEN returns the length of stringexpression, that is, the number of bytes inth

Seite 311 - PRINT USING

370Syntax:LOC([#]filenumber)Parameter:filenumberA numeric expression which returns a value from 1 to 16.Description:LOC returns the current position w

Seite 312

Chapter 2. Development Environment and Procedures29[ 2 ] CompilingIn any of the following methods, compile the currently selected source file(s) into

Seite 313

Chapter 15. Function Reference371Run-time errors:Reference:Error code Meaning34hBad file name or number(You specified filenumber of an unopened file.)

Seite 314

372Syntax:LOF([#]filenumber)Parameter:filenumberA numeric expression which returns a value from 1 to 16.Description:LOF returns the length of a data f

Seite 315

Chapter 15. Function Reference373Syntax:MARK$Description:MARK$ returns a 3-byte string which consists of the first one byte representing a barcode typ

Seite 316

374Syntax:MID$(stringexpression,startposition[,stringlength])Parameter:startpositionA numeric expression which returns a value from 1 to 255.stringlen

Seite 317

Chapter 15. Function Reference375Run-time errors:Reference:NOTEBHT-BASIC does not support such MID$ function that replaces a part of astring variable.

Seite 318

376Syntax:POS(0)Description:POS returns the current column number of the cursor in the current screen modeselected by a SCREEN statement, as an intege

Seite 319

Chapter 15. Function Reference377Syntax:RIGHT$(stringexpression,stringlength)Parameter:stringlengthA numeric expression which returns a value from 0 t

Seite 320

378Syntax:SEARCH([#]filenumber,fieldvariable,searchdata[,startrecord])Parameter:filenumberA numeric expression which returns a value from 1 to 16.fiel

Seite 321

Chapter 15. Function Reference379Run-time errors:Reference:Error code Meaning05hParameter out of the range34hBad file name or number(You specified fil

Seite 322

380Syntax:Syntax 1 (Changing the value of a header):SOH$=stringexpressionSyntax 2 (Returning the current value of a header):SOH$Parameter:stringexpres

Seite 323

302.4.5 Setting the Editor for Displaying FilesSet the editor that you want to use for displaying source files and error message files(XXX.ERR) accord

Seite 324

Chapter 15. Function Reference381Syntax:STR$(numericexpression)Parameter:numericexpressionA numeric expression.Description:STR$ converts the value of

Seite 325

382Syntax:Syntax 1 (Changing the value of a header):STX$=stringexpressionSyntax 2 (Returning the current value of a header):STX$Parameter:stringexpres

Seite 326

Chapter 15. Function Reference383Syntax:Syntax 1 (Retrieving the current system time or the wakeup time):TIME$Syntax 2 (Setting the current system tim

Seite 327

384 Syntax 2Setting the system timeTIME$ sets the system time specified by "time." The format of "time" is thesame as that in sy

Seite 328

Chapter 15. Function Reference385Syntax:Syntax 1 (Retrieving the current value of a specified timer):TIMEATIMEBTIMECSyntax 2 (Setting a specified time

Seite 329 - SELECT...CASE...END SELECT

386Syntax:VAL(stringexpression)Parameter:stringexpressionA string expression which represents a decimal number.Description:VAL converts the string spe

Seite 330

387Chapter 16Extended FunctionsCONTENTS16.1 Overview...

Seite 331 - SUB...END SUB

Chapter 16. Extended Functions38816.1 OverviewIn addition to the BHT-BASIC statements and functions, the BHT-7000/BHT-7500/BHT-7500Ssupports the follo

Seite 332

38916.2.2 Detailed Function SpecificationsSyntax: CALL "SYSTEM.FN3" 0 VERSION$Description:This function returns the SYSTEM.FN3 library versi

Seite 333

Chapter 16. Extended Functions390Item number (PARA%)System menu itemAttribute*1DATA%, numeric data of thesystem menu itemInitial value11Minimum number

Seite 334

iiHow this book is organizedThis manual is made up of 18 chapters and appendices.Chapter 1. Software Overview for the BHTSurveys the software structur

Seite 335

Chapter 2. Development Environment and Procedures312.4.6 Error Messages and Their Indication onto theMain Window[ 1 ] Selecting either an editor or ma

Seite 336

391*1R/W: Read and write possible RO: Read only*2The resume function setting made here is effective also in user programs downloaded to the BHT.*3Thes

Seite 337 - WHILE...WEND

Chapter 16. Extended Functions392Syntax: CALL "SYSTEM.FN3" 3 PARA%,DATA$Description:This funcion reads string data (DATA$) from the system m

Seite 338

393Syntax: CALL "SYSTEM.FN3" 5 N.FONT%,VERSION$()Description:This funcion returns font information--the number of downloadedfonts, font nam

Seite 339

394Chapter 17 Spread Spectrum Communication(BHT-7500S only)CONTENTS17.1 Overview...

Seite 340

39517.1 Overview Spread spectrum wireless deviceThe BHT-7500S system consists of the BHT main system and the spread spectrum wirelessdevice; the form

Seite 341

Chapter 17. Spread Spectrum Communication (BHT-7500S only)396The table below shows the communications status transition as the state of the wireless c

Seite 342

39717.2 Programming for Wireless Com-municationWhen programming for spread spectrum communications, use the following statement andextension functions

Seite 343

Chapter 17. Spread Spectrum Communication (BHT-7500S only)39817.3 Wireless Communications-related StatementSyntax: OPEN "COM3:" AS [#] filen

Seite 344 - $INCLUDE

39917.4 Wireless Communication Library (SS.FN3)17.4.1 OverviewThe spread spectrum library (SS.FN3) used in a BHT-BASIC CALL statement gets or setspara

Seite 345 - Fatal Error:

Chapter 17. Spread Spectrum Communication (BHT-7500S only)40017.4.2 Detailed Function SpecificationsSyntax: CALL "SS.FN3" 0 VERSION$Descript

Seite 346 - DEFREG statement)

32[ 2 ] How error messages are displayed on the editor or main windowDuring building, the BHT-BASIC 3.5 Compiler may detect errors which can be divide

Seite 347 - Chapter 15

401Syntax: CALL "SS.FN3" 2 PARA%,DATA$Description:This function gets string (DATA$) from the wireless block setting specifiedby PARA%.Parame

Seite 348

Chapter 17. Spread Spectrum Communication (BHT-7500S only)402Syntax: CALL "SS.FN3" 3 PARA%,DATA%Description:This function sets integer (DATA

Seite 349

403Syntax: CALL "SS.FN3" 4 PARA%,DATA%Description:This function sets string (DATA$) to the wireless block setting specified byPARA%. Parame

Seite 350

Chapter 17. Spread Spectrum Communication (BHT-7500S only)404Syntax: CALL "SS.FN3" 7 TIMEOUT%,ASSOC%Description:This function checks whether

Seite 351

405Chapter 18 TCP/IPCONTENTS18.1 Two Sides... 40618.

Seite 352

40618.1 Two Sides18.1.1 BHT-7500SThe BHT-7500S includes two built-in libraries providing BHT-BASIC programs with access to asubset of the TCP/IP famil

Seite 353

Chapter 18. TCP/IP40718.2 TCP/IP over Spread SpectrumSystem18.2.1 General ProcedureThe following is the procedure for using TCP/IP over a wireless com

Seite 354

408[ 2 ] Configure TCP/IP SystemTo connect to the TCP/IP pathway, specify the following system settings in System Mode or byusing the extension librar

Seite 355

Chapter 18. TCP/IP409[ 3 ] Declare TCP/IP Communications PathwaySpecify the following system settings by using the socket library (SOCKET.FN3):• Commu

Seite 356

410[ 5 ] Check Wireless Communications Device Synchronizationwith MasterUsing a wireless communications device for TCP/IP communication requires synch

Seite 357

Chapter 2. Development Environment and Procedures332.4.7 OptionsTo specify compiling options and linking options, select the check-box options you wan

Seite 358 - COUNTRY$

Chapter 18. TCP/IP411[ 6 ] Connect to TCP/IP Communications PathwayUse the extension library SOCKET.FN3. Connecting to the TCP/IP communications pathw

Seite 359

412[ 8 ] Disconnect TCP/IP Communications PathwayUse the extension library SOCKET.FN3. Refer to Section 18.5, "Socket Library(SOCKET.FN3)."G

Seite 360

Chapter 18. TCP/IP41318.2.2 Programming Notes for Socket API Accordingto UDPThe user datagram protocol (UDP) has no flow control, so send/receive data

Seite 361

414 Host’s retransmission control for a transmission errorAssume that the host uses the protocol of receiving transmission completion message from the

Seite 362

Chapter 18. TCP/IP41518.2.3 Programming Notes for Resume FunctionIf the BHT is turned off and on during data transmission in wireless communications,

Seite 363

416main: ’ Main programon error goto Err.TCP ’ Prepare for error interrupt (To Err.TCP ’ at the time of error occurrence)...open "COM3:" as

Seite 364

Chapter 18. TCP/IP41718.3 Socket API18.3.1 OverviewThe SOCKET.FN3 library implements a subset of the BSD4.4 socket application programinterface (API).

Seite 365

418 User Datagram Protocol (UDP)socket()bind() sendto()select()recvfrom() close()socket()bind()select()recvfrom()sendto() clos

Seite 366

Chapter 18. TCP/IP41918.4 FTP Client18.4.1 OverviewThe FTP.FN3 library implements FTP client services for file transfers to and from FTP servers.Note

Seite 367

420The FTP client automatically pads the last record of a downloaded program file with null codes(00h) to maintain the fixed-length format. (The numbe

Seite 368

34[ 2 ] Linking options[ 3 ] Outputting debug information filesIf you select the "Debug information file" check box in the Set Options dialo

Seite 369

Chapter 18. TCP/IP421[ 2 ] Extension Libraries (*.FN3 and *.EX3)The FTP client treats files with extensions .FN3 and .EX3 as extension libraries.Exten

Seite 370

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

Seite 371

Chapter 18. TCP/IP423The treatment of short records is under application control. The default is to delete any trailingspaces (20h).Alternatively, the

Seite 372

424Line Delimiters inside Data RecordsThe treatment of line delimiters (CR-LF, CR, or LF) inside downloaded data records, which canuse all codes from

Seite 373

Chapter 18. TCP/IP42518.4.3 Using FTP Client[ 1 ] Basic ProcedureFirst, set up for using the FTP client, as necessary, with the following steps. All t

Seite 374

426[ 3 ] Calculating Memory RequirementsThe FTP protocol specifications do not provide for checking the amount of BHT memory avail-able during downloa

Seite 375

Chapter 18. TCP/IP427 Data FilesDetermine MEM from the field lengths and number of records.BPR = bytes per record = (number of fields) + (sum of field

Seite 376

42818.5 Socket Library (SOCKET.FN3)18.5.1 Overview String VariablesThe following are the string variables used by this library together with their me

Seite 377

Chapter 18. TCP/IP429 Function Number ListNumber FunctionCorresponding Socket API Function0 Get socket.FN3 version ––1* –– accept()2 Assign address to

Seite 378

430* Socket API function not supported by SOCKET.FN3 library.40 Specify TCP/IP communications pathway Unique to BHT41 Connect TCP/IP communications pa

Seite 379

Chapter 2. Development Environment and Procedures35[ 4 ] Outputting list files The Compiler may output three types of list files as listed below depen

Seite 380

Chapter 18. TCP/IP43118.5.2 Detailed Function SpecificationsSyntax: CALL "SOCKET.FN3" 0 VERSION$Description: This function returns the SOCKE

Seite 381

432Syntax:CALL "SOCKET.FN3" 3 SOCKFD%, FAMILY%, PORT%, addresswhere address is ADDRESS or IPADDRESS$Description: This function connects the

Seite 382

Chapter 18. TCP/IP433Syntax:CALL "SOCKET.FN3" 6 SOCKFD%, OPTNAME%, optionwhere option is OPTION% or OPTIONDescription: This function gets th

Seite 383

434Syntax:CALL "SOCKET.FN3" 7 HOSTLONG, NETLONGDescription: This function converts a (4-byte) long from host byte order to network byteorder

Seite 384

Chapter 18. TCP/IP435Syntax:CALL "SOCKET.FN3" 11 NETLONG, HOSTLONGDescription: This function converts a (4-byte) long from network byte to h

Seite 385

436The storage method (RECVFLAG%) must be one of the following values:0 Append data to buffer (default if omitted)1 Overwrite buffer with dataNote: If

Seite 386

Chapter 18. TCP/IP437Example: Append operationIncoming data: 1024 bytes ("0123456789...0123")Receive buffer: 8 elements, 128 characte

Seite 387

438Example: Overwrite operationIncoming data: 1024 bytes ("0123456789...0123")Receive buffer: 8 elements, 128 characters each for a t

Seite 388

Chapter 18. TCP/IP439Syntax:CALL "SOCKET.FN3" 15 SOCKFD%, RECVBUFF$[()], RECV-LEN%, RECVMODE%, FAMILY%, PORT%, address, RECVSIZE%[,RE

Seite 389

440Run-time errors:Error code Meaning105hPower-off detected. (BHT-7500S only)209hSocket identifier is invalid.216hA parameter is invalid.228hThe maxim

Seite 390

36• Address of object program in intermediate languageShows an intermediate language address corresponding to a source program line infour-digit hexad

Seite 391

Chapter 18. TCP/IP441Syntax:CALL "SOCKET.FN3" 17 MAXFD%, READFDSET$, WRITEFD-SET$, EXCEPTFDSET$, TIMEOUT, RESULT%Description: This function

Seite 392

442Syntax:CALL "SOCKET.FN3" 19 SOCKFD%, SOCKFDSET$Description: This function adds the specified socket identifier to the specified identifie

Seite 393

Chapter 18. TCP/IP443Syntax:CALL "SOCKET.FN3" 22 SOCKFD%, SENDBUFF$[()],SENDLEN%, SENDMODE%, SENDSIZE%Description: This function transmits d

Seite 394 - TIMEA/TIMEB/TIMEC

444Syntax:CALL "SOCKET.FN3" 23 SOCKFD%, SENDBUFF$[()], SENDLEN%, SENDMODE%, FAMILY%, PORT%, address, SENDSIZE%where address is ADDRESS or IP

Seite 395

Chapter 18. TCP/IP445Syntax:CALL "SOCKET.FN3" 24 SOCKFD%, OPTNAME%, optionwhere option is OPTION% or OPTIONDescription: This function sets t

Seite 396 - Chapter 16

446Syntax:CALL "SOCKET.FN3" 25 SOCKFD%, HOWTO%Description: This function shuts down socket transfers in the specified direction.BSD4.4 socke

Seite 397 - (SYSTEM.FN3)

Chapter 18. TCP/IP447Syntax:CALL "SOCKET.FN3" 26 FAMILY%, TYPE%, PROTOCOL%,SOCKFD%Description: This function creates a socket from the speci

Seite 398 - SYSTEM.FN3 version

448Syntax:CALL "SOCKET.FN3" 28 SOCKFD%Description: This function closes the specified socket identifier.BSD4.4 socket API equivalent: This f

Seite 399 - RO: Read only

Chapter 18. TCP/IP449Syntax:CALL "SOCKET.FN3" 41 INTERFACE%Description: This function connects the TCP/IP communications pathway based on th

Seite 400

450Syntax:CALL "SOCKET.FN3" 43 INTERFACE%Description: This function disconnects the specified TCP/IP communications pathway.Parameters:INTER

Seite 401

Chapter 2. Development Environment and Procedures37• Symbol table for common variablesLists common variables arranged according to their types. An ar

Seite 402 - 8 bytes 2 bytes 8 bytes

Chapter 18. TCP/IP451Syntax:CALL "SOCKET.FN3" 45 PARA%, DATA$Description: This function sets the specified TCP/IP system settings to the new

Seite 403 - Chapter 17

45218.6 FTP Library (FTP.FN3)18.6.1 Overview String VariablesThe following are the string variables used by this library together with their memoryre

Seite 404

Chapter 18. TCP/IP453 Reply CodesThe messages that FTP servers send during and after FTP operations vary, but servers alluse the same reply codes. (Se

Seite 405

45418.6.2 Detailed Function SpecificationsSyntax: CALL "FTP.FN3" 0 VERSION$Description: This function returns the FTP.FN3 library version in

Seite 406 - FTP.FN3) for file transfer

Chapter 18. TCP/IP455Syntax:CALL "FTP.FN3" 1 FTPHANDLE%, REPLY%Description: This function opens an FTP client session using the system setti

Seite 407 - 17.3 Wireless Communications

456Syntax:CALL "FTP.FN3" 3 FTPHANDLE%, REPLY%Description: This function closes the specified FTP client session.Parameters:FTPHANDLE% FTP cl

Seite 408 - (SS.FN3)

Chapter 18. TCP/IP457Syntax:CALL "FTP.FN3" 5 FTPHANDLE%, NEWDIR$, REPLY%Description: This function changes the current directory on the FTP

Seite 409

458CRLF.MODE% Treatment of line delimiters inside records and trailingspaces in fieldsNote:CRLF.MODE% will be ignored for files exceptdata files.FLD$

Seite 410

Chapter 18. TCP/IP459Run-time errors:Error code Meaning02hSyntax error (Incorrect file name).05hNumber of field items or number of digits in a field o

Seite 411

460Syntax:CALL "FTP.FN3" 7 FTPHANDLE%, SERV.FNAME$, CLNT.FNAME$, CRLF.TYPE%, UP.MODE%, REPLY% [,DISP.MODE%]Description: This function upload

Seite 412

38 Cross referenceSelect the X (Cross) reference check box and run the Compiler, and the following informationwill be outputted:• For common variables

Seite 413

Chapter 18. TCP/IP461Run-time errors:Syntax:CALL "FTP.FN3" 8 PARA%, ftp.parawhere ftp.para is FTP.PARA% or FTP.PARA$Description: This functi

Seite 414 - Chapter 18

462Syntax:CALL "FTP.FN3" 9 PARA%, ftp.parawhere ftp.para is FTP.PARA% or FTP.PARA$Description: This function sets the specified FTP system s

Seite 415 - 18.1 Two Sides

Chapter 18. TCP/IP463Syntax:CALL "FTP.FN3" 11 FTPHANDLE%, PORT%Description: This function sets a port number specified by PORT% for file tra

Seite 416 - 18.2.1 General Procedure

464AppendicesCONTENTSAppendix A Error Codes and Error Messages...465A1. Run-time Errors...

Seite 417 - [ 2 ] Configure TCP/IP System

465AppendicesAppendix AError Codes and Error MessagesA1. Run-time ErrorsError code Meaning00hInternal system error01h NEXT without FOR02hSyntax error0

Seite 418

46636hImproper file type(The statement attempts an operation that conflicts with the file type--data file, communications device file, or bar code dev

Seite 419

467Appendices103h Communications pathway already connected.104h Communications pathway already disconnected.105h Power-off detected.110h Response othe

Seite 420

468A2. Compilation Errors Fatal ErrorsError code & Messagefatal error 1: Out of memoryfatal error 2: Work file I/O errorfatal error 3: Object fil

Seite 421

469Appendicesfatal error 29: Out of memory for cross referencefatal error 30: Cannot find include filefatal error 31: Cannot nest include filefatal er

Seite 422

470 Syntax ErrorsError code & Messageerror 1: Improper label formaterror 2: Improper label name(redefinition, variable name, or reserved word used

Seite 423

Chapter 2. Development Environment and Procedures39[ 5 ] Outputting a mapfileSelect the Mapfile check box of the Linking Options in the Set Options di

Seite 424

471Appendiceserror 21: Too many variables(register float array)error 22: Too many variables(register string array)error 23: Too many variables(c

Seite 425

472error 46:error 47:error 48:error 49:error 50: Incorrect use of IF...THEN...ELSE...ENDIFerror 51: Incomplete control structure(IF...THEN...ELSE...EN

Seite 426 - 18.3 Socket API

473Appendiceserror 77: Initial string too longerror 78: Array symbols exceed 30 for one DIM, GLOBAL, or PRIVATEstatementerror 79: Record number out of

Seite 427

474 Linking ErrorsError MessagePRC area size differentOut of space in REG areaOut of space in PRD areaCannot open project fileCannot open object file

Seite 428 - 18.4 FTP Client

475Appendices* To the [Variable type], any of the following character strings applies:• Non-array integer common variable• Non-array float common vari

Seite 429

476 Library ErrorsError MessageCannot find object to be deleted [objectname]Designated object already existing [objectname]Cannot find object to be up

Seite 430

477AppendicesAppendix BReserved WordsThe following list shows reserved words (keywords) of BHT-BASIC. Any of these words mustnot be used as a variabl

Seite 431 - [ 3 ] Data Files

478Appendix CCharacter SetsC1. Character SetThe table below lists the character set which the BHT can display on the LCD screen. It isbased on the AS

Seite 432

479AppendicesC2. National Character SetsYou may switch characters assigned to codes 20h to 7Fh of the character set table listed inAppendix C1 to one

Seite 433

480C3. Display Mode and Letter Size Character frame and letter size Generating the condensed two-byte Kanji patterns (BHT-4000/BHT-5000)To display c

Seite 434 - 18.4.3 Using FTP Client

40• Map for user-defined functionsShows the symbols of user-defined functions in the Interpreter which are arrangedaccording to their types (i.e., int

Seite 435 - User Programs (*.PD3)

481Appendices Generating the small-size font patternsBHT-6000/BHT-6500- Single-byte ANK charactersTo display single-byte ANK characters in small size

Seite 436 - [ 5 ] FTP Transfers

482BHT-7000/BHT-7500- Single-byte ANK charactersTo display single-byte ANK characters in small size of fonts, their small-size font patternsstored in

Seite 437 - 18.5.1 Overview

483AppendicesAppendix DI/O PortsD1. BHT-3000 Input PortsA user program can monitor the hardware status through the input ports by using the WAITstate

Seite 438 - Function Number List

484*4Lower three bits (bit 2 to bit 0) in this byte represent the contrast level of the LCD in 000 to111 in binary notation or in 0 to 7 in decimal no

Seite 439

485AppendicesD2. BHT-4000 Input PortsA user program can monitor the hardware status through the input ports by using the WAITstatement or INP functio

Seite 440

486*8The BHT-4000 returns the re-read prevention enabled time length in units of 100 ms. If thereturned value is zero (0), it means that the re-read

Seite 441 - Function #3: Connect socket

487Appendices*7The BHT-4000 may display the system status on the bottom line of the LCD. To display thesystem status, set 1 to this port; to erase it

Seite 442

488D3. BHT-5000 Input PortsA user program can monitor the hardware status through the input ports by using the WAITstatement or INP function. BHT-BA

Seite 443 - Function #9:

489AppendicesDuring the direct-connect interface operation, a user program can regard RD signal as CSsignal, provided that the returned value of CS sh

Seite 444

490 Output PortsA user program can control the hardware through the output ports by using the OUT statement.BHT-BASIC defines each of these ports as a

Seite 445

iiiChapter 13. LCD Backlight FunctionDescribes the LCD backlight functionChapter 14. Statement ReferenceDescribes the statements available in BHT-BASI

Seite 446

Chapter 2. Development Environment and Procedures412.4.8 Starting the BHT-BASIC Compiler from theCommand LineYou may start the BHT-BASIC Compiler from

Seite 447

491Appendices*5The sleep timer feature automatically interrupts program execution if no event takes placewithin the specified length of time preset by

Seite 448

492D4. BHT-6000/BHT-6500 Input PortsA user program can monitor the hardware status through the input ports by using the WAITstatement or INP function

Seite 449

493Appendices*1BHT-BASIC represents the bit order by the exponent of each binary digit in the byte. Forexample, bit 0 means LSB; bit 7 means MSB.*2On

Seite 450

494*14A user program returns the BHT’s ID number which is required for the use of the BHT-Irprotocol. The ID number is expressed by two bytes: lower

Seite 451

495Appendices Output PortsA user program can control the hardware through the output ports by using the OUT statement.BHT-BASIC defines each of these

Seite 452

496*1BHT-BASIC represents the bit order by the exponent of each binary digit in the byte. Forexample, bit 0 means LSB; bit 7 means MSB.*2The reading

Seite 453

497Appendices*13You can set the communications protocol type for transmitting files with the XFILE state-ment.*14You may set the BHT’s ID number to be

Seite 454 - * To be set in units of 100

498D5. BHT-7000/BHT-7500 Input PortsA user program can monitor the hardware status through the input ports by using the WAITstatement or INP function

Seite 455

499Appendices*1BHT-BASIC represents the bit order by the exponent of each binary digit in the byte. Forexample, bit 0 means LSB; bit 7 means MSB.*2On

Seite 456 - Function #26: Create socket

500*8An 8-bit binary pattern (bits 7 to 0) on the input ports (which read VRAM) 10h to 40Fh in theBHT-7000 or 10h to C8Fh in the BHT-7500 represents a

Seite 457 - Function #28: Close socket

42[ 2 ] OptionsThe BHT-BASIC 3.5 Compiler supports three types of options—compiler processing options,compiling options, and linking option. Compiler

Seite 458 - Function #42:

501Appendices*17A user program returns the currently specified size of the empty area to be defragmented inunits of 4 kilobytes. The size is expresse

Seite 459

502*1BHT-BASIC represents the bit order by the exponent of each binary digit in the byte. Forexample, bit 0 means LSB; bit 7 means MSB.*2The reading

Seite 460

503Appendices*6To make the TIME$ function return or set the system time, set 0 to this bit; to make theTIME$ function return or set the wakeup time, s

Seite 461 - 18.6 FTP Library (FTP.FN3)

504*18To update the BHT system by using an application program, download an update file to theBHT and then execute an OUT statement. Updating the syst

Seite 462 - Reply Codes

505AppendicesAppendix EKey Number Assignment on the KeyboardE1. BHT-3000 Key Number AssignmentThe keys on the BHT-3000 keyboard are assigned numbers

Seite 463 - VERSION$

506E2. BHT-4000 Key Number AssignmentThe keys on the BHT-4000 keyboard are assigned numbers as shown below. Default Data AssignmentThe default data a

Seite 464

507AppendicesE3. BHT-5000[ 1 ] 32-key pad Key Number AssignmentThe keys on the BHT-5000 keyboard are assigned numbers as shown below. Default Data As

Seite 465

508 Alphabet Letter AssignmentShown below are the alphabet letter assignments which are available when the alpha-bet input function is activated.*1BS,

Seite 466

509Appendices[ 2 ] 26-key pad Key Number AssignmentThe keys on the BHT-5000 keyboard are assigned numbers as shown below. Default Data AssignmentThe

Seite 467

510E4. BHT-6000 Key Number AssignmentThe keys on the BHT-6000 keyboard are assigned numbers as shown below. Default Data AssignmentThe default data a

Seite 468

Chapter 2. Development Environment and Procedures43 Compiling options Linking optionCompiling options Description+DOutputs debug information files (

Seite 469

511AppendicesE5. BHT-6500 Key Number AssignmentThe keys on the BHT-6500 keyboard are assigned numbers as shown below. Default Data AssignmentThe defa

Seite 470

512E6. BHT-7000/BHT-7500[ 1 ] 32-key pad Key Number AssignmentThe keys on the BHT-7000/BHT-7500 keyboard are assigned numbers as shownbelow. Default

Seite 471

513Appendices Alphabet Letter AssignmentShown below are the alphabet letter assignments which are available when the alpha-bet input function is activ

Seite 472

514[ 2 ] 26-key pad (BHT-7000 only) Key Number AssignmentThe keys on the BHT-7000 keyboard are assigned numbers as shown below. Default Data Assignme

Seite 473 - Appendices

515AppendicesAppendix FMemory Area Memory MapThe memory maps are shown below.JIS Kanji font area(256 KB)ROMRAMUser area(104 or 488 KB)System program

Seite 474 - Appendix A

516ROMRAMUser area(464 or 1976 KB)System program area(196 KB)JIS Level 1 Kanji font area(128 KB)JIS Level 2 Kanji font area(128 KB)User area (60 KB)Sy

Seite 475

517AppendicesThe size and area allocation of the memory incorporated in the BHT differ depending upon themodels as listed below.*1The cluster size is

Seite 476

518 Memory Space Available for VariablesListed below are the maximum memory spaces available for work, common, and registervariables.* 32 KB in the BH

Seite 477 - A2. Compilation Errors

519AppendicesAppendix GHandling Space Characters in Downloading Space characters used as padding charactersA data file can be downloaded with System

Seite 478

520 To handle space characters as dataTo handle space characters in the tail of a data field as data (not as padding characters), youmust take specia

Seite 479 - Syntax Errors

44[ 3 ] Error Level Indication by ERRORLEVELIf you specify a +E option at the command line and run the BHT-BASIC 3.5 Compiler, theERRORLEVEL of MS-DOS

Seite 480

521Appendices[Example 3] When specifying a field data to be searched, do not include space charactersin the tail of the data field.ABCSend dataABCRece

Seite 481 - Error code & Message

522 To make the BHT-5000/BHT-6000/BHT-6500/BHT-7000/BHT-7500 handle spacecharacters as dataYou can specify the handling of space characters in the tai

Seite 482

523AppendicesAppendix HProgramming Notes[ 1 ] Flash ROM BHT-5000/BHT-6000/BHT-6500You can store user program files and data files in the flash ROM as

Seite 483 - Linking Errors

524[ 2 ] BHT-2000 compatible mode BHT-5000You can run user programs written for the BHT-2000 on the BHT-5000 without any programmodification if you s

Seite 484 - Error Message

525Appendices[ 3 ] Program file named APLINT.PD3 BHT-5000/BHT-6000/BHT-6500/BHT-7000/BHT-7500If a program file named APLINT.PD3 is stored in the BHT-

Seite 485 - Library Errors

526Appendix IProgram SamplesWriting the function for receiving both bar code entry and key entryFeature: This function receives earlier one of either

Seite 486 - Reserved Words

527Appendicesfnbarkey$ = .kb$ ’ Then, return the character.exit defendifselect .kb$case chr$(13)fnbarkey$ = .rt$exit defcase chr$(8) ’ BS key.if len(.

Seite 487 - Character Sets

528Testing the written function while 1 ’Infinite loopa$ = fnbarkey$ (1, "A", 15, "DL") ’F4 and SFT/F4 as escape characters.printi

Seite 488 - C2. National Character Sets

529AppendicesAppendix JQuick Reference for Statements and FunctionsControlling program flowStatementsCALLCalls an FN3 or SUB function.CHAINTransfers c

Seite 489 - KPLOAD statement. If the

530Handling errorsStatementsON ERROR GOTOEnables error trapping.RESUMECauses program execution to resume at a speci-fied location after control is tra

Seite 490 - KPLOAD statement, the Inter

Chapter 2. Development Environment and Procedures452.4.9 Output from the BHT-BASIC 3.5 CompilerThe BHT-BASIC 3.5 Compiler outputs the following inform

Seite 491

531AppendicesControlling the LCD screenStatementsAPLOADLoads a user-defined font in the single-byte ANKmode.CLSClears the LCD screen.CURSORTurns the c

Seite 492 - I/O Ports

532Controlling the keyboard inputStatementsINPUTReads input from the keyboard into a variable.KEYAssigns a string or a control code to a function key;

Seite 493

533AppendicesCommunicating with I/OsStatementsOUTSends a data byte to an output port.POWERControls the automatic power-off facility.WAITPauses program

Seite 494 - D2. BHT-4000

534Manipulating data files and user program filesStatementsCLFILEErases the data stored in a data file.CLOSECloses file(s).FIELDAllocates string varia

Seite 495

535AppendicesFunctionsBCC$Returns a block check character (BCC) of a datablock.EOFTests whether the end of a device I/O file has beenreached.ETX$Modif

Seite 496

536Manipulating string dataFunctionsASCReturns the ASCII code value of a given character.CHR$Returns the character corresponding to a givenASCII code.

Seite 497 - D3. BHT-5000

537AppendicesAppendix KUnsupported Statements and FunctionsBHT-BASIC does not support the following MS-BASIC statements and functions:- For handling s

Seite 498

538- For othersCDBL FIX SGNCINT IF GOTO STRING$CLEAR LPOS SWAPCOPY OCT$ TABDEF DBL OPTION BASE WRITEDEF SNG RANDOMIZEDEFINT RND

Seite 499

539IndexSymbols_ (underline, underscore) 18, 36, 61,62, 64, 79, 273, 299, 300, 301,302, 458, 460’ (single quotation, single quote, apostrophe) 19, 60,

Seite 500

540412, 425, 427, 477, 483, 484,485, 486, 488, 490, 492, 493,495, 496, 498, 499, 501, 502,537BHT-BASIC 3.0 9, 21, 22BHT-BASIC Compiler vi, 9, 11, 15,

Seite 501 - D4. BHT-6000/BHT-6500

46XXX represents a source program filename.YYY represents a project name.Address–Source listFile XXX.LST (in the direc-tory where the source pro-gram

Seite 502

541communications protocol 149, 330,334, 391, 417, 488, 489, 490,491, 492, 493, 495, 497, 498,500, 502, 503, 519, 534compilation error 57, 335, 468com

Seite 503

542255, 257, 307, 308, 473, 477,530direct-connect interface 14, 146, 147,148, 276, 287, 288, 289, 290,291, 292, 390, 483, 485, 486,489, 493, 499direct

Seite 504 - OUT statement

543300, 301, 309, 310, 354, 355,363, 364, 370, 371, 372, 378,379, 398, 409, 412, 465, 466,526file type 34, 135, 194, 222, 231, 243,264, 274, 301, 310,

Seite 505

544281, 282, 285, 293, 359, 385,415, 480, 481, 482, 523interrupt 53, 155, 158, 160, 161, 163,174, 175, 271, 317, 415, 416,484, 486, 491, 496, 502, 529

Seite 506 - XFILE state

545momentary switching mode 144, 163,276, 278MSB 115, 184, 483, 484, 485, 486, 488,490, 493, 496, 499, 502multilink protocol, Multilink ProtocolSystem

Seite 507 - D5. BHT-7000/BHT-7500

546optimizing drive 427OR 19, 61, 75, 76, 79, 83, 84, 477OUT 89, 112, 113, 114, 115, 116, 117,118, 122, 124, 130, 132, 140,145, 150, 151, 163, 173, 17

Seite 508 - state

547489, 490, 491, 492, 493, 495,496, 498, 499, 501, 503reserved word iii, iv, 65, 66, 67, 313,470, 477RESTORE 202, 312, 314, 473, 477, 530RESUME 53, 6

Seite 509

548147, 149, 150, 151, 152, 153,158, 159, 160, 161, 163, 173,174, 177, 178, 180, 181, 182,184, 185, 186, 187, 188, 189,190, 191, 192, 193, 194, 196,19

Seite 510 - END, POWER

549Ttag-jump function, tag jump 30terminator 149, 150, 151, 152, 331,358, 535text control character 331, 358, 380,382timeout 131, 173, 287, 288, 291,

Seite 511

550WWAIT 131, 133, 143, 144, 156, 173,291, 294, 326, 327, 477, 483,484, 485, 488, 489, 492, 493,498, 533wakeup ii, 169, 170, 171, 172, 173,174, 175, 3

Seite 512

Chapter 2. Development Environment and Procedures472.4.10 Structure of User Programs and LibrariesIf you specify a user program to be produced in the

Seite 513

BHT-BASICThe purpose of this manual is to provide accurate information in the development of applicationprograms in BHT-BASIC. Please feel free to se

Seite 514 - Non-shift mode Shift mode

482.5 Downloading2.5.1 Overview of Transfer Utility/Ir-Transfer Utility C/Ir-Transfer Utility ETransfer Utility/Ir-Transfer Utility C/Ir-Transfer Util

Seite 515

Chapter 2. Development Environment and Procedures492.5.2 Setting up the BHT BHT-3000If the error message "Report to the personnel in charge (x)&

Seite 516

50 BHT-5000/BHT-6000/BHT-6500If the error message given below appears, it is necessary to initialize the BHT before down-loading user programs."S

Seite 517

iv Notational Conventions Used in This BookSeveral notational conventions are used in this book for the sake of clarity. 1. Reserved words are printed

Seite 518

Chapter 2. Development Environment and Procedures512.6 Executing a User Program2.6.1 StartingTo run a user program, start System Mode and select the d

Seite 519 - Shift mode

52Chapter 3 Program StructureCONTENTS3.1 Program Overview... 53

Seite 520

Chapter 3. Program Structure533.1 Program Overview3.1.1 Statement BlocksA statement block is a significant set of statements (which is also called &qu

Seite 521

54[ 3 ] User-defined FunctionsBefore calling user-defined functions, it is necessary to define those functions with any of thefollowing statements. G

Seite 522

Chapter 3. Program Structure553.1.2 Notes for Jumping into/out of Statement BlocksIt is not recommended to jump control from a main routine or subrout

Seite 523

563.2 Handling User Programs3.2.1 User Programs in the MemoryThe user area of the memory (memories) in the BHT can store more than one user program.(F

Seite 524 - Memory Map

Chapter 3. Program Structure573.2.3 Included Files"Included files" are separate source programs which may be called by the INCLUDE meta-comm

Seite 525

58Chapter 4 Basic Program ElementsCONTENTS4.1 Structure of a Program Line... 5

Seite 526 - Battery Backup of Memory

Chapter 4. Basic Program Elements594.1 Structure of a Program Line4.1.1 Format of a Program LineA program line consists of the following elements:[lab

Seite 527

60[ 2 ] StatementsStatements can come in two types: executable and declarative statements.• Executable statementsThey make the Interpreter process pr

Seite 528 - Host computer

v Icons Used in This BookStatements and functions unique to BHT-BASIC. Syntax for the Statement Reference and Function ReferenceThe syntax in program

Seite 529

Chapter 4. Basic Program Elements614.1.2 Program Line Length A program line is terminated with a CR code by pressing the carriage return key.The allow

Seite 530

624.2 Usable Characters4.2.1 Usable CharactersListed below are characters which can be used for writing programs. Note that a double quote(") ca

Seite 531

Chapter 4. Basic Program Elements634.2.2 Special Symbols and Control CodesSymbols and control codes used outside of a character string have the follow

Seite 532 - Programming Notes

64:(Colon)• Separates statements.• Separates time information in TIME$ function.;(Semicolon)Line feed control character in INPUT and other statements.

Seite 533

Chapter 4. Basic Program Elements654.3 LabelsA label can contain the following characters:• Alphabet characters• Numeral characters• Period (.) Rules

Seite 534

664.4 IdentifiersIdentifiers for the names of variables should comprise the same alphanumerics as the labels. Rules for naming identifiers• The identi

Seite 535 - Program Samples

Chapter 4. Basic Program Elements674.5 Reserved Words"Reserved words" are keywords to be used in statements, functions, and operators. For

Seite 536

68Chapter 5 Data TypesCONTENTS5.1 Constants... 695

Seite 537

Chapter 5. Data Types695.1 Constants5.1.1 Types of ConstantsA constant is a data item whose value does not change during program execution. Constants

Seite 538 - Quick Reference

70 Real ConstantsReal constants should be formatted as shown below.Syntax:sign mantissaSyntax: sign mantissa E sign exponentWhere a lowercase letter &

Seite 539 - Handling errors

vi Technical Terms Used in This ManualCompiler and InterpreterThe BHT-BASIC Compiler, which is a development tool, is expressed as Compiler.The BHT-BA

Seite 540 - Controlling the LCD screen

Chapter 5. Data Types715.2 VariablesA variable is a symbolic name that refers to a unit of data storage. The contents of a variablecan change during

Seite 541

72 Memory OccupationA string variable occupies the memory space by (the number of characters + one) bytes, wherethe added one byte is used for the cha

Seite 542 - Communicating with I/Os

Chapter 5. Data Types735.2.2 Classification of Variables Work VariablesA work variable is intended for general use. You may use it either by declari

Seite 543

745.3 User-defined FunctionsOut of user-defined functions, the SUB and FUNCTION functions can be called from otherfiles. The DEF FN function can be c

Seite 544 - Manipulating numeric data

Chapter 5. Data Types755.4 Type Conversion5.4.1 Type ConversionBHT-BASIC has the type conversion facility which automatically converts a value of one

Seite 545 - Specifying included files

765.4.2 Type Conversion ExamplesThe following examples show the type conversion from real to integer. Assignment of Real Expressions to Integer Variab

Seite 546 - Appendix K

77Chapter 6 Expressions and OperatorsCONTENTS6.1 Overview...

Seite 547 - - For others

786.1 OverviewAn expression is defined as a combination of constants, variables, and other expressionswhich are connected using operators.There are tw

Seite 548

Chapter 6. Expressions and Operators796.2 Operator PrecedenceWhen an expression contains more than one operator, BHT-BASIC performs the operations int

Seite 549

80When more than one operator occurs at the same level of precedence, the BHT-BASICresolves the expression by proceeding from left to right.a=4+5.0/20

Seite 550

vii AbbreviationsANK AlphaNumerics and KatakanaBASIC Beginners All purpose Symbolic Instruction CodeBCC Block Check CharacterBHT Bar code Handy Termin

Seite 551

Chapter 6. Expressions and Operators816.3 Operators6.3.1 Arithmetic OperatorsArithmetic operators include a negative sign (-) and operators for multip

Seite 552

826.3.2 Relational OperatorsA relational operator compares two values. Depending upon whether the comparison is true orfalse, the operator returns tr

Seite 553

Chapter 6. Expressions and Operators836.3.3 Logical OperatorsA logical operator combines multiple tests and manipulates Boolean operands, then returns

Seite 554

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

Seite 555

Chapter 6. Expressions and Operators856.3.4 Function OperatorsThe following two types of functions are available in BHT-BASIC, both of which work as f

Seite 556

86 Comparison of Character StringsThe relational operators compare two character strings according to character codesassigned to individual characters

Seite 557

87Chapter 7 I/O FacilitiesCONTENTS7.1 Output to the LCD Screen ... 887.1.1

Seite 558

887.1 Output to the LCD Screen7.1.1 Display Fonts[ 1 ] Fonts available on each BHTListed below are the fonts available on each BHT series.(√: Availabl

Seite 559

Chapter 7. I/O Facilities89[ 2 ] Switching the fontsYou may switch the screen mode and font size by using the statements below.•SCREEN statement• OUT

Seite 560 - Programmer’s Manual

90 Locating Characters on the LCD ScreenUsing the LOCATE statement locates characters on the coordinates of the LCD screen. Thecoordinates differ de

Kommentare zu diesen Handbüchern

Keine Kommentare