QTERM-IV/P40 User's Manual
21
Beijer Electronics Fax 801-466-8792 Web www.beijerelectronicsinc.com Phone 801-466-8770
up until another Local Mode toggle is encountered, after
which Host Mode becomes active again. Local Mode can
be toggled on and off as much as desired within a String
Definition.
HOST DATA
That portion of a String Definition which is executed in
Host mode and specifies what is to be transmitted to the
host. Since Host Mode is the default String Definition
mode, String Definitions are always executed as Host Data
until a Local Mode toggle is encountered.
LOCAL DATA
That portion of a String Definition which is executed in
Local Mode and specifies what is to be displayed or exe-
cuted on the QTERM-IV itself when a given string exe-
cutes. Local Data may contain Display Data or Local
Commands.
DISPLAY DATA
That portion of either an incoming packet or a Local-Mode
string definition which contains data for display on the
LCD.
LOCAL COMMANDS
That portion of a String Definition, executing in Local
Mode, which contains QTERM software commands which
are to be executed on the QTERM. Local Commands can
only consist of QTERM software commands. Certain com-
mands are not allowed as Local Commands; certain other
commands take on special behavior as Local Data when the
QTERM's serial interface mode is set to Block or Multi-
drop mode, i.e. EDIT buffer editing keys. This special
behavior is described in the Block and Multidrop Serial
Mode sections below.
3.5.2
String Concepts
The QTERM takes the concept of a “character string” and
broadens it to include any combination of these items:
•
Host data (text to be transmitted to the host)
•
Local display data (text to be displayed on the
QTERM screen)
•
Local commands (commands to be executed as if sent
from the host)
•
Special functions including Pauses (delays) in string
processing and Multidrop/Block mode buffer control
A string is “executed” when it is processed by the QTERM.
The concepts of a “string” and of “string execution” apply
to all references to strings on the QTERM:
•
key strings (executed when a key is pressed)
•
key release strings (executed when a key is released)
•
macro strings (executed when a the macro command is
received)
•
autoexec string (executed on power-up or reset)
•
timeout string (executed when a timeout occurs)
•
low-battery string (executed when the lowbat line goes
low)
3.5.3
String Definitions
String definitions describe what happens when a given
string is executed. String definitions can only appear in
QDATA files. Then you use the QSETUP program to com-
pile the QDATA file and all the string definitions and other
configuration data contained in the QDATA file and down-
load it into the QTERM. String Definitions are constructed
using a combination of quoted text ('text'), numerical byte
values (27, xF3) and three optional special-function
switches: \L, \P and \S.
The Local Mode Toggle switch, \L, toggles the string
between host and local mode. For example, here is a
QDATA file key-string definition which uses Host Mode to
transmit a string to the host and Local Mode to display a
different string on the QTERM's LCD.
<k13> 'Host',\L,'QTERM'
This would send the text “Host” to the host computer (host
data) and the text “QTERM” to the QTERM display
(local-mode display data) when the key at row #1 and col-
umn #3 is pressed. The \L can be used multiple times in a
string to toggle back and forth between host and local
modes. All strings always default to host data until a \L is
encountered.
One of the useful features of local mode is to cause the
QTERM to execute software commands without receiving
the commands from the host. For example, if you defined
the autoexec string as
[autoexec string] '!',\L,'QTERM Active', 07,x1B,'IC@'
on power up or reset, the QTERM would send “!” to the
host and display “QTERM Active” on the LCD. Then the
QTERM buzzer will beep, since 07 is the ASCII BEL code,
and the cursor would move the first column on the last row
since
]
IC@ is the command sequence to position the cur-
sor at row 3 and column 0.
The Pause switch, \P, inserts a pause in string execution.
The form is \P,n where n is a number indicating the number
of 50 ms periods to pause. For example: