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 35 of 46

TE 2000 VT/ANSI Terminal Emulation Programmer's Guide: Chapter 7: Extended Commands, pages 292 to 300

Pages 292 to 300 of 400, from TE 2000 VT/ANSI Terminal Emulation Programmer's Guide

The original document is the PDF (3.1 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 Intermec 5020

Page 292

7

Extended Commands

Extended commands govern abilities unique to terminals. You can use extended commands to transmit or receive data over the terminal’s RS-232 port, send information to an RS-232 device (such as a printer or bar code printer), or collect data. The following chart lists the commands. Name

Characters

Transmit and Receive On RS-232 Port

#F

Transmit Only On RS-232 Port

#P

Receive Only On RS-232 Port

#G

Set Parameters (supported on 6400, 5055, 59XX, 17XX, 11XX)

#H

Return Version

#V

Tone

#T

Scan

#S

Get Optical Inputs (supported on 248X)

#I

Read, Set, and Reset Relay Commands (supported on 248X)

#R

Magnetic Card Reader (supported on 700 Series)

#M

To use extended commands, you must enable the extended command option through the TE configuration menus. See Chapter 4, “Using the Terminal Emulation Menus,” for information about enabling the command on a terminal.

TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide

267

Page 293

Chapter 7, Extended Commands

Transmit and Receive On RS-232 Port (#F) Use the #F extended command to transmit and receive data on the terminal’s RS-232 port. When constructing a Transmit and Receive command, the data to be sent should be placed at Line 2, Column 1. The data must be less than 1840 bytes in length (after “=yy” compression, where “yy” is the hexadecimal representation of the output byte). The last character must be a “#” (pound sign). The terminal sends the data to the RS-232 port until it detects a “#” character. Due to possible system fragmentation of a data stream, the “#” in Line 1, Column 2, should be the last character placed on the screen. This assures that all data is present before the extended command is parsed (removed). There are two ways to send the #F extended command. The conventional method involves writing the command to the screen on line one, writing the data to be printed on the second line, then writing a “#” character on the first line to activate the print. The other method is to use the control characters APC (0x9F) and ST (0x9C) to encapsulate the command. Using the control characters method is faster since they are not written to the display.

Conventional Method This is an example of Transmit and Receive using the conventional method. Note that the descriptions for the “This is the Data to be sent” command are listed under the control character sequence method. Command

Action

CSI 2J

Clears the screen.

CSI 1;3H

Move the cursor to top row, Column 3.

F4N8100005500A0102bb00

Start the print command.

CSI 2;1HThis is the Data to be sent#

Moves cursor to Row 2, Column 1 and sends the data to be printed

CSI 1;2H#

Move the cursor to top row, Column 2 and start the print job.

Control Character Sequence Method This is the same example using the control character sequence method. You do not need to clear the screen or move the cursor in the example because the print command executes in the background. Control character sequences for mnemonics APC (Application Program Command) and ST (String Terminator) can also start and end data. The last data character must be a “#” (pound sign). The terminal sends the data to the RS-232 port until it detects a “#” character and the string terminator sequence.

268

TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide

Page 294

Chapter 7, Extended Commands

Below are the descriptions of each group of characters. Note that “b” indicates a 1-byte space. ^9F#F4N8100005500A0102bb00This is the Data to be sent#^9C Data to send

S ^9F

APC character 0x9F

S #F

Extended command for transmit and receive

S 4N81

9600 baud, no parity, 8 data bits, 1 stop bit

S 000

Flow control options (disabled)

S 05

Flow timeout (5 seconds)

S 50

Maximum receive characters

S 0A

Delimiting character

S 01

Number of delimiting characters to wait for

S 02

Start character (STX)

S b

Start character return (do not return start character)

S b

Parity error flags (do not flag parity errors)

S 00

Receive timeout (use 5-second default)

S Data to send S #

Data termination character

S ^9C

ST character 0x9C

The output stream appears in ASCII character format. For bytes that are not displayable ASCII characters, you may insert the “=yy” characters, where “yy” is the hexadecimal representation of the output byte.

TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide

269

Page 295

Chapter 7, Extended Commands

The following table describes the line and columns where characters must appear, and their meanings. Note that “b” indicates a 1-byte space. Transmit and Receive Characters, Line 1, Columns 2–24 Column Description

Character

2

Extended command

#

3

Transmit and Receive on RS-232 Port command

F

4

Speed (bits per second)

1=1200; 2=2400; 3=4800; 4=9600; 5=19200; 6=38400

5

Data parity

N=None; 0 (zero)=None; b=None; E=Even; O=Odd

6

Data bits

7=Seven; 8=Eight

7

Stop bits

1=One; 2=Two

8

For 6400, 5020, 5055, 59XX, 17XX, 11XX: CTS flow control

0=Disable; 1=Enable

For 2415, 2425, 2435A, 2455, 2475, 248X Reserved b

For 5020, 5055, 59XX, 17XX, 11XX: DTR flow control

0=Disable; 1=Enable

For 2415, 2425, 2435A, 2455, 2475, 248X, 6400: Reserved b

10

XON/XOFF flow control

0=Disable; 1=Enable

11–12

Flow control timeout value

XX=Number of seconds

13–14

Maximum characters to receive dd or Xd…dX, where: dd=00-99. Default: 99. d…d=Any number of decimal digits from 0–2000, inclusive. Default: 99.

15–16

Delimiter character

AA=Hexadecimal ASCII code that marks the end of data to be received. Range: 00–7E. Default of 00 or bb implies no start character.

17–18

Number of delimiter characters

XX=Number of characters accepted before sending return code to host. Range: 00–99. Default of 00 or bb implies no start character.

19–20

Start character

AA=Hexadecimal ASCII code. Range: 00–99. Default of 00 or bb implies no start character.

21

Return start character to host

F=Return character; b = Do not return character

22

Flag parity errors

P=Flag; b = Do not flag

23–24

Receive timeout length

XX=Number of seconds the terminal waits for input from the RS-232 port before it sends a timeout error. Uses a 5-second default when field contains spaces.

9

270

TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide

Page 296

Chapter 7, Extended Commands

Flow Control The Transmit command supports these types of flow control: S RTS/CTS (6400, 5020, 5055, 59XX, 17XX, 11XX) S DTR/DSR (59XX only) S XON/XOFF Use CTS and DSR flow control lines to show XON/XOFF conditions from the output device. Also use them to prevent output when the terminal has no output device. The output device DTR should connect to either the DSR or CTS lines. On the 59XX Terminal, DTR is normally low and is raised to indicate that the terminal is prepared for an RS-232 data exchange. XON/XOFF is the same XON/XOFF flow control most devices support. The timeout value tells the terminal how long to wait for the flow control handshake before returning a one-byte error value.

TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide

271

Page 297

Chapter 7, Extended Commands

Return Codes for Transmit and Receive The Transmit and Receive return code is the status sent to the host computer. The terminal returns data and the extended command’s status to the host computer in the \\X\CC\DATA<CR> or \\X\CCCC\DATA<CR> format. S X

The return code listed in the following chart.

S CC or CCCC The character count of the data returned. CC is 00–99. CCCC is 100–2000. S DATA

The RS-232 data received from the RS-232 device attached to the terminal (if any data was received). The terminal simulates the [Enter] key to return the code to the host.

Code Description

Column

0

Good status, transaction complete.

(None)

1

Not enough memory. Or, incorrect setting for speed, number of data bits or stop bits, or flow control timeout.

4, 6, 7, 11–12

2

No delimiter (#) on data stream.

(None)

3

Timeout while using CTS flow control (6400, 5020, 5055, 59XX, 17XX, 11XX).

(None)

4

Timeout while using DTR flow control (6400, 5020, 5055, 59XX, 17XX, 11XX).

(None)

5

Timeout while using XON/XOFF flow control.

(None)

6

Improper return field.

(None)

7

Hexadecimal value is outside the range of 00-0F.

15–16, 19–20

8

Reserved.

(None)

9

Incorrect setting for maximum characters to receive.

13–14

A

Incorrect setting for delimiter character.

15–16

B

Incorrect setting for number of delimiter characters.

17–18

C

Incorrect setting for CTS, DSR, or XON/OFF flow control.

8, 9, 10

D

Incorrect setting for start character.

19-20

E

Incorrect setting for data parity.

5, 22 f/F*

Timeout.

(None)

o/O*

Overrun of UART receive register; an error from the RS-232 device.

(None)

p/P*

Data parity or framing error.

(None)

R

Syntax error from RD5500 Remote Display (not the expected character; no character error was detected). (Applies only to the 17XX Terminal.)

(None)

*

An uppercase letter indicates an error from the RS-232 device. A lowercase letter indicates an error from the RD5500 Remote Display (applies only to the 17XX Terminal).

272

TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide

Page 298

Chapter 7, Extended Commands

Transmit Only On RS-232 Port (#P) The Transmit Only On RS-232 Port extended command lets the terminal send information to a slaved RS-232 device, such as a receipt printer or bar code printer. The command uses the RS-232 communications port to send data to the device. The terminal checks data from the host computer for a transmit sequence, then sends the requested data. The host computer signals the terminal for a transmit command by inserting the characters “#P” into the display at Line 1, Columns 2 and 3. Characteristics of the transmission immediately follow the #P command. When constructing a Transmit Only command, the data to be sent should be placed at Line 2, Column 1. The data must be less than 1840 bytes in length (after “=yy” compression). The last character must be a “#” (pound sign). The terminal sends the data to the RS-232 port until it detects a “#” character.

Conventional Method This is an example of Transmit Only using the conventional method. Note that the descriptions for the “Data to send” command are listed under the control character sequence method. Command

Action

CSI 2J

Clears the screen.

CSI 1;3HP5E72010008Data to send=0A=0D# Moves the cursor to top row, Column 3 CSI 1;2H #

Moves the cursor to the beginning.

Due to possible system fragmentation of a data stream, the “#” in Line 1, Column 2, should be the last character placed on the screen. This will assure that all data is present before the extended command is parsed (removed).

Control Character Sequence Method This is the same example using the control character sequence method. You do not need to clear the screen or move the cursor in the example because the print command executes in the background. Control character sequences for mnemonics APC (application program command) and ST (string terminator) can also start and end data. The last data character must be a “#” (pound sign). The terminal sends the data to the RS-232 port until it detects a “#” character and the string terminator sequence.

TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide

273

Page 299

Chapter 7, Extended Commands

Below are the descriptions of each group of characters. ^9P#P5E7201008Data to send=0A=0D#^9C S ^9P

PC character 0x9F

S #P

Extended command for transmit only

S 5E72

19200 baud, even parity, 7 data bits, 2 stop bits

S 010

Enable DTR Flow control

S 08

Wait up to 8 seconds for DSR to be returned

S Data to send Sending string with CR, LF S #

Extended command terminating character

S ^9C

ST character 0x9C

The output stream takes the form of ASCII characters. For nondisplayable ASCII characters, you may insert the “=yy” characters, where “yy” is the hexadecimal representation of the output byte. The following table describes the line and columns where characters must appear, and their meanings. Note that “b” indicates a 1-byte space. Transmit Only Characters, Line 1, Columns 2–12 Column Description

Character

2

Extended command

#

3

Transmit Only On RS-232 Port command

P

4

Speed (bits per second)

1=1200; 2=2400; 3=4800; 4=9600; 5=19200; 6=38400

5

Data parity

N=None; 0 (zero)=None; b=None; E=Even; O=Odd

6

Data bits

7=Seven; 8=Eight

7

Stop bits

1=One; 2=Two

8

For 6400, 5020, 5055, 59XX, 17XX, 11XX: CTS flow control

0=Disable; 1=Enable

For 2415, 2425, 2435A, 2455, 2475, 248X Reserved b

For 5020, 5055, 59XX, 17XX, 11XX: DTR flow control

0=Disable; 1=Enable

For 2415, 2425, 2435A, 2455, 2475, 248X, 6400: Reserved b

10

XON/XOFF flow control

0=Disable; 1=Enable

11-12

Flow control timeout value

XX=Number of seconds

9

Flow Control Transmit Only supports RTS/CTS, DTR/DSR, and XON/XOFF. For descriptions, see page 271.

274

TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide

Page 300

Chapter 7, Extended Commands

Return Codes for Transmit Only The Transmit Only return code is the status sent to the host computer. The terminal returns the extended command’s status to the host computer in the \\X<CR> format. X is the return code listed in the following chart. The terminal simulates the [Enter] key to return the code to the host. Code Description

Column

0

Good status, transaction complete.

(None)

1

Not enough memory. Or, incorrect setting for speed, number of data bits, number of stop bits, or flow control timeout.

4, 6, 7, 11–12

2

No delimiter (#) on data stream.

(None)

3

Timeout while using CTS flow control (6400, 5055, 59XX, 17XX, 11XX).

(None)

4

Timeout while using DTR flow control (6400, 5055, 59XX, 17XX, 11XX).

(None)

5

Timeout while using XON/XOFF flow control.

(None)

6

Improper return field.

(None)

C

Incorrect setting for CTS, DTR, or XON/OFF flow control.

8, 9, 10

E

Incorrect setting for data parity.

5 f

Timeout. No acknowledgment was received from the RD5500 Remote Display (applies to the 17XX Terminal).

(None)

o/O*

Overrun of UART receive register.

(None)

p/P*

Data parity or framing error.

(None)

R

Syntax error from RD5500 Remote Display (not the expected character; no character error was detected). (Applies to the 17XX Terminal.)

(None)

*

An uppercase letter indicates an error from the RS-232 device. A lowercase letter indicates an error from the RD5500 Remote Display (applies only to the 17XX Terminal).

TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide

275