![QSI QTERM-R55 Скачать руководство пользователя страница 23](http://html1.mh-extra.com/html/qsi/qterm-r55/qterm-r55_user-manual_3304037023.webp)
QTERM-R55 User's Manual
13
QSI Corporation Fax 801-466-8792 Web www.qsicorp.com Phone 801-466-8770
The
time$
output string has three fields:
13
is the hour
(00-23),
51
is the minute (00-59) and
53
is the second (00-
59).
All fields of
date$
and
time$
(except the last field
within
time$
) are fixed length; thus it is easy to extract
fields with the
mid$
function [see Extracting Parts of a
2.8.2
Cursor Appearance
The following
cursor
commands control the appearance
of the cursor:
cursor normal
cursor blink
cursor off
Normal is the standard underscore cursor (default). The
cursor may be positioned with the
at()
command as fol-
lows:
cursor at(X,Y)
where X and Y are the column and row of the desired cur-
sor location, respectively. The
at()
command can also be
used with the print command (see section 2.9.1).
These commands are illustrated in Example 10.
2.8.3
Peek
The
peek()
function is handy for obtaining certain infor-
mation about the QTERM-R55 hardware. This command
can be used to get the number of character rows and col-
umns on the QTERM-R55 display, the number of keys on
the keypad and the current cursor position (X or Y). Peek-
ing at COM1 or COM2 returns the number of characters
available in the receive buffer for that interface. Peeking at
ostick returns the number of operating system time ticks
since the unit was powered on. The time interval between
ticks is 20 milliseconds. The syntax is:
peek(<“keyword”>)
where <keyword> is one of the following:
columns
rows
numkeys
cursorX
cursorY
COM1
COM2
ostick
The numeric return value contains the requested informa-
tion.
2.8.4
Serial Communication
The program may send characters or strings to the serial
port with these commands:
send #COM1 string$
send #COM1 num
string$ = recv$ #COM1
num = recv #COM1
In a string context,
send
outputs string
string$
to the
port. In a numeric context,
send
outputs a character whose
ASCII value is contained in num (truncated to an integer,
modulo 255).
In a string context,
recv
will grab everything in the serial
input buffer (up to 100 characters) and put it into string
string$
. If no characters are available, this function
returns an empty string.
NOTE: As explained in section 2.1.1.2, string variables
may not contain NULL characters. Therefore, if the serial
stream might contain NULL characters,
recv
must be
used in a numeric context.
In a numeric context,
recv
pulls one character from the
serial port and puts its ASCII value into variable
num
. If no
character is available, this function returns the value 256.
and
input
also work with the serial port by
inserting the serial port identifier:
print #COM1 string$,num
input #COM1 a$
Example 10 illustrates the serial communications com-
mands.
Programming serial communications for the EIA-485 inter-
face requires special attention. See section 3.4.3 for more
information.
2.8.5
Keypad LEDs
The LEDs may be turned on and off with the following
commands:
led <lednum> on
led <lednum> off
<lednum>
is an expression yielding an integer from 1 to
Содержание QTERM-R55
Страница 4: ......
Страница 6: ...ii QTERM R55 User s Manual QSI Corporation Fax 801 466 8792 Web www qsicorp com Phone 801 466 8770...
Страница 10: ...vi QTERM User s Manual QSI Corporation Fax 801 466 8792 Web www qsicorp com Phone 801 466 8770...
Страница 14: ...4 QTERM R55 User s Manual QSI Corporation Fax 801 466 8792 Web www qsicorp com Phone 801 466 8770...
Страница 34: ...24 QTERM R55 User s Manual QSI Corporation Fax 801 466 8792 Web www qsicorp com Phone 801 466 8770...