The text of a manual · part 38 of 52
TE 2000 VT/ANSI Terminal Emulation Programmer's Guide: Chapter 6: Programming, pages 323 to 332
Pages 323 to 332 of 456, 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 2425
Page 323
Chapter 6, Programming
The following table lists other control functions. All tab stops are reset. User-defined keys are cleared. Soft Terminal Reset (DECSTR) States Mode
Mnemonic
State After DECSTR
Set top and bottom margins DECSTBM
Top margin = 1. Bottom margin = page length.
All character sets
G0, G1, G2, G3, GL, GR VT/ANSI default settings.
Select graphic rendition
SGR
Normal rendition.
Start of selected area
SSA
Cleared.
End of selected area
ESA
Cleared.
Start of protected area
SPA
Cleared.
End of protected area
EPA
Cleared.
Save cursor state
DECSC
Home position with VT/ ANSI defaults.
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: S Clears the screen. S Returns cursor to the upper-left corner of the screen. S Sets SGR function to normal rendition.
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. The following table shows the action taken by the terminal when it receives test and adjustment sequences. Name (Mnemonic)
Sequence
Action
Tests (DECTST)
CSI 4 ; Ps ; ..... ; Ps y
Ignored
Adjustments (DECALN)
ESC # 8
Fills display with uppercase Es
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
299
Page 324
Chapter 6, Programming
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). The following table lists qualification sequences. Note: DAQ is ignored unless the terminal is in VT340 mode.
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
Private Sequences Private sequences enable or disable autosend. 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).
300
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
Page 325
Chapter 6, Programming
Proprietary Sequences Following are INTERMECR 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. Note that the terminal enters Character mode when it is cold-started. 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.
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). 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).
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
301
Page 326
Chapter 6, Programming
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): S If ERM is set all characters can be changed, erased, and moved, regardless of protection. S If ERM is reset only unprotected characters can be changed, erased, and moved. These control functions will not affect protected areas in page memory: S Insert line (IL) S Delete line (DL) S Insert character (ICH) S Delete character (DCH) S Erase in display (ED) S Erase in line (EL) S Erase character (ECH)
302
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
Page 327
Chapter 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. Control Characters for Auto-Login Script File Sequence
Definition
Sequence
Definition
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
Negative Acknowledge
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
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
303
Page 328
Chapter 6, Programming
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.) Sequence
Definition
Sequence
Definition
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
304
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
Page 329
Chapter 6, Programming
IBM 330X Applications The following escape sequences are supported for IBM 330X terminals: Escape Sequence
Action
ESC n A
Moves cursor up “n” lines. Cursor stops at top margin.
ESC n B
Moves cursor down “n” lines. Cursor stops at bottom margin.
ESC n C
Moves cursor right “n” columns. Cursor stops at right margin.
ESC n D
Moves corsor left “n” columns. Cursor stops at left margin.
ESC I
Erase from the cursor to the end of the line, including the cursor position. Line attribute is not affected. If erasure mode (ERM) is reset, this function cannot erase protected characters.
ESC n O
Deletes “n” lines, starting at the line with the cursor. If fewer than “n” lines remain from the current line to the end of the scrolling region, the number of lines deleted is the lesser number. As lines are deleted, the lines within the scrolling region and below the cursor move up, and blank lines are added at the bottom of the scrolling region. The cursor is reset to the first column.
ESC L
Erases the entire display. All lines are erased and changed to single width. The cursor does not move.
ESC n P
Inserts “n” characters starting with the character at the cursor location, with the character attribute set to normal. The cursor does not move and remains at the beginning of the inserted characters. A parameter of “0” or “1” inserts one blank character. Data on the line is shifted forward as in character insertion. In edit mode (DECEDM), if erasure mode (ERM) is reset, text moved into a protected character field is lost.
ESC n Q
Deletes “n” characters, starting with the character at the cursor position. When a character is deleted, all characters to the right of the cursor move to the left. This creates a space character at the right margin for each character deleted. Character attributes move with the characters. Spaces created at the end of the line have all of the character attributes off. In edit mode (DECEDM), if erase mode (ERM) is reset, then this command cannot delete protected characters.
ESC n N
Inserts “n” lines at the cursor. If fewer than “n” lines remain, from the current line to the end of the scrolling region, the number of lines inserted is the lesser number. Lines within the scrolling region at and below the cursor move down. Lines past the bottom margin are lost. The cursor is reset to the first column. This sequence is ignored if the cursor is outside of the scrolling region. In edit mode (DECEDM), if erasure mode (ERM) is reset, lines that move down into a line with a protected character field are lost.
ESC n X
Moves the cursor to the “nth” column.
ESC n Y
Moves the cursor to the “nth” row.
ESC H
Moves the cursor to the top left of the memory screen.
ESC J
Erases from the cursor to the end of the display, including the cursor position. Line attributes become single height/single width for all completely erased lines.
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
305
Page 330
Chapter 6, Programming
ANSI Mode Sequences Cursor Positioning The terminal supports cursor positioning sequences in the following table. Name (Mnemonics)
Sequence
Action
Cursor backward tab (CVT)
CSI Ps Z
Moves the cursor to previous Ps tab stop(s). If there is no previous tab stop, then the cursor moves to the left margin.
Cursor horizontal absolute (CHA)
CSI Ps G
Moves the cursor to the Ps column on the current line.
Cursor horizontal tab (CHT)
CSI Ps I
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.
Cursor next line (CNL)
CSI Ps E
Moves the cursor down Ps lines. If at the bottom margin of the screen, then the cursor is not moved.
Cursor previous line (CPL)
CSI Ps F
Moves the cursor up Ps lines. If at the top margin of the screen, then the cursor is not moved.
Horizontal position absolute (HPA)
CSI Ps
Moves the cursor to Ps column on the current line.
Horizontal position relative (HPR)
CSI Ps a
Moves the cursor Ps columns from the current location. If past the right margin, then the cursor is stopped at the right margin.
Vertical position absolute (VPA)
CSI Ps d
Moves the cursor to Ps row using the current column.
Vertical position relative (VPR)
CSI Ps e
Moves the cursor Ps rows from the current location. If at the bottom margin, the cursor is stopped at the bottom margin.
Cursor vertical tab (CVT)
CSI Ps Y
Moves the cursor down Ps vertical tab stops. If at the bottom margin, then the cursor is stopped.
Cursor Tabulation Control The following table lists cursor tabulation control (CBT) sequences in ANSI mode. Sequence
Action
CSI 0 W
Sets horizontal tab stop at current location.
CSI 1 W
Sets vertical tab stop at current location.
CSI 2 W
Clears horizontal tab stop.
CSI 3 W
Clears vertical tab stop.
CSI 4 W
Clears all horizontal tab stops this line.
CSI 5 W
Clears all horizontal tabs stops in the machine.
CSI 6 W
Clears all vertical tab stops
Scrolling The following table lists scrolling sequences in ANSI mode.
306
Name (Mnemonics)
Sequence
Action
Scroll up (SU)
CSI Ps S
Scrolls display up Ps lines.
Scroll down (SD)
CSI Ps T
Scrolls display down Ps lines.
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
Page 331
Chapter 6, Programming
Transmitted Keyboard Codes Transmitted codes are generated by the terminal’s keys and sent to the host computer or software application in use. The following pages describe the capability of the terminals to emulate codes generated by the VT/ANSI terminal keyboard’s main keypad, editing keypad, auxiliary keypad, and top-row function keys. Codes are sent via Line Edit (block) mode or optimized Character mode selected through the keyboard function labeled MODE on the overlay.
Line Edit (Block) Mode Line Edit (block) mode is a synchronous condition where the terminal temporarily stores or “buffers” keys you press. It sends the cumulative data to the host computer when you press one of these terminating keys: S [Enter] S [F6] through [F20], [PF1] through [PF4] S [CTRL]+[A] through [CTRL]+[Z] S Forward Tab S DEL (7F hexadecimal) S Backspace The following also apply to Line Edit (block) mode: S When you press [PF1], the following key will also be transmitted directly to the host computer. S When scanning, the terminal automatically enters Line Edit (block) mode for each individual scan. When it completes scanning, it returns to the mode it was set at before it started scanning. For codes generated by the cursor control key, see page 309. For codes generated by the auxiliary keypad keys, see page 309.
Character Mode Character mode (the default) is a condition where the terminal sends, to the host computer, each key as you press it. You should place the terminal into Character mode during these situations: S When the terminal should immediately send information to the host computer. This operation is called “type-ahead.” S When the terminal’s keyboard sends a character to the display as well as to the host. This operation is called “local echo.” If local echo is disabled, the host receives the character from the terminal and then sends the return response. To alternate between Line Edit (block) mode and Character mode, press the mode key as defined under “Transmission Mode” in Chapter 3, “Using the Terminal’s Keyboard.” TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
307
Page 332
Chapter 6, Programming
Transmitted Keyboard Keys The following pages describe codes generated by main keypad keys, editing keys, auxiliary keys, and top-row function keys.
Main Keypad The terminal emulates all of the standard and most of the special function keys on the VT/ANSI main keypad. The standard keys generate letters, numbers, and symbols, either alone or in combination with other keys. The function keys generate special function codes. The following table lists the codes generated by the special function keys. VT/ANSI Key Code Ctrl
Does not send a code when used alone. Is always used in combination with another key to send a control code.
Delete
DEL (7F hexadecimal).
Lock
None.
Return
CR (0D hexadecimal) or CR (0D hexadecimal) LF (0A hexadecimal).
Shift
Does not send a code when used alone; sends uppercase characters when used with other standard keys.
Space bar
SP (20 hexadecimal).
Tab
HT (09 hexadecimal).
Editing Keypad The terminal has editing keys and cursor control keys. Editing keys have functions assigned to them by the application software in use. Refer to your VT/ANSI application software manual for the uses of the editing keys.
Editing Keys The following table lists the codes generated by the editing keys. Note: The editing keys do not send codes in VT100 mode. VT/ANSI Key Code
308
Find
CSI 1 ∼
Insert here
CSI 2 ∼
Next screen
CSI 6 ∼
Prev screen
CSI 5 ∼
Remove
CSI 3 ∼
Select
CSI 4 ∼
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide