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

QTERM-R55 User's Manual

15

QSI Corporation   Fax 801-466-8792   Web www.qsicorp.com   Phone 801-466-8770

Key release events can be enabled with the 

keyrelease 

on

 command. The 

keyrelease off

 command disables 

them. The default is disabled.

2.8.13

Shift State

The state of the shift key (on or off) may be altered with the 

shiftstate 

commands:

shiftstate on

shiftstate off

The shift state is toggled automatically when the shift key is 
pressed (See Figure 2-1). When the shift state is on, the 
shifted key definition is used to determine the key input 
(seeDefining the Keyboard (section 2.8.12).

2.9

Printing and Controlling the Screen

2.9.1

Printing Output

Printing output at specific locations is helpful for interac-
tive programs.

Example 11:

clear screen

print at(4,0) "1 -- Setup"

print at(4,1) "2 -- Save"

print at(4,2) "3 -- Quit"

input at(0,3) "Your choice: " a$

This program produces a screen resembling the following 
layout:

1 -- Setup

2 -- Save

3 -- Quit

Your choice:

The 

clear screen

 command erases the screen. 

The 

at()

 clause in print or input statements allows you to 

move to any location (specified by the two arguments of the 

at()

 clause) on your screen. This is illustrated by Exam-

ple 8. Note that 

at()

 can be written as 

@()

 also, and that 

the row and column addresses are zero-based (i.e. the first 
row is row 0, etc.).

2.9.2

Autowrap and Autoscroll

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 screen. If the autowrap is on when 
the cursor reaches the end of the screen, then the cursor will 
be placed at the beginning of the next line (unless the line is 
the bottom line and autoscroll is off, in which case the cur-
sor will be placed at the beginning of the bottom line). If 
autoscroll is on when the cursor reaches the bottom line of 
the display and receives a newline character, it will scroll 
the screen up (leaving the cursor in the same horizontal 
position).

The following syntax is used for autowrap and autoscroll 
statements.

autowrap on

 

autowrap off

 

autoscroll on

 

autoscroll off

2.10

Nonvolatile Storage of Data

The following commands were added to allow for a limited 
“file system.” Although one may read and append, a file 
can’t be overwritten because of the nature of flash memory. 
The entire file space must be erased in order to rewrite a 
file. The command to erase is given as a system command 
(described below). Up to nine files may be used for storage 
of data.

open #<1-9> [, “r” or “a”]

 opens a file for read-

ing (“r”) or appending (“a” -- append is default). Example:

open #1, “r”

1,1

2,1

3,1

4,1

5,1

1

2

3

Columns

Rows

4

5

1,2

2,2

3,2

4,2

5,2

1,3

2,3

3,3

4,3

5,3

1,4

2,4

3,4

4,4

5,4

1,5

2,5

3,5

4,5

5,5

1,6

2,6

3,6

4,6

5,6

1,7

2,7

3,7

4,7

5,7

1,8

1

2

3

4

5

6

7

8

2,8

3,8

4,8

5,8

Figure 2-2. Key Locations

Содержание 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...

Отзывы: