20
QTERM-IV/P40 User's Manual
Beijer Electronics Fax 801-466-8792 Web www.beijerelectronicsinc.com Phone 801-466-8770
pausing and Edit Mode control. See section 3.5.3 and sec-
tion 4.3 for a detailed description of these switches.
Examples of Key Strings. The simplest example of a key
string is where pressing the key sends just one character,
regardless of whether the shift key has been pressed:
<k43> '1' ; send ASCII '1'
<sk43> '1' ; send same if shifted
<kr43>
; send nothing on release
<skr43>
; send nothing on shifted release
The next example shows a key which sends a string when
pressed, but beeps if pressed when shifted (the number 7 is
a “bell” character):
<k27> 'Hello There'; send string
<sk27> 7 ; beep if shifted
<kr27>
; nothing
<skr27>
; nothing
Below is a key string which uses Special Function Switches
to control the keypad LEDs and to pause. The key controls
LED1 when unshifted (press and the LED goes on, release
and it goes off), and controls LED2 when shifted (press and
it goes on, release and it goes off ½-second later):
<k32>
'Turn 1 on',\L,27,'PI';send string, turn L1 on
<sk32>
'Turn 2 on',\L,27,'PJ'; send string, turn L2 on
<kr32>
'Turn 1 off',\L,27,'PA' ; send string, turn L1
off
<skr32>
'Turn 2 off',\P,10,\L,27,'PB'; send string,
pause ½-second, turn L2 off
The final example shows how to combine strings, numbers
and Special Function Switches on one key string assign-
ment. Note the splitting the key assignment onto multiple
lines (as done here) is perfectly acceptable.
<k62> 'Pause here ',\P,10,'then turn dig0 on ',
\L,27,'dH','then beep ',7,'then send a cr/lf '
'to the host',x0D,10
Key String Restrictions. A key string may be from 0 to
255 bytes long.
Pause constants may be from 1 to 255, which corresponds
to 50 ms to 12.75 second pauses. Multiple pause constants
can be specified in one string.
Be sure to separate each component of a key string (text
strings and numbers) by a comma, as shown in the exam-
ples above.
3.4.3
Macros and Event Triggered Strings
This is the last section of the QDATA file, and contains
macro strings and strings that get executed according to
certain events. The following section explains these
advanced features in more detail.
3.5
Advanced QDATA File Concepts
The QTERM has some advanced capabilities in its string
processing ability that go beyond simple byte strings that
get transmitted to the host.
3.5.1
String Terminology
The various string definitions available in the QTERM pro-
vide a great deal of flexibility when interfacing to a variety
of host systems. In order to understand the operation of
QTERM strings, you must understand the following termi-
nology:
STRING DEFINITION
A string of bytes specifying the data to be transmitted or
displayed and any commands to be executed when the
defined string is executed. String Definitions can only be
entered in a QDATA file. The program QSETUP is then
used to compile the QDATA file and download it into the
QTERM's EEPROM memory.
STRING EXECUTION
The transmission or display of characters, or execution of
software commands specified in a given String Definition.
Strings can be executed in a number of ways. For example,
by pushing a key (this would execute the string defined for
that key) or by undergoing a timeout (this would execute
the timeout string).
HOST MODE
Forces String Definition data to be transmitted to the host.
All String Definitions are executed in Host Mode, by
default, unless the string execution mode is switched by a
LocalMode toggle. Host Mode only applies to String Defi-
nitions; it has no meaning outside of a String Definition.
LOCAL MODE
Forces String Definition data to display or execute locally
on the QTERM. Software commands and displayable data
are handled as though they were received from the host.
Local Mode only applies to String Definitions; it has no
meaning outside of a String Definition.
Local mode is enabled by entering the Local Mode toggle
(“\L”) in a String Definition. Any data following the Local
Mode toggle is interpreted as Local Data by the QTERM