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 24 of 33

TE 2000 VT/ANSI Terminal Emulation Programmer's Guide: Section 6: Programming, pages 195 to 204

Pages 195 to 204 of 278, from TE 2000 VT/ANSI Terminal Emulation Programmer's Guide

The original document is the PDF (4.0 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 6400

Page 195

SECTION 6

Programming

The vertical bar (|, 7C hexadecimal) is the final character. It identifies this control string as a DECUDK. Ky1/St1;}Kyn/Stn are the key definition strings. You include these strings between the final character (|) and the string terminator (ST). Each string consists of a key selector number (Kyn) and a string parameter (Stn), separated by a slash (/, 2F hexadecimal). A semicolon (3B hexadecimal) separates different strings. The key selector number (Kyn) indicates which key you are defining. Following is a list of definable keys and their identifying values. Key

Value

Key

Value

F6 F7 F8 F9 F10 F11 F12 F13 F14

17 18 19 20 21 23 24 25 26

F13 F14 Help Do F17 F18 F19 F20

25 26 28 29 31 32 33 34

String parameters (Stn) are the encoded definition of the keys. String parameters consist of hex pairs in the following ranges: 30 through 39 hexadecimal (0 through 9) " 41 through 46 hexadecimal (A through F) " 61 through 66 hexadecimal (a through f) When you combine these hexadecimal values they represent an 8-bit quantity. This method lets you use any of the 256 character codes in the key string. You can enter key definition strings in any order. "

The default for Stn is “empty.” The key is undefined. ST is the string terminator. ST (9C hexadecimal) is a C1 8-bit character. You can use ESC \ (1B and 5C hexadecimals) for a 7-bit environment.

Loading UDKs Following are some guidelines for loading UDKs. "

"

"

"

"

Clear UDK memory space before loading new definitions. Use a DECUDK string to clear keys without locking them. Then you can use another DECUDK string to redefine the keys and lock them. If you redefine a key, the old definition is lost. This may clear some space if the new definition uses fewer bytes than the old one. There are two ways to lock UDKs, but only one way to unlock them. To lock UDKs, you can use either the terminal’s firmware menus or a DECUDK control string. To unlock UDKs, you must use the terminal’s firmware menus. The default value for each key definition is empty. When you clear UDKs, they are empty. An invalid hex pair in a DECUDK string is ignored. TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide

6-21

Page 196

SECTION 6

Programming

Examples of Device Control Strings This sequence clears UDKs: DCS 0 ; 1 | ST

This sequence locks UDKs: DCS 1 ; 0 | ST

Suppose you want to define the F20 key to be PRINT without clearing or locking any other keys and you are using 8-bit mode. The first part of the sequence would look like this: É1;1|34/ where 34 is the code for the F20 key and “É” is the ASCII character for 90 hexadecimal. After the slash character “/” (2F hexadecimal) you would include the definition. The rest of the sequence after the slash character would be, 5052494E54£ where the hex encoding for PRINT is: 50 = P 52 = R 49 = I 4E = N 54 = T The ST ASCII character “£” (9C hexadecimal) marks the end of the control string. The complete string is: É1;1|34/5052494E54£

Down-Line Loadable Character Set The terminal does not support the ability to create and down-line load a character set of up to 94 characters (Table 6-26). This character set is also called a dynamically redefinable character set (DRCS). Table 6-26 Down-Line Loadable Character Set

6-22

Function

Action

Down-line load DRCS characters

Ignored

Clear a down-line loaded character set

Ignored

TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide

Page 197

SECTION 6

Programming

Reports The terminal sends reports in response to host computer requests. Reports provide identification (type of terminal). Two categories of reports are available: primary and secondary device attributes, and device status reports.

Device Attributes (DA) Table 6-27 shows the action taken by the terminal when it receives primary and secondary device attribute exchanges. During a primary exchange, the host asks for the terminal’s service class code. The terminal responds with “I am a service class 2 terminal.” During a secondary exchange the terminal responds with “I am a VT (identification code of 1) family terminal.” Table 6-27 Device Attributes Communication Host to VT220 (request) VT220 to host (response)

DA Exchange Sequence Primary Secondary Primary

Secondary

Meaning

CSI > c or CSI > 0 c CSI c or CSI 0 c CSI > c CSI > 1 c CSI > 24 c CSI > 19 c CSI ? 61 c CSI ? 62 ; 8 ; 9 c

What type of terminal are you? What type of terminal are you? I am a VT100 Terminal I am a VT220 Terminal. I am a VT320 Terminal. I am a VT100 Terminal. I am a VT100 Terminal. I am a VT220 Terminal supporting user-defined keys and national replacement character sets. CSI ? 63 ; 8 ; 9 c I am a VT320 Terminal supporting user-defined keys and national replacement character sets. CSI ? 63 ; 8 ; 9 ; 13 c I am a VT340 Terminal supporting user-defined keys, national replacement character sets, and local editing.

TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide

6-23

Page 198

SECTION 6

Programming

Device Status Reports (DSR) Table 6-28 shows the action taken by the terminal when it receives device status report exchanges, when the host computer asks for the general operating status of the terminal or printer, or both. If the terminal is in printer controller mode, the printer receives the DSR request but cannot answer. Table 6-28 Device Status Reports DSR Exchange Communication VT220

Printer port User-defined keys Keyboard language

Host to VT220 (Request for status) VT220 to host (DA response) Host to VT220 (Request for cursor position) VT220 to host (CPR response) Request for printer status Response Request for UDK status Response Request for keyboard language Response

Sequence

Action

CSI 5 n

Ignores this code.

CSI 0 n or CSI 3 n CSI 6 n

Ignores these codes.

CSI Pv; Ph R CSI ? 15 n CSI ? 13 n CSI ? 25 n CSI ? 20 n CSI ? 21 n CSI ? 26 n

“Please report your cursor position using a CPR (not DSR) control sequence.” “My cursor is positioned at _____ (Pv); _____ (Ph).” (Pv=row, Ph=column) What is the printer status? No printer. Ignored in VT100 mode. UDKs are unlocked. UDKs are locked. What is the keyboard language?

CSI ? 27; Pn n North American keyboard dialect.

Identification The terminal supports the identification sequence (Table 6-29). Table 6-29 Identification Name (Mnemonic)

Sequence

Action

Identification (DECID)

ESC Z

Ignored.

Terminal Reset Terminal reset escape sequences cause either a soft terminal reset or a hard terminal reset.

Soft Terminal Reset (DECSTR) " NOTE:

The DECSTR control function is available for all VT/ANSI modes.

DECSTR changes most of the terminal’s current settings to the power-up default settings listed in Table 6-30. The escape sequence is: CSI ! p 6-24

TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide

Page 199

SECTION 6

Programming

DECSTR affects only those functions listed in Table 6-30. Table 6-30 Soft Terminal Reset (DECSTR) States Mode

Mnemonic

State After DECSTR

Text cursor enable Insert/replace Origin Auto wrap Keyboard action Numeric Keypad Cursor keys Edit Transmit execution Erasure Guarded area transfer Multiple area transfer Selected area transfer Scanner lock

DECTCEM IRM DECOM DECAWM KAM DECNKM DECCKM DECEDM DECTEM ERM GATM MATM SATM

Cursor enabled. Replace. (“Insert” if local editing mode.) Absolute (cursor origin at upper-left of screen). No auto wrap. Unlocked. Numeric characters. Normal (arrow keys). Interactive. Immediate. All characters. All characters. All selected areas. All areas. Reset.

Table 6-31 lists other control functions. Table 6-31 Other Control Functions Mode

Mnemonic

State After DECSTR

Set top and bottom margins

DECSTBM

All character sets

G0, G1, G2, G3, GL, GR SGR SSA ESA SPA EPA DECSC

Top margin = 1. Bottom margin = page length. VT/ANSI default settings.

Select graphic rendition Start of selected area End of selected area Start of protected area End of protected area Save cursor state

Normal rendition. Cleared. Cleared. Cleared. Cleared. Home position with VT/ANSI defaults.

All tab stops are reset. User-defined keys are cleared.

Hard Terminal Reset (RIS) When the RIS is complete, the terminal sends XON to resume communication. The RIS sequence is: ESC c RIS resets values to factory default settings. It is the same as DECSTR, but also does the following: " Clears the screen. " Returns cursor to the upper-left corner of the screen. " Sets SGR function to normal rendition. TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide

6-25

Page 200

SECTION 6

Programming

Tests and Adjustments The terminal has adjustment patterns you can invoke from the host computer with escape sequences. Adjustment sequences send uppercase Es to the terminal’s display. Only qualified technicians perform adjustment procedures. Table 6-32 shows the action taken by the terminal when it receives test and adjustment sequences. Table 6-32 Tests and Adjustments Name (Mnemonic)

Sequence

Action

Tests (DECTST) Adjustments (DECALN)

CSI 4 ; Ps ; ..... ; Ps y ESC # 8

Ignored Fills display with uppercase Es

VT52 Mode Escape Sequence The terminal does not support VT52 mode, which allows the VT/ANSI Terminal to operate with DEC software written for VT52 Terminals.

Define Area Qualification The define area qualification (DAQ) command indicates that the active position is the first character position of a qualified area. The end of a qualified area is indicated by the beginning of the following qualified area. The qualifications of the area are specified according to the parameter(s). Table 6-33 lists qualification sequences. " NOTE:

DAQ is ignored unless the terminal is in VT340 mode. Table 6-33 Define Area Qualification

Qualification

Sequence and Ps (Single Parameter) Action

Accept all input

CSI 0 o

Accepts all input

Accept no input (protected) and do not transmit (guarded)

CSI 1 o

Accepts no input

Accept graphics

CSI 2 o

Accepts graphics

Accept numerics

CSI 3 o

Accepts numerics

Accept alphabetics

CSI 4 o

Accepts alphabetics

Right justify in area

CSI 5 o

Right justifies area

Zero fill in area

CSI 6 o

Fills area with zeros.

Horizontal tab stop at start of area

CSI 7 o

Puts horizontal tab stop at start of area

Accepts no input (protected), but select for transmission (unguarded)

CSI 8 o

Accepts no input

Space fill in area

CSI 9 o

Fills area with spaces

Invisible

CSI 1 0 o

Makes passwords invisible

6-26

TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide

Page 201

SECTION 6

Programming

Private Sequences Private sequences enable or disable autosend (Table 6-34). Table 6-34 Define Area Qualification Mode

Sequence*

Action

Set

ESC [ = 3 l

Enables autosend. Transmits the screen when the last field is filled. If you are on the last defined field and get data from the bar code reader or RS-232 port, the display will also be automatically sent even if the field not filled.

Reset

ESC [ = 3 h

Disables autosend. Only transmits when a terminating key is pressed.

*

The last character of the set mode sequence is lowercase L (6C hexadecimal).

Proprietary Sequences Following are INTERMEC R extensions to the data stream.

Line Edit and Character Modes Two proprietary escape sequences enable the host to put the terminal into Line Edit (block) mode or Character mode (Table 6-35). Note that the terminal enters Character mode when it is cold-started. Table 6-35 Line Edit and Character Mode Sequences Mode

Sequence*

Line Edit

CSI = 1 l

Character

CSI = 1 h

*

The last character of the Line Edit sequence is lowercase L (6C hexadecimal).

Norcompress The Norcompress function handles the norrc command, where “a” is the number of iterations that “b” occurs in the datastream. The sequence for Norcompress is CSI a;bz.

TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide

6-27

Page 202

SECTION 6

Programming

Scanner Lock Mode Scanner lock mode is similar to the KAM function; however, you do not need to repeatedly send the Locked command (this command is assumed after each scan). Table 6-36 Scanner Lock Mode Mode

Sequence*

Action

Set

CSI = 4 h

The host sends this sequence, which puts the terminal into Scanner Lock mode. When the terminal is in this mode, only one scan is allowed; the scanner is then inhibited. After this sequence is sent, the user can scan only once (no additional scans are allowed). To re-enable the scanner, the host must send CSI 2 l to unlock the scanner.

Reset

CSI = 4 l

Resets Scanner Lock mode (default).

*

The last character of the reset sequence is lowercase L (6C hexadecimal).

The scanner lock state can also be reset by the RIS command (ESC c) or the DECSTR command (CSI ! p).

VT340 Applications VT340 Terminal applications supported by the terminal include setting the right margin, using control functions, and creating text forms.

Right Margin The terminal’s display contains 2 to 80 columns. To ensure that the cursor will not go beyond Column Pn, use the following sequence to set the number of columns (Pn is a number from 2 to 80): CSI Pn $ ¦

Control Functions In editing mode you can use the erasure, deletion, and insertion control functions. The character protection field lets you design text forms that cannot be changed or overwritten. In edit mode, character protection also depends on the setting of erasure mode (ERM): " If ERM is set all characters can be changed, erased, and moved, regardless of protection. " If ERM is reset only unprotected characters can be changed, erased, and moved. These control functions will not affect protected areas in page memory: Insert line (IL) Delete line (DL) Insert character (ICH) Delete character (DCH) Erase in display (ED) Erase in line (EL) Erase character (ECH) 6-28

TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide

Page 203

SECTION 6

Programming

Text Forms When using C1 control characters SPA, EPA, SSA, and ESA to create forms on the host, the rows and columns to which the cursor moves must be in sequential order. The following shows some sequences that create a text form, start with the left column. Sequence

Description

Sequence

Description

ESC [ 1; 1 H

Home cursor

ESC V

Start protected area

ESC [ 2 J

Clear screen

ESC [ 4; 1 H

Move cursor to Row 4, Col 1

ESC [ ? 10 h

Start local editing mode

“Lot:”

Display literal

ESC V

Start protected area

ESC [ 1 D

Move cursor back 1 position

ESC [ 1; 2 H

Move cursor to Row 1, Col 2

ESC W

End protected area

“Manufacturing”

Display literal

ESC [ 1 C

Move cursor forward 1 position

ESC [ 1 ; 17 H

Move cursor to Row 1, Col 17

ESC F

Start selected area

“Receiving”

Display literal

ESC [ 4; 9 H

Move cursor to Row 4, Col 9

ESC [ 2; 1 H

Move cursor to Row 2, Col 1

ESC G

End selected area

“LIP:”

Display literal

ESC V

Start protected area

ESC W

End protected area

ESC [ 5; 1 H

Move cursor to Row 5, Col 1

ESC [ 1 D

Move cursor back 1 position

“Qty:”

Display literal

ESC W

End protected area

ESC [ 1 D

Move cursor back 1 position

ESC [ l C

Move cursor forward 1 position ESC W

End protected area

ESC F

Start selected area

ESC [ 1 C

Move cursor forward 1 position

ESC [ 2; 15 H

Move cursor to Row 2, Col 15

ESC F

Start selected area

ESC G

End selected area

ESC [ 5; 13 H

Move cursor to Row 5, Col 13

ESC V

Start protected area

ESC G

End selected area

ESC [ 3; 1 H

Move cursor to Row 3, Col 1

ESC V

Start protected area

“Item:”

Display literal

ESC [ 24; 80 H Move cursor to Row 24, Col 80

ESC [ 1 D

Move cursor back 1 position

ESC W

End protected area

ESC W

End protected area

ESC [ 26 $ |

Set the number of Cols to 26

ESC [ 1 C

Move cursor forward 1 position ESC [ 1; 8 r

Set top at 1, bottom at 8 Rows

ESC F

Start selected area

ESC [ 3 g

Clear tab stops

ESC [ 3; 16 H

Move cursor to Row 3, Col 16

ESC [ 2; 5 H

Move cursor to Row 2, Col 5

ESC G

End selected area

If this information is entered on the form: 111111111 2222222222 3333 44444444 for “LIP:” for “Item:” for “Lot:” for “Qty:”

The data stream will be sent to the host as indicated in the following chart. (If guarded area transfer mode (GATM) is reset, then the record separator is processed as a protected field entry.) TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide

6-29

Page 204

SECTION 6

Programming

Sequence

Description

Sequence

Description

RS

Protected field Line 1

3333

Selected field Line 4

RS

First protected field Line 2

RS

Second protected field Line 4

111111111

Selected field Line 2

RS

First protected field Line 5

RS

First protected field Line 3

44444444

Selected field Line 5

RS

First protected field Line 3

RS

Second protected field Line 5

2222222222

Selected field Line 3

RS

Protected field Line 6

RS

Second protected field Line 3

RS

Protected field Line 7

RS

First protected field Line 4

RS

Protected field Line 8

ANSI Mode Sequences Cursor Positioning The terminal supports the cursor positioning sequences in Table 6-37. Table 6-37 Cursor Positioning Sequences Name (Mnemonic)

Sequence Action

Cursor backward tab (CVT)

CSI Ps Z

Cursor horizontal absolute (CHA) Cursor horizontal tab (CHT)

CSI Ps G CSI Ps I

Cursor next line (CNL)

CSI Ps E

Cursor previous line (CPL)

CSI Ps F

Horizontal position absolute (HPA) CSI Ps Horizontal position relative (HPR) CSI Ps a Vertical position absolute (VPA) Vertical position relative (VPR)

CSI Ps d CSI Ps e

Cursor vertical tab (CVT)

CSI Ps Y

6-30

Moves the cursor to previous Ps tab stop(s). If there is no previous tab stop, then the cursor moves to the left margin. Moves the cursor to the Ps column on the current line. Moves the cursor to the next Ps tab stop(s). If there is not next tab stop, then the cursor moves to the right margin. Moves the cursor down Ps lines. If at the bottom margin of the screen, then the cursor is not moved. Moves the cursor up Ps lines. If at the top margin of the screen, then the cursor is not moved. Moves the cursor to Ps column on the current line. Moves the cursor Ps columns from the current location. If past the right margin, then the cursor is stopped at the right margin. Moves the cursor to Ps row using the current column. Moves the cursor Ps rows from the current location. If at the bottom margin, then the cursor is stopped at the bottom margin. Moves the cursor down Ps vertical tab stops. If at the bottom margin, then the cursor is stopped.

TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide