QSI QTERM-R55 Скачать руководство пользователя страница 23

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 

String (section 2.4.2)].

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. 

print

 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 

6. See Figure 2-1.

Содержание QTERM-R55

Страница 1: ...M R55 USER S MANUAL REVISION 6 QSI CORPORATION 2212 South West Temple 50 Salt Lake City Utah 84115 2648 USA Phone 801 466 8770 Fax 801 466 8792 Email info qsicorp com Web www qsicorp com M01 012 00 Re...

Страница 2: ...31725E0 Printed in USA Copyright QSI Corporation 1999 2009 QTERM QTERM R55 and QABASIC are trademarks of QSI Corporation Manual Updated 15 October 2009...

Страница 3: ...nable protection against harmful interference when the equipment is operated in a commercial environment This equipment generates uses and can radiate radio frequency energy and if not installed and u...

Страница 4: ......

Страница 5: ...inted with the QTERM R55 Chapter 2 qaBASIC This chapter explains how to write a program in qaBASIC It contains examples of how to use each of the commands then an explanation of the command Chapter 3...

Страница 6: ...ii QTERM R55 User s Manual QSI Corporation Fax 801 466 8792 Web www qsicorp com Phone 801 466 8770...

Страница 7: ...2 4 Remainder 7 2 3 2 5 Minimum and Maximum 7 2 3 2 6 Square Root 7 2 4 String Operations 7 2 4 1 Length of a String 7 2 4 2 Extracting Parts of a String 7 2 4 3 Strings to Numbers and Numbers to Stri...

Страница 8: ...acter Panel Mount Terminal 18 3 4 Interfaces 19 3 4 1 EIA 232 Interface 19 3 4 2 EIA 422 Interface 19 3 4 3 EIA 485 Interface 20 3 5 LCD Display 21 3 6 Keypad 21 3 7 Other Options 21 3 7 1 Speaker Opt...

Страница 9: ...Web www qsicorp com Phone 801 466 8770 E 3 6 Cancel 31 E 4 Advanced Features 32 E 4 1 Port State 32 E 4 2 Send to R55 32 E 4 3 Clear Box 32 E 4 4 Preprocessor Settings 32 E 5 Preprocessor Directives...

Страница 10: ...vi QTERM User s Manual QSI Corporation Fax 801 466 8792 Web www qsicorp com Phone 801 466 8770...

Страница 11: ...ting program file may be replaced with another one through the Power On Setup routines Alterna tively when a program ends normally or due to an error the QTERM R55 will enter download mode To enter th...

Страница 12: ...QTERM R55 was not purchased with the Real Time Clock option Clock will not be displayed on the main POS menu The Defaults menu restores all settings including contrast baud rate and data format to th...

Страница 13: ...round lines Connect your DC power supply to the appropriate two pins WARNING Power supplied to the QTERM R55 must be from a SELV power source and should have a current limit on its output of 5 Amperes...

Страница 14: ...4 QTERM R55 User s Manual QSI Corporation Fax 801 466 8792 Web www qsicorp com Phone 801 466 8770...

Страница 15: ...lic License The QTERM R55 also uses uC OS the Real Time Kernel by Jean Labrosse 2 1 Syntax 2 1 1 Case Commands can be entered in any case input is the same as INPUT and even as InPUt This applies to e...

Страница 16: ...g the Screen section 2 9 The default output destination is the display This com mand may also be used to send output to a serial port or the non volatile file store See Serial Communication section 2...

Страница 17: ...2 print str 12 123455 08 5f print 2 val 23 print val e2 instr Hallo al lower aBcD12fG ltrim foo print asc e This program produces the following output 6 12 234 456 ab3456 12 12 12346 25 0 2 abcd12fg f...

Страница 18: ...stment of the output in the specified field width Number will be printed with a sign space If the first character does not con tain a sign a space will be added 0 Leading zeros will pad the field A de...

Страница 19: ...d Flow Control Example 4 input Please enter a number a if a 10 then print Hello print Your number is bigger than 10 else print Byebye print Your number is less or equal 10 endif This program produces...

Страница 20: ...s out of letters and digits The keyword label is required and the label itself should be unique within your program qaBASIC allows for line numbering This feature makes qaBASIC more compatible with tr...

Страница 21: ...maxnum read names a next a label loop input Please enter a number num num int num if num 1 and num maxnum then print num names num goto loop endif print Sorry can t convert num label names data 9 one...

Страница 22: ...or at 2 3 a 12345 a 4 send COM1 a send COM1 a a recv COM1 a recv COM1 print COM1 a a led 3 on led 4 off backlight on bell pause 10 This program produces the following output phrases in parentheses des...

Страница 23: ...ds 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 Comm...

Страница 24: ...is delayed in sec onds 2 8 12 Defining the Keyboard Input from the keyboard can be done in two ways The first method is to check periodically if there has been a key pressed by using the iskeypressed...

Страница 25: ...utoscroll autowrap and autoscroll are screen display com mands that allow the qaBASIC program to control how the display responds when printing and reaching the end of a line or the bottom of the scre...

Страница 26: ...command can only be used to write to a file if it has been opened for appending and the current file pointer loca tion is at the end of the file Note that the print and input commands automatically po...

Страница 27: ...ctors used on the QTERM R55 For reference Table 3 1 shows the pin assignments used by the COM ports on PC style computers for both DB25 and DB9 connectors 3 2 QTERM R55 Panel Mount Terminal The panel...

Страница 28: ...esigned so they can be attached before inserting the terminal into the panel Once the brackets have been installed the terminal is inserted into the panel and the brackets are slid outward Then the sc...

Страница 29: ...nes on the DB9 connector 3 4 2 EIA 422 Interface With proper cables and grounding the EIA 422 interface can communicate up to a distance of about 1 000 meters The EIA 422 version of the QTERM R55 uses...

Страница 30: ...tion 5VDC Out LowBAT 5VDC Out Ground Function BATSLP 2mm 1 2 3 4 5 Ground 5VDC Out 5 6 Ground Function 2mm 1 Rx 232 CTS 4 3 Tx 2 RTS 485 RTx RTx N C 8 32VDC In Ground Function Tx Tx Rx Rx 422 Ground R...

Страница 31: ...e has expired 3 If broadcast queries which require a response from multiple slaves must be sup ported the slaves should respond sequen tially or otherwise resolve the response traffic to avoid content...

Страница 32: ...mental and Power Specifications Parameter Limits Standard Backlit Display usable temperature range 10 to 60 C Wide temperature Display usable temperature range 20 to 70 C Storage temperature all compo...

Страница 33: ...CHART NUL blank SOH start of header STX start of text ETX end of text EOT end of transmission ENQ enquiry ACK acknowledge BEL bell BS backspace HT horizontal tab LF line feed VT vertical tab FF form f...

Страница 34: ...24 QTERM R55 User s Manual QSI Corporation Fax 801 466 8792 Web www qsicorp com Phone 801 466 8770...

Страница 35: ...56 possible character values Where a dot pattern is shown printing the corresponding code will cause the QTERM R55 to display the dot pattern at the current cursor location Numbers in circles refer to...

Страница 36: ...466 8770 Least Significant Digit hex HT CR F E D C B A 9 8 6 7 5 LF LF LF BS Most Significant Digit hex 3 4 2 1 0 3 0 1 2 4 5 6 A 7 8 9 B C D F E 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

Страница 37: ...e y power x string See Print Can be used in place of at Allows multiple commands to be placed on one line Placed after a print statement to prevent a carriage return and linefeed from being appended t...

Страница 38: ...l be run if the condition is false end Marks the end of program execution endif Marks the end of an if statement eof Used to determine if the end of a file has been reached error Used in an on error s...

Страница 39: ...not Returns the inverse of whatever is after it off Used in other commands to turn something off on Used in other commands to turn something on on x gosub Performs a gosub to the label in the variable...

Страница 40: ...e serial port shift Used in a keydef statement to define a shifted key string shiftstate Sets the current state of the shift key shutdown Allows battery powered terminals to be turned off by software...

Страница 41: ...If a file with a bin extension is entered the download type is automatically set to Firmware Upgrade If a file with a qbs or bas extension is selected the download type is automatically set to Applic...

Страница 42: ...this intermediate file if the terminal reports that an application has errors By default the inter mediate file is R55 tmp qbs and is stored in the directory which contains the application file To cha...

Отзывы: