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 23 of 47

PDT 1100 Terminal Programmer's Guide: Chapter 10 Statement Reference, pages 201 to 210

Pages 201 to 210 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 201

Statement Reference where mini.no.digits and minimum and maximum number of digits for bar codes to be read max.no.digits = by the PDT 1100, in the range of 2 to 99.

If both mini.no.digits and max.no.digits are omitted, the default reading range is 2 to 99 digits. If only max.no.digits is omitted, the PDT 1100 can only read the number of digits specified by mini.no.digits. CD = a check digit. Specifying a C causes the Interpreter to check bar codes with MOD-10. The check digit is included in the number of digits. OPEN “BAR:” AS #1 CODE “I:6-10C”

Codabar (NW7) (N)

Syntax N[:[mini.no.digits[- max.no.digits]][startstop] [CD]] where mini.no.digits and minimum and maximum number of digits for bar codes to be read max.no.digits = by the PDT 1100, in the range of 3 to 99.

If both mini.no.digits and max.no.digits are omitted, the default reading range is 3 to 99 digits. If only max.no.digits is omitted, the PDT 1100 can only read the number of digits specified by mini.no.digits. start and stop = start and stop characters. Each of them should be an A, B, C, or D. If a question mark (?) is specified, it acts as a wild card. The start and stop characters are included in the number of digits. CD = a check digit. Specifying a C causes the Interpreter to check bar codes with MOD-16. The check digit is included in the number of digits. OPEN “BAR:” AS #1 CODE “N:8AAC”

10-91

Page 202

PDT 1100 Terminal Programmer’s Guide

Code 39 (M)

Syntax M[:[mini.no.digits[- max.no.digits]][CD]] where mini.no.digits and minimum and maximum number of digits for bar codes to be read max.no.digits = by the PDT 1100, in the range of 1 to 99.

If both mini.no.digits and max.no.digits are omitted, the default reading range is 1 to 99 digits. If only max.no.digits is omitted, the PDT 1100 can only read the number of digits specified by mini.no.digits. CD = a check digit. Specifying a C causes the Interpreter to check bar codes with MOD- 43. The check digit is included in the number of digits. OPEN “BAR:” AS #1 CODE “M:8-12C”

Code 93 (L)

Syntax L[:[mini.no.digits[- max.no.digits]]] where mini.no.digits and minimum and maximum number of digits for bar codes to be read max.no.digits = by the PDT 1100, in the range of 1 to 99.

If both mini.no.digits and max.no.digits are omitted, the default reading range is 1 to 99 digits. If only max.no.digits is omitted, the PDT 1100 can only read the number of digits specified by mini.no.digits. OPEN “BAR:” AS #1 CODE “L:6-12”

Code 128 (K)

Syntax K[:[mini.no.digits[- max.no.digits]]]

10-92

Page 203

Statement Reference where mini.no.digits and minimum and maximum number of digits for bar codes to be read max.no.digits = by the PDT 1100, in the range of 1 to 99.

If both mini.no.digits and max.no.digits are omitted, the default reading range is 1 to 99 digits. If only max.no.digits is omitted, the PDT 1100 can only read the number of digits specified by mini.no.digits. OPEN “BAR:” AS #1 CODE “K:6-12”

Standard 2 of 5 (STF) (H)

Syntax H[:[mini.no.digits[- max.no.digits]]][CD] [startstop]] where mini.no.digits and minimum and maximum number of digits for bar codes to be read max.no.digits = by the PDT 1100, in the range of 1 to 99.

If both mini.no.digits and max.no.digits are omitted, the default reading range is 1 to 99 digits. If only max.no.digits is omitted, the PDT 1100 can only read the number of digits specified by mini.no.digits. CD = a check digit. Specifying a C causes the Interpreter to check bar codes with MOD- 10. The check digit is included in the number of digits. startstop = startstop specifies the normal or short format of the start/stop characters. Specify N for the normal format; specify S for the short format. If startstop is omitted, the PDT 1100 can read start/stop characters in either format.

Up to eight readcodes can be specified. If you specify more than one condition to a same read code, all are valid. The sample below causes the PDT 1100 to read both 6- and 10-digit ITF codes. OPEN “BAR:” AS #1 CODE “I:6”,“I:10”

10-93

Page 204

PDT 1100 Terminal Programmer’s Guide

Syntax Error Error Code and Message Meaning error 71: Syntax error

The number of the specified read codes exceeds eight.

Execution Error Error Code

Meaning

02h

Syntax error (readcode is missing.)

05h

Parameter out of the range (readcode is not correct.)

37h

File already open.

3Ah

File number out of the range.

45h

Device files prohibited from opening concurrently (opening the bar code device file and the optical interface of the communications device file concurrently attempted.)

10-94

Page 205

Statement Reference

OPEN “COM:” Statement Name: Open “Com:”

Type: File I/O Statement

Description Opens a communications device file.

Syntax Syntax 1 (For direct-connect interface) OPEN “COM n:[baud][,[parity][,[charalength][,[stopbit][,[RS/CS] [,[timeout]]]]]] ”AS [#] filenumber

Syntax 2 (For optical interface) OPEN “COM n: [baud] ”AS [#] filenumber where: baud = (For the optical interface) 115200, 57600, 38400, 19200,

9600, or 2400 (For the direct-connect interface) 38400, 19200, 9600, 4800, 2400, 1200, 600, or 300 parity = N, E, or O charalength = 8 or 7 stopbit = 1 or 2 RS/CS = 0, 1, 2, 3 or 4 timeout = An integer numeral from 0 to 255. filenumber = A numeric expression which returns a value from 1 to 16.

Notes OPEN “COM:” opens a communications device file and associates it with filenumber for allowing input/output activities using the communications interface.

10-95

Page 206

PDT 1100 Terminal Programmer’s Guide

!

If optional parameters enclosed with brackets are omitted, the most recently specified values or the defaults become active. Listed below are the defaults: Baud rate

9600 bps

Parity check

No parity

Character length

8 bits

Stop bit

1 bit

RS/CS control

0 (No control)

Timeout

3 seconds

COM n is a communications device file name.

Since the PDT 1100 supports both optical and direct-connect interfaces but cannot open them concurrently, set one of the specifications listed above. If you attempt to open both interfaces concurrently, an execution error occurs. Optical interface:

Supports RS and CS.

Direct-connect interface:

Does not support RS and CS.

Interface

Communications device file name

Optical interface

“COM1:”

Direct-connect interface

“COM2:”

Default interface***

“COM:”

*** The default interface is an interface selected on the SET COM menu in System Mode. (For details, refer to the PDT 1100 User's Manual.) The PDT 1100 cannot open the optical interface and the bar code device file concurrently. If you attempt to open them concurrently, an execution error occurs. COM may be in lowercase as shown below. OPEN “com:” AS #8

10-96

Page 207

Statement Reference baud

The optical interface uses one of the following baud rates: 115200, 57600, 38400, 19200, 9600 (default), or 2400. The direct-connect interface uses one of the following baud rates: 38400, 19200, 9600 (default), 4800, 2400, 1200, 600, or 300. parity parity is a parity check. This can be N (none - default), E (even), or O (odd). charalength charalength is a character length or the number of data bits, and it can 8 (default) or 7 bits. stopbit stopbit is the number of stop bits and can be 1 (default) or 2 bits. RS/CS RS/CS enables or disables the RS/CS control. It can be 0 (default), 1, 2, 3, or 4, corresponding to the following functions:

Value of RS/CS

PDT 1100 Optical I/F

Direct-connect I/F

0

Ignored

1

Ignored

2

Ignored

High RD is regarded as a high CS.

3

Ignored

Low RD is regarded as high CS.

4

Ignored

CS control disabled (RD is used as an input port.)

If RS/CS is specified for the optical interface, it is ignored with no execution error. RS/CS also applies to the direct-connect interface for Busy control.

Following is a program sample for enabling RS/CS control. OPEN “COM:,,,,1” AS #16

10-97

Page 208

PDT 1100 Terminal Programmer’s Guide

An OUT statement can be used instead of the OPEN “COM:” statement to control the RS signal or the ER signal. A WAIT statement or INP function can be used to monitor the CS signal or CD signal. (To connect the PDT 1100 to an asynchronous half-duplex modem, use the OUT and WAIT statements and INP function.) timeout timeout is the maximum time (from 0 to 255 in increment of 100 ms) until the CS signal goes ON after the PDT 1100 becomes ready to send data.

Assigning zero (0) causes no timeout. The optical interface of the PDT 1100 does not support timeout. If specified, the timeout option is ignored with no execution error. The direct-connect interface supports timeout; set the RS/CS option to “2” or “3” so the RD signal is regarded as CS. If the RS/CS option is set to “0,” “1,” or “4”, the value of the timeout option is modified.

Syntax Error Error Code and Message Meaning error 71: Syntax error filenumber is missing.

Execution Error Error Code

Meaning

02h

Syntax error (the x in “COM:x” contains an invalid parameter.)

37h

File already open.

3Ah

File number out of range.

45h

File already open (there was an attempt to open the bar code device file and the optical interface of the communications device file concurrently.)

10-98

Page 209

Statement Reference

OUT Statement Name: Out

Type: I/O Statement

Description Sends a data byte to an output port.

Syntax OUT portnumber, data where: portnumber = A numeric expression. data = A numeric expression which returns a value from 0 to 255.

Notes OUT sends a data byte designated by data to a port specified by portnumber. !

!

portnumber is not a hardware port on the PDT 1100 but a logical port assigned by the Interpreter. (Refer to Appendix D, I/O Ports) If bits not assigned a hardware resource are specified to portnumber or data, they are ignored.

10-99

Page 210

PDT 1100 Terminal Programmer’s Guide

Syntax Error Error Code and Message Meaning error 71: Syntax error portnumber is missing. data is missing.

Execution Error Error Code

Meaning

05h

Parameter out of the range (portnumber or data is out of the range.)

Example OUT 3,7

The above example sets the LCD contrast to the maximum.

Reference Statements

WAIT

Functions

INP

10-100