Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 22 of 47

PDT 1100 Terminal Programmer's Guide: Chapter 10 Statement Reference, pages 191 to 200

Pages 191 to 200 of 413, from PDT 1100 Terminal Programmer's Guide

The original document is the PDF (3.5 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Symbol PDT-1100

Page 191

Statement Reference

Syntax Error Error Code and Message Meaning error 71: Syntax error label has not been defined label is missing.

Execution Error Error Code

Meaning

05h

Parameter out of range (expression is negative or greater than 255.)

07h

Insufficient memory space (too many program nesting levels by GOSUB instructions.)

Reference Statements

GOSUB, GOTO, and SELECT...CASE...END SELECT

10-81

Page 192

PDT 1100 Terminal Programmer’s Guide

ON KEY...GOSUB Statement Name: On Key ... Gosub

Type: I/O Statement

Description Specifies an event-handling routine for keystroke interrupt.

Syntax ON KEY (keynumber) GOSUB label where: keynumber = A numeric expression which returns a value from 1 to 31, and 33 to 38.

Notes According to label, ON KEY...GOSUB specifies the first line of an event-handling routine to be invoked if a function key specified by keynumber is pressed. (Refer to Appendix E, Key Number Assignment on the Keyboard) !

! !

!

10-82

ON KEY...GOSUB specifies the location of an event-handling routine but does not enable keystroke trapping. (Refer to KEY ON and KEY OFF on page 10-66 for keystroke trapping.) Assigning zero (0) to label disables keystroke trapping. If a keystroke trap occurs, the Interpreter executes KEY OFF instruction for the pressed function key before passing control to an event-handling routine specified by label in ON KEY...GOSUB instruction. This prevents a same event-handling routine from becoming invoked again by pressing a same function key during execution of the routine until the current event-handling routine is completed by issuing a RETURN instruction. When control returns from the event-handling routine by a RETURN instruction, the Interpreter executes KEY ON instruction. If it is not necessary to resume keystroke trapping, describe a KEY OFF statement in the event-handling routine. If you issue more than one ON KEY...GOSUB instruction specifying the same keynumber, the last statement takes effect.

Page 193

Statement Reference

!

GOSUB instructions can be nested to a maximum of 10 levels.

!

When using the ON KEY...GOSUB statement with block-structured statements (FOR...NEXT, IF.. THEN... ELSE...END IF, SELECT...CASE...END SELECT, and WHILE...WEND), you can nest them to a maximum of 30 levels. Specifying a keynumber of 32 is ignored.

!

Syntax Error Error Code and Message Meaning error 71: Syntax error label has not been defined. label is missing. keynumber is not enclosed in parentheses ( ).

Execution Error Error Code

Meaning

05h

Parameter out of range ( keynumber is out of the range.)

07h

Insufficient memory space (too many program nesting levels by GOSUB statements.)

Reference Statements

KEY, KEY ON, and KEY OFF

10-83

Page 194

PDT 1100 Terminal Programmer’s Guide

OPEN Statement Name: Open

Type: File I/O Statement

Description Opens a file for I/O activities.

Syntax Syntax 1 OPEN “filename” AS [#] filenumber [RECORD filelength]

Syntax 2 OPEN “drivename:filename” AS [#] filenumber [RECORD filelength] where: filenumber = A numeric expression which returns a value from 1 to 16. “filename” and “drivename:filename” = A string expression. filelength = An integer constant which has the value from 1 to 32,767.

Notes OPEN opens a data file specified by “filename” and associates the opened file with filenumber for allowing I/O activities according to filenumber. !

!

10-84

The maximum number of files which can be opened at one time is 16 including the bar code device file and communications device files. “filename” consists of a file name and a file extension. The file name should be 1 to 8 characters long. Usable characters for the file name include alphanumerics, a minus (-) sign, and an underline (_). Note that a minus sign and underline should not be used for the starting character of the file name. Uppercase and lowercase letters are both treated as uppercase letters.

Page 195

Statement Reference

The file extension can be up to 3 characters long, or may be omitted. It should not be .PD3, .EX3, .FN3, and .FLD. a.dat master01.dat !

!

!

!

The filename should be preceded by the drivename. The drivename is A: for RAM or B: for flash ROM. If the drivename is omitted, the default A: (RAM) applies. filelength is the maximum number of registrable records in a file. It can be set only when a new data file is created by an OPEN instruction. If you specify filelength when opening existing data file (including a downloaded data file), the filelength is ignored. Specifying filelength does not allocate memory. Therefore, whether or not a PUT instruction can write records up to the specified filelength depends on the memory occupation state. If filelength is omitted, the default file size is 1,000 records.

Syntax Error Error Code and Message Meaning error 3: “” missing

No double quote precedes or follows filename.

error 71: Syntax error filelength is out of the range. filelength is not an integer constant. filename is not enclosed in double quotes.

10-85

Page 196

PDT 1100 Terminal Programmer’s Guide

Execution Error Error Code

Meaning

02h

Syntax error ( filename is not correct, or the bar code device file or communications device file is specified.)

07h

Insufficient memory space.

32h

File type mismatch.

37h

File already open.

3Ah

File number out of range.

41h

File damaged.

Reference Statements

10-86

CLOSE, OPEN “BAR:”, and OPEN “COM:”

Page 197

Statement Reference

OPEN “BAR:” Statement Name: Open “Bar:”

Type: File I/O Statement

Description Opens the bar code device file. This statement also activates or deactivates the reading confirmation LED and the beeper individually.

Syntax OPEN “BAR:[readmode][LEDcontrol][beepercontrol]” AS [#] filenumber CODE readcode[,readcode...] where: readnumber = A string expression. LEDcontrol = A string expression. Specification of L deactivates the reading confirmation LED. (Default: Activated) beepercontrol = A string expression. Specification of B activates the beeper. (Default: Deactivated) filenumber = A numeric expression which returns a value from 1 to

16. readcode = A string expression.

Notes OPEN “BAR:” opens the bar code device file and associates it with filenumber for allowing data entry from the bar code reader according to filenumber.

If the bar code device file has been opened with the OPEN “BAR:” instruction, pressing the M keys turns on the illumination LED, indicating the PDT 1100 is ready to read bar codes. "

Only one bar code device file can be opened at a time. Up to 16 files can be opened at a time including data files and communications device files. " The PDT 1100 cannot open the bar code device file and the optical interface of the communications device file concurrently. If you attempt to open them concurrently, an execution error occurs. 10-87

Page 198

PDT 1100 Terminal Programmer’s Guide

"

The PDT 1100 can open the bar code device file and the direct-connect interface concurrently. " The name of the bar code device file, BAR, may be in lowercase. OPEN “bar:” AS #10 CODE “A”

"

Lowercase letters may be used for readmode, LEDcontrol, beepercontrol, and readcode.

readmode:

The PDT 1100 supports four read modes: Momentary switching mode (M) OPEN “BAR:M” AS #7 CODE “A”

While you hold down the trigger switch*, the illumination LED lights and the PDT 1100 can read a bar code, even if the bar code device file is closed. You cannot scan another bar code until the entered bar code data is read out from the bar code buffer. Auto-off mode (F) OPEN “BAR:F” AS #7 CODE “A”

When you press the trigger switch*, the illumination LED comes on. The LED goes off when you release the switch or when the PDT 1100 completes bar code reading. Holding down the M keys lights the illumination LED for up to 5 seconds. While the illumination LED is on, the PDT 1100 scans the bar code until it is read successfully or the bar code device file is closed. The LED turns off after 5 seconds, and the M key must be pressed again to read a bar code. Once a bar code is read successfully, you cannot scan another bar code until the entered bar code data is read out from the bar code buffer. Alternate switching mode ( A) OPEN “BAR:A” AS #7 CODE “A”

Pressing the trigger switch* turns on the illumination LED. Even if the switch is released, the illumination LED remains on until a bar code is read successfully, the bar code device

10-88

Page 199

Statement Reference file is closed, or a switch is pressed again. While the illumination LED is on, the PDT 1100 can read a bar code. Pressing the trigger switch* toggles the illumination LED on and off. Once a bar code is read successfully, you cannot scan another bar code until the entered bar code data is read out from the bar code buffer. Continuous reading mode ( C) OPEN “BAR:C” AS #7 CODE “A”

The PDT 1100 turns on the illumination LED until the bar code device file is closed, regardless of the trigger switch*. While the illumination LED is on, the PDT 1100 can read a bar code. Once a bar code is read successfully, the PDT 1100 cannot read the next bar code until the entered bar code data is read out from the bar code buffer. In each read mode, when a bar code is scanned successfully, the reading confirmation LED illuminates green for 500 ms, (unless the reading confirmation LED is deactivated.) The read bar code data is decoded and transferred to the bar code buffer. * The trigger switch function is assigned to the M keys. If readmode is omitted, the PDT 1100 defaults to the auto-off mode. LEDcontrol and beepercontrol

The OPEN “BAR:” statement can activate or deactivate the reading confirmation LED and beeper when a bar code is read successfully. !

! !

Describe parameters of readmode, LEDcontrol, and beepercontrol with no space in-between. readmode, LEDcontrol, and beepercontrol may be described in any order. To deactivate the reading confirmation LED when a bar code is read successfully: OPEN “BAR:L” AS #7 CODE “A”

!

To sound the beeper when a bar code is read successfully: OPEN “BAR:B” AS #7 CODE “A” readcode

The PDT 1100 supports the following bar codes – the universal product codes (UPC), Interleaved 2 of 5 (ITF), Codabar (NW7), Code 39, Code 93, and Code 128. It also supports 10-89

Page 200

PDT 1100 Terminal Programmer’s Guide the Standard 2 of 5 (STF) and the EAN128 if Code 128 is specified. (For more information, refer to the PDT 1100 User's Manual.) UPC (A)

Syntax A[:[code][1stchara[2ndchara]][supplemental]] where code is A, B, or C specifying the following:

Table 10-3. UPC Specifications code

Bar code

A

EAN-13 or UPC-A

B

EAN-8

C

UPC-E

If code is omitted, the default is all of the universal product codes. 1stchara or 2ndchara = a numeral from 0 to 9 specifying the header character (country flag). If a question mark (?) is specified to 1stchara or 2ndchara, it acts as a wild card. supplemental = a supplemental code. Specifying an S to supplemental allows the PDT 1100 to read also supplemental codes. OPEN “BAR:” AS #n CODE “A:49S”

Interleaved 2 of 5 (ITF) (I)

Syntax I[:[mini.no.digits[- max.no.digits]][CD]]

10-90