HV ANSI Series Technical Reference Manual, MAN0340, Rev. A
5-9
Programming Key Commands
You can issue ANSI host commands to reprogram the terminal’s function keys to transmit a single
character or a string of characters. However, if you have
to the Parameter menu, you
cannot use these commands.
Program Key
Syntax
Esc [5z f
n
|F
n
; C1; C2; . . . C20
Esc [0z
Notes
This command reprograms a function key , where f
n
represents a non-shifted function
key number, F
n
represents a shifted function key number (applies to 30-key and 40-key
keypads) and
C1, C2 . . . C20
are the character values in ASCII Hex notation (“A” = 41,
“B” = 42, etc.).
For example, to program F1 to display the string “STOP” when pressed, issue the
following command:
Esc [5z f1; 53; 54; 4F; 50 Esc [0z
To program F1 to display the string “RESTART,” when pressed in conjunction with the
SHIFT key, issue the following command:
Esc [5z F2; 45; 53; 54; 41; 52; 54 Esc [0z
Should the terminal encounter an error during key programming, it will terminate the
programming operation without allocating memory and return the following error
string:
Esc [0x ERROR CODE=
X
PARAMETERS UNCHANGED Esc [1x
Where
X
is one the following ACSII Hex error codes:
A
= Invalid value or format specified in
f
n
|F
n
B
= Invalid format specified in
C1; C2; . . . C20
C
= Invalid value specified in
C1; C2; . . . C20
After the terminal successfully receives the
Esc [0z
termination command, it inserts the
programming information into memory. Should you remove power within 0.75
seconds of this time, all programmed key data may become corrupt and subsequently
require you to load the default parameters.
Report Key Settings
Syntax
Esc [4z
Notes
This command sends a list of keys programmed with values other than the default
values to the host using the format:
Esc [0xf
n
; C1; C2; . . . C
n
F
n
C1; C2; . . . C
n
Esc _[1x
Where
f
n
is the non-shifted function key number,
F
n
is the shifted function key number
and
C1
,
C2
. . .
C
n
are the character string values in ASCII Hex notation (“A” = 41, “B” =
42, etc.).
For example,
Esc [0xf1; 48H; 45H; 4CH; 4CH; 4FHf2; 12Hf3; 13Hf4; 14Hf5; 15HF1; 06HF2; 07HF3;
08HF4; 09HF5; 0AH Esc _[1x
In the above example, the non-shifted F1 contains the hex equivalent of the character
string “STOP.” The remaining functions keys contain their default values.