22
QTERM-IV/P40 User's Manual
Beijer Electronics Fax 801-466-8792 Web www.beijerelectronicsinc.com Phone 801-466-8770
<k00> 'First',\P,20,'Second'
would send the text “First” to the host, pause for one sec-
ond (20*50 ms = 1 sec), then send the text “Second” to the
host. n can be a decimal number (1 to 255) or a hexadeci-
mal number (x01 to xFF).
The EDIT Buffer Start switch, \S, sets the start of the Multi-
drop/Block EDIT buffer at the current cursor location (this
is only useful when the QTERM is in either Multidrop or
Block mode). The EDIT buffer extends to the end of the
current line. A more detailed description of Multidrop and
Block modes and the EDIT buffer follows below.
Any of the special function switches can appear anywhere
inside a string definition.
3.5.4
String Examples
Example 1: A More Sophisticated Warning Key String
<k00>
07,'ALARM!',\L,27,'E','WARNING!!',
27,'PQ',07,\P,20,07
Pressing this key would result in the following:
07
-sent to host, should cause host to
“beep”
'ALARM!'
-sent to host for display
\L
-switch to local mode
27,'E'
-clear screen command to QTERM
(27 =
]
)
'WARNING!!'
-displayed on QTERM screen
27,'PQ'
-command to blink rightmost
QTERM LED
07
-tells QTERM to beep
\P,20
-pauses for 1 second
07
-tells QTERM to beep again
Example 2: A Macro String for Displaying a Menu (make
sure AutoLinefeed is ON for this one!)
<m00>L,27,'E',
' Please Select One:',x0D,
' 1) Main Menu ',x0D,
' 2) Setup Menu ',x0D,
' 3) Text Menu '
If the host sent the command
]
p @ (to execute macro 00)
to the QTERM, the QTERM would clear its screen (
]
E),
then display the menu text shown above. All of this with
one three-byte command from the host!
Example 3: Key Strings Executing Macro Strings
Presume that the macro above is defined, and that we
define a key as follows:
<k00> 'Entering Menu',\L,27,'p@'
If the user presses this key (which we might want labeled
“MENU” on the graphic overlay), the QTERM will send
the string “Entering Menu” to the host, and then execute
Macro 00, which displays the menu shown above. All with-
out any assistance from the host!
3.6
Custom Display Characters
The QTERM is capable of displaying eight user-defined
characters. Each of these characters consists of an eight row
by five column dot matrix, where you specify which of the
dots are on or off.
You also define what code will cause the character to be
displayed by the QTERM. You may choose any 8-bit value
(code) from 00h through FFh, except values from 07h
through 1Bh (see Appendix B for a chart of this). This
allows you to redefine up to eight of the standard ASCII
character bit patterns. For example, you could redefine the
hex value x62, which normally displays a “b”, to display a
small box (
G
).
Each custom character is defined in the QDATA file as a
string of eight byte values, where each byte specifies the
dot pattern for one row of dots. For each byte, the upper
three bits are set to 0, and the lower five bits correspond to
the five dots on the row. If a bit is set to 1, the dot will be
dark (on); if the bit is set to 0, the dot will be light (off).
As an example, Figure 3-1 shows the default dot pattern of
custom character 6 which is a little humanoid figure. From
this dot pattern, the following bit assignments are derived:
As you can see in your default QDATA file, the hexadeci-
mal values listed in the right column above are the values
which are used to define the custom character. This particu-
lar dot patter is assigned to the ASCII character x06 in the
default QDATA file.
Row
7
6
5
4
3
2
1
0
Hex
1
2
3
4
5
6
7
8
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
1
1
1
1
0
1
0
0
1
0
1
1
1
1
1
1
1
0
1
1
0
1
0
0
1
0
0
0
0
1
1
0
1
1
0E
0E
04
1F
15
04
1F
11