The text of a manual · part 5 of 8
QTERM-II User's Manual: Chapter 3.
Pages 23 to 28 of 46, from QTERM-II User's Manual
The original document is the PDF (914 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the AST QTerm-II, QSI Corp QTerm-II and Beijer QTerm-II
Page 23
CHAPTER 3. USING THE QDATA FILE 3.1
QDATA Files
A QDATA file is used to configure your terminal. There are three reasons you may want to use a QDATA file:
• You want to change what keys send when they are pressed or design your own display characters (this must be done with the QDATA file). • You want to change some of the other defaults (such as beep length, tab settings, etc.). • You want to protect your development investment by modifying the terminal from its factory-default operation. If the third reason is important to you, be sure to consider modifying the <qdata retrieve mode> identifier, to ensure that your investment remains protected. With your terminal you will have received a disk (PCcompatible) with a variety of files. Two of these files are QDATA File
QSETUP.EXE
An ASCII (text) file that specifies values for all of the configurable parameters of the QTERM-II. A program which loads the QDATA file into the QTERM-II.
QTERM-II is already set up with default values for all parameters. You will modify only the parameters which you want to change from their default. Your QTERM-II is delivered with the default QDATA file already installed. You only need to modify the appropriate QDATA file and load it into the terminal if you want to change any of the default values. If not, you can skip this entire chapter. Note that all QTERM-II parameters can be modified using software commands (see Chapter 2), except for key strings and custom display characters! The only way to modify what a key sends when it is pressed, or to redefine the custom display characters, is by modifying the QDATA file and loading it into the QTERM-II using the QSETUP program.
3.2
Using QSETUP
Your distribution disk includes the QSETUP.EXE program, which is used to load the QDATA file into your QTERM-II. This program actually performs three tasks:
• load a QDATA file into the QTERM-II • retrieve a QDATA file from the QTERM-II • load the operation code file (QCODE file) into the QTERM-II
There are actually several versions of the QDATA file on the disk: QDATA24.V30
For 24-key terminals (version 3.0).
QDATA40.V30
For 40-key terminals (version 3.0).
QDATA24W.V30
For 24-key terminals with wide-temperature displays (version 3.0).
QDATA40W.V30
For 40-key terminals with wide-temperature displays (version 3.0).
You will only need to use the QDATA file that matches the hardware on your terminal. The QDATA file for your
To use QSETUP, you must use power-on setup to set the QTERM-II's baud rate and data format to 9600/8n1. These are the only settings that will work with QSETUP. You must also connect your terminal to your PC's COM port and supply power to it. If you do not have an EIA-232 terminal, you will need an interface unit. See Chapter 1 for more information. When you first run QSETUP, you will see an introductory screen that shows the version number. This version must match the version of the QDATA file you are going to load. See the Versions section below for more information.
Beijer Electronics • Fax 801-466-8792 • Web www.beijerelectronicsinc.com • Phone 801-466-8770
Page 24
18
QTERM-II User's Manual
The next screen will give you a choice of COM ports, if your PC has more than one. Select the port to which you have connected your terminal. 3.2.1
Loading a QDATA File
To load a QDATA file from disk into the QTERM-II, select the Load QDATA menu item. You will be asked for the file name. Enter the file name, along with the extension, then press the Enter key. QSETUP will now open the specified file, scan it for errors, and, if none are found, load it into the QTERM-II. This will take about 10 seconds. If any errors are found, QSETUP will display an error message indicating the problem. Use your editor to fix the problem, then try to load it again. 3.2.2
Loading a QCODE File
Also included on your distribution disk is a file called QCODE.V30. This is the actually microprocessor code for running the QTERM-II. If the code in the QTERM-II somehow gets corrupted, you can load this file into the terminal to get it running again. If you suspect your terminal has corrupted code, call Beijer Electronics for technical assistance in reloading the QCODE file. 3.2.3
Retrieving a QDATA File
If you select the third menu item on the QSETUP menu screen, you will be asked for a file name into which QSETUP will put the retrieved QDATA information. Specify a file name that does not exist. QSETUP will retrieve the QDATA information from your terminal and put it into a disk file. This file is similar to the default files supplied with your terminal, except for two changes:
• The retrieved file will have no comments in it. • The retrieved file will have exactly one identifier per line, so it will have many more lines than the default QDATA file (which puts several identifiers on one line in the key sections). Since neither of these affects the parameter content of the retrieved QDATA file, this retrieved file can be downloaded into any QTERM-II without modification.
3.3
Basic QDATA File Concepts
Identifiers. The QDATA file contains "identifiers" used by QSETUP to determine how to configure the QTERM-II. These identifiers appear in two formats: [....] and <....> The most important rule about editing the QDATA file is NEVER DELETE OR EDIT ANY OF THE IDENTIFIERS, AND NEVER CHANGE THEIR ORDER! You will edit the values assigned to the identifiers, but you may not edit the identifiers, delete the identifiers or change the order in which they appear. Versions. You must use the same version of the QDATA file and the QSETUP program as the version of code in your QTERM-II.
• Your QDATA version is noted in the file name extension (i.e. QDATA40.V30 is version 3.0) and is the first identifier in the QDATA file. • The QSETUP version is displayed on the first screen when you start the QSETUP program. • The version of software in your QTERM-II is displayed if you hold down any key and apply power. If you find that you have different QDATA, QSETUP and QTERM-II code versions, contact Beijer Electronics for updated software and instructions. Do not attempt to use different versions of these items together; you will probably corrupt the QTERM-II operational code. QDATA File Size. The QDATA file which you edit can be as large as you want. When QSETUP sends the QDATA information to the QTERM-II, it only sends actual parameters and key strings. The maximum amount of information from the QDATA file which can be stored by the QTERM-II is about 1000 bytes. The default QDATA files generate about 270 bytes of information, so you can add about 730 bytes of data to keystrings before you exceed the 1000 byte limit. QSETUP will tell you if there is too much data to be stored by the QTERM-II. ASCII Editor. You may use any editor to modify the QDATA configuration file, but the output from the editor must be in ASCII format, without any embedded codes. Included on your QTERM-II distribution disk is the TED3 editor (TED3.COM), which you can use to edit the
Beijer Electronics • Fax 801-466-8792 • Web www.beijerelectronicsinc.com • Phone 801-466-8770
Page 25
QTERM-II User's Manual QDATA file. The file TED3.DOC provided documentation for the editor and its commands. Uppercase/Lowercase. For keywords (such as "on" or "off"), case does not matter; i.e. "ON" is the same keyword as "on." For quoted text strings, (used for key strings), the string is assigned exactly as shown in the QDATA file. Comments. Comments may be added to the file as desired. A comment starts with a semicolon and ends at the end of a line (at the carriage return). Whitespace. Whitespace may be added to the file as desired. This means you can add spaces, tabs, carriage returns and line feeds anywhere you would like. The only exceptions are that you cannot split a keyword (such as "off") or identifier (such as [shift mode]) with whitespace, and that in quoted text strings (which are assigned to keys), anything within the quotes will be assigned to the key.
19 stants start with the letter 'x'. Decimal and hexadecimal constants are equivalent; use whichever one is easier at any time. 3.4.2
Key String Section
This is the last section of the file, and follows the parameter section. The format for the identifiers for each key is <k#*> <sk#*> <kr#* <skr#*>
- unshifted key strings - shifted key strings - unshifted key release strings - shifted key release strings where: # = row (top = row 0) * = column (right = column 0) Examples of this notation:
Since you can add and remove carriage returns, you can place each identifier on a separate line, or you can have several identifiers on one line, as long as the order in which they appear is not changed.
3.4
Parameter and Key String Sections
The QDATA file has two sections: the parameter section at the top, followed by the key string section at the bottom. The types of values you can assign to the identifiers is different in each section. 3.4.1
Parameter Section
In the parameter section, you will assign one of two items to each identifier:
• keywords (on, off, replace, df8n1) • numbers (13, x1F) Keywords. For every identifier to which you assign a keyword, the keywords which are permissible are listed in a comment following the identifier. The keyword you choose must be one of those listed in the comment. Never use quotes with keywords. Numbers. For identifiers that accept numbers rather than keywords, the number can be specified in one of two ways:
• decimal numbers (49, 27) • hexadecimal numbers (x0D, x8C) These numbers are always positive integer numbers within the range specified by the comments. Hexadecimal con-
<k21> is for unshifted key string for row 2 and column 1
<skr32> is for shifted key release string for row 3 and column 2. Since the QTERM-II electronics can support up to eight rows and six columns of keys, there are identifiers for 48 unshifted and 48 shifted key strings, as well as identifiers for 48 unshifted and 48 shifted key release strings. All of these must remain in the file; however, you will have no reason to assign key strings to keys that do not exist on your keypad. In the key string section the type of values you can assign to a key are
• strings enclosed in single quotes ('abcde') • decimal numbers (49, 27) • hexadecimal numbers (x0D, x8C) • keywords (\l1on, \d0off) • a combination of the above, separated by commas Strings. Text strings can contain any printable ASCII characters and are enclosed in single quotes. If you need to include a single quote in your text string, terminate the string and specify the ASCII value as a number (x27 hexadecimal or 29 decimal). Numbers. Numbers are always positive integer numbers within the range 0 to 255. Hexadecimal numbers start with the letter 'x'. Decimal and hexadecimal numbers are equivalent; use whichever one is easier at any time.
Beijer Electronics • Fax 801-466-8792 • Web www.beijerelectronicsinc.com • Phone 801-466-8770
Page 26
20
QTERM-II User's Manual Table 3-1: Valid Key String Keywords.
Keywords. Keywords in key string assignments serve two purposes: inserting pauses (delays) in the transmission of a key string and controlling LEDs and digital outputs. A complete list of valid keywords is shown in Table 3-1.
Keywords
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 keywords to control the keypad LEDs and to pause (see Table 3-1). 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',\l1on ; send string, turn L1 on <sk32> 'Turn 2 on',\l2on ; send string, turn L2 on <kr32> 'Turn 1 off',\l1off ; send string, turn L1 off <skr32> 'Turn 2 off',\p,10,\l2off ; send string, pause ½-second, turn L2 off The final example shows how to combine strings, numbers and keywords on one key string assignment. Note the splitting the key assignment onto multiple lines (as done here) is perfectly acceptable. <k62> 'Pause here ',\p,10,'then turn dig0 on ', \d0on,'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. Each keyword requires two bytes.
Purpose
\10on \11on \12on \13on \14on \15on
\10off \11off \12off \13off \14off \15off control LED0 (shift) control LED1 control LED2 control LED3 control LED4 control LED5
\d0on \d1on
\d0off \d1off control dig0 control dig1 insert pause (nnn = 50 ms ticks)
\p,nnn
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, numbers and keywords) by a comma, as shown in the examples above.
3.5
Custom Display Characters
The QTERM-II is capable of displaying eight user-defined characters. Each of these characters consists of an eight row by five column dot matrix, where you specify which of the dots are on or off. You also define what code will cause the character to be displayed by the QTERM-II. You may choose any 8-bit value (code) from 00h through FFh, except values from 07h through 1Bh (see Appendix B for a chart of this). This allows you to redefine up to eight of the standard ASCII character bit patterns. For example, you could redefine the hex value x62, which normally displays a 'b', to display a small box (G). Each custom character is defined in the QDATA file as a string of eight byte values, where each byte specifies the dot pattern for one row of dots. For each byte, the upper three bits are set to 0 and the lower five bits correspond to the five dots on the row. If a bit is set to 1, the dot will be dark (on); if the bit is set to 0, the dot will be light (off). As an example, Figure 3-1 shows the default dot pattern of custom character 6, which is a little humanoid figure. From this dot pattern, the following bit assignments are derived: Row
7
6
5
4
3
2
1
0
Beijer Electronics • Fax 801-466-8792 • Web www.beijerelectronicsinc.com • Phone 801-466-8770
Hex
Page 27
QTERM-II User's Manual 1 2 3 4 5 6 7 8
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 1 1 0 1 1
1 1 0 1 0 0 1 0
21 1 1 1 1 1 1 1 0
1 1 0 1 0 0 1 0
0 0 0 1 1 0 1 1
0E 0E 04 1F 15 04 1F 11
As you can see in your default QDATA file, the hexadecimal values listed in the right column above are the values which are used to define the custom character. This particular dot patter is assigned to the ASCII character x06 in the default QDATA file. Default dot patterns and character assignments for all eight custom characters are shown in the chart in Appendix B.
Figure 3-1. Example Custom Character.
Beijer Electronics • Fax 801-466-8792 • Web www.beijerelectronicsinc.com • Phone 801-466-8770
Page 28
22
QTERM-II User's Manual
Beijer Electronics • Fax 801-466-8792 • Web www.beijerelectronicsinc.com • Phone 801-466-8770