                                TOUCH2
                              Version 1.17
             A Communications Interface Application for the
        LifeScan One Touch(R) II Blood Glucose Monitoring System *

        Copyright (c) 1994, Victor A. Abell, West Lafayette, Indiana
                        47907.  All rights reserved.


                            Victor A. Abell
                            1715 Summit Drive
                            West Lafayette, IN 47906
                            (317) 463-6865
                            abe@cc.purdue.edu

This is version 1.17 of an application that provides a communications inter-
face to the data port of the LifeScan One Touch(R) Blood Glucose Monitoring
System meter.  The application gives access to almost all the features of the
meter that can be manipulated via its data port -- excluded is support for
functions that would disable communications between the application and the
meter.  It provides limited data analysis -- an option that includes maximum,
mean, minimum and standard deviation for check solution, check strip, meter
error, and normal readings, plus a line graph of the normal readings.  It
supports methods are for selecting which records will be graphed. It processes
meter data in the mg/dl or mmol/l scale.

*    One Touch is a registered trademark of LifeScan, Inc.


Contents
--------

        1.0  Application requirements
             1.1  One Touch(R) II Meter Protocol and Cabling
             1.2  MS Windows Caution
             1.3  Using Other COM Ports
             1.4  Using Cables Made by Other Companies
        
        2.0  Documentation
             2.1  Preparation
             2.2  Quick Start
        
        3.0  Customization
             3.1  Configuration File Directives
             3.2  Colors
             3.3  Configuration File Examples
        
        4.0  Error Handling and Meter Communications Problems
             4.1  Checksum Verification
             4.2  Meter Error Records
             4.3  The Transmit DSR Problem
        
        5.0  Selecting Dump Records for Graphing
             5.1  Event Filters
             5.2  Ignoring Events
             5.3  Time Range Selection Filters
             5.4  Record Skipping Filters
             5.5  Reversing Dump Record Order
        
        6.0  Saving and Reusing Dumps
        
        7.0  Graphing
             7.1  Graph Lines
             7.2  Graph Printing
             7.3  Graph Characters
             7.4  Graph Title
             7.5  Graph Title Variables
             7.6  Storing the Graph Title in a Dump File
             7.7  Multiple Title Management
        
        8.0  Defining Strings
        
        9.0  The TOUCH2 Call
        
        Warranty
        
        Comments


1.0  Application requirements
-----------------------------

An IBM compatible PC with: CGA Monitor (VGA required for graphing)**
                           COM (serial) port
                           128K memory
                           DOS 5.0 or 6.0 ***
A LifeScan One Touch(R) II meter
A LifeScan data port cable ****

**   If you don't have a VGA adapter, while you can't view a graph, you
     can print it.  See the Graph Printing section for information.

***  The application has been tested under DOS 5.0, 6.0, and 6.2 but it
     may work under earlier versions.

**** You can obtain a data cable from LifeScan by calling:

                U.S.A:  1 800 227-8862
                Canada: 1 800 663-5521

    Depending on the RS-232 connector leading from your PC's serial COM
    port, you may need a 9 pin (female) to 25 pin (male) adapter, since the
    LifeScan cable has a DB-25 female connector.  A DB-9 to DB-25 adapter is
    available from Radio Shack for about $5.


1.1  One Touch(R) II Meter Protocol and Cabling
-----------------------------------------------

There is a five page memo from LifeScan on the RS-232 protocol and cabling
of the One Touch(R) II meter in file lifescan.ot2 of this distribution that
may also help you set up the connection between your PC and meter.


1.2  MS Windows Caution
-----------------------

Some people have reported problems when trying to run TOUCH2 under Windows
in a DOS window.  Since TOUCH2's communication module was updated at version
1.15, this may no longer be true.  However, it is still possible that TOUCH2
won't run under a Windows DOS window, because of COM port management conflicts
with Windows or Windows CPU scheduling and pre-emption.  You'll have to try
this for yourself to see what happens on your PC.  The safest procedure is to
run TOUCH2 from a DOS prompt.


1.3  Using Other COM Ports
--------------------------

As of version 1.15 the TOUCH2 communications module supports the use of the
COM3 and COM4 ports.  However, COM3 and COM4 support is not nearly as simple
as support for COM1 and COM2, so please read this section before you try to
use COM3 or COM4.

The COM1 and COM2 ports can usually be accessed without any special effort.
Their definitions are standard to the IBM PC, and most PC BIOS programs
support them with standard conventions.  Thus, all you need to do to use one
of them is specify its port number (the number after the COM).

Dealing with the alternate COM ports, 3 (COM3) and 4 (COM4), however, is much
different.  They are not part of the original IBM PC standard and their BIOS
support varies widely.  It is often not sufficient to tell a program that can
use them, like TOUCH2, only the port number.

TOUCH2 may need to know two other pieces of information when you want it to
use COM3 or COM4.  First, it may need to know the address in PC memory where
the port's registers may be found.  This is often called the port address.
When the PC BIOS fully supports COM3 and COM4, TOUCH2 is able to locate the
port address in PC memory automatically.  This is not always the case, so you
may have to tell TOUCH2 the port address.  You'll know that TOUCH2 can't
discover the port address if it issues the message "COMn is not available."
when you ask it to access your meter.

Second, TOUCH2 may need to know the interrupt request level (IRQ) that
serves the COM3 or COM4 port.  While there are more-or-less standard defaults
for the IRQ for COM3 (IRQ4) and COM4 (IRQ3), they are not always served by
them -- e.g., when you have a PC with a number of hardware input and output
devices competing for IRQs.

So, if you want to use COM3 or COM4 with TOUCH2, you may have to consult
your PC and serial card documentation to discover appropriate port address
and IRQ information for the COM port you want to use.  Sometimes you can get
this information from the configuration display that your PC's BIOS provides
during the boot operation.  There are a number of PC configuration and
diagnostic programs that can discover the information to you; as examples,
consider CheckIt, MSD from your Windows directory, QAPLUS, or SI from PC
Tools.

Once you know the special parameters of your COM3 or COM4 port, you can
specify them to TOUCH2 in two ways: 1) through TOUCH2's Communications menu;
or 2) via the configuration file "comport" or "port" directives.

To use the Communications menu, start TOUCH2 and select the Communications
menu by pressing the `C' or `c' key.  The port address may be entered from
that menu with the `A' or `a' selection.  You must specify the port address
in hexadecimal (base 16), entering no more than four digits.  When you first
see the menu it will show the default address for the current port from
segment 0x40 of low PC memory, where the BIOS usually stores it at boot time.
If the address in segment 0x40 is zero, "(none)" will be displayed, and you
must enter a port address.

The `I' or `i' key, entered to the Communications menu, selects one of four
possible IRQs -- 3, 4, 5, or 7.  These are the most logical choices for COM
port IRQ, and the ones that are least likely to cause serious interference
with other PC input and output devices, like your floppy or hard disk drives.
When you first see the menu, it will show default IRQ for the current port,
based on the standard PC COM port IRQ allocation: IRQ4 for COM1 and COM3;
IRQ3 for COM2 and COM4.

Both port address and IRQ may also be specified in the port directive of
the configuration file.  This method has the advantage that it is a
permanent record of the values for TOUCH2 to use each time you start it.
The syntax for the port directive is:

        port,<port_number>[,IRQ<IRQ_number>[,<port_address>]

(Items enclosed in `<' and `>' are values you supply; items enclosed in `['
and `]' are optional.)

As an example, assume you want TOUCH2 to use COM3.  Your BIOS doesn't record
a port address  in PC memory, but you know the address is 3E8.  You have a
well-endowed PC with many input and output devices, so you have had to assign
IRQ5 to COM3.  The port directive for this combination would be:

        port=3,IRQ5,3E8

Here are the standard port addresses for the four COM ports:

        COM1    3f8
        COM2    2f8
        COM3    3e8
        COM4    2e8

It's usually pretty safe to assume that COM1 and COM2 use the standard port
addresses.  It's not safe to assume that for COM3.  It all depends on your
BIOS.  Let me give you an example of what happened on my PC when I tried to
enable COM4 via the jumpers on my first serial card.  (I have a second serial
card that provides COM2, while COM1 comes from my first serial card.)

I changed some jumpers on my first serial card to enable COM4 on IRQ5 and
rebooted.  During boot the AMI BIOS reported that I had serial ports on COM1,
COM2, and COM3.  It reported that the port address for COM3 was 2e8 (That's
the one for COM4!).

Here's what happened: because I didn't have a COM3, and even though I told
my serial board that I wanted to enable COM4, the AMI BIOS "promoted" COM4
to COM3 (presumably to avoid a gap between COM2 and COM4), but leaving the
port address as the standard one for COM4 -- 2e8.  (Confusing, isn't it?)

So, to use TOUCH2 with my COM4, "promoted" to COM3, I went from the main
TOUCH2 menu to the Communications menu (`C'), selected port 3 (`C'), changed
the IRQ to 5 (`I'), and entered a port address of 2e8 (`A').  I could have
used this configuration file directive as well: 

        port=3,IRQ5,2e8

For a further description of the complexities and confusion surrounding COM3
and COM4 on the PC, consult the extract from the MSKermit documentation that
I've included in this distribution in the file kermit.bwr.  Frank da Cruz
and Joe Doupnik have done a marvelous job demystifying the subject.
(MSKermit is available via anonymous ftp from kermit.columbia.edu.)


1.4  Using Cables Made by Other Companies
-----------------------------------------

Companies other than LifeScan now manufacture cables for the One Touch(R)
II meter.  One such cable is distributed in Germany by a company named CE
Plus GmbH.  The CE Plus cable works, but isn't completely compatible with
the LifeScan cable.
 
In particular, the CE Plus cable doesn't supply the Data Set Ready (DSR)
signal as does the LifeScan cable.  Since TOUCH2 was developed using the
LifeScan cable, TOUCH2 waits for DSR before transmitting commands to the
meter.  When it doesn't sense DSR after a wait of ten seconds, TOUCH2
fails and reports a "COMn send timeout error" message.

As of version 1.17 TOUCH2 can be directed to avoid its DSR wait with the
`D' option on the communications menu, the "-D" option on the TOUCH2 call,
or the "DSRwait" configuration file directive.

If you have a non-LifeScan cable and it has differences other than a missing
DSR signal, please contact me.

See The Transmit DSR Problem section for more information.


2.0  Documentation
------------------

The TOUCH2 application is driven by simple, character-based menus and is
intended to be self-explanatory.  Thus, there is no additional documenta-
tion beyond this 00README file.


2.1  Preparation
----------------

To use TOUCH2 the only preparation you must make is setting the data port
parameters of your meter.  Follow the instructions in your One TOUCH(R)
II manual, particularly the chart on pp. 58, 59 (in my manual, at least.)
You should set your meter to RS-232 mode and 9600 baud.

If you have communications problems, you may need to change to a lower baud
rate, e.g., 2400.  See the Checksum Verification section of this file for
more information on problems related to baud rate.


2.2  Quick Start
----------------

Set your meter's Data Management mode to RS-232 and its Baud Rate Mode to
9600.  Connect your meter to the cable and connect the cable to the COM port
on your PC.  Look at the file TOUCH2.CF, supplied with the distribution, to
see if it defines the proper COM port:

        COM1:   port=1
or
        COM2:   port=2

Edit the port number to match the COM port into which you plugged the meter
cable.  Don't worry about the other lines in TOUCH2.CF -- they probably
won't affect your first use of the program.  If you do worry, you'll find
explanations of them in the Customization section.

Execute TOUCH2:

        C:> TOUCH2

Follow the menus.  Turn on your meter when you want to access it from one
of TOUCH2's menus -- inspect/change Communications parameters, Dump memory,
inspect/display meter Status, read/set date and Time, or Zero the meter
datalog (be careful with this one!).

The thing you will probably want to do first is to examine your meter's
datalog contents.  After your meter is cabled to your PC, turn it on and
select the Dump menu from the main menu with `D'.  Then select `S' to dump
your meter's datalog records to a screen display.

There should be a short delay while "Waiting on meter" is displayed on your
screen; then a line will be displayed of the form "Record <xxx> read.", where
<xxx> is a three digit number that increases by one as each record is read
from the meter.

If you get stuck at "Waiting on meter," TOUCH2 isn't hearing the "INSERT
STRIP" message that should be flashing on the meter's screen.  Make sure
you've specified the right COM port.  Make sure your meter is set to 9600
baud and RS-232 mode and is connected to the COM port with the LifeScan
cable.  Make sure the 1/8" connector on the cable is fully seated in the
jack on the meter's side.

If you still can't get TOUCH2 to work, try these things:

        *  Run TOUCH2 in debug mode.  You can invoke debug mode by starting
           TOUCH2 from DOS this way:
        
                c> TOUCH2 -d
        
           (Make sure the `d' in "-d" is lower case!).

           In debug mode TOUCH2 displays the characters it receives from the
           meter -- while the "Waiting on meter" and "Record <xxx> read."
           messages are being displayed -- starting at the upper left corner
           of the screen and filling all the screen except for the prompt line
           at the bottom.

           You should eventually see the meter's "INSERT STRIP" message, mixed
           in with other characters, like ^M  for CTRL-M.  If you don't, then
           TOUCH2 is not receiving data from your meter.

        *  Try using a terminal emulator or communications program -- Kermit,
           ProComm, etc. -- to see if these programs can receive data from
           your meter.
        
        *  As a last resort, contact me via e-mail.

When all the records have been read from the meter, they will be displayed --
the result of your earlier `S' selection.  If the display looks OK, you might
want to dump the records you read from your meter to a file by selecting `F',
or graph them by selecting `G'.  You'll notice that the Dump menu options
have changed to reflect the existence of the dump records in TOUCH2's memory.
(You can erase them by selecting the `E' option on the Dump menu.)


3.0  Customization
------------------

The TOUCH2 application will customize itself from default values, from
directives it finds in a configuration file, or from options on its call.
The default configuration file is TOUCH2.CF in the current directory, but
you may specify an alternate path to the configuration file in the TOUCH2
environment variable.

For example, if you want to use this feature, and you want to store the
configuration file in the root directory of your C: disk in the file
TOUCH2.CF, use the DOS command:

                SET TOUCH2=C:\TOUCH2.CF

You may want to put this in your AUTOEXEC.BAT file.  No particular name
is required for the configuration file; TOUCH2.CF is just an example.

If you always use TOUCH2 from the same directory, putting a TOUCH2.CF file in
that directory is sufficient.  Then you don't need to define the TOUCH2
environment variable.

After you have identified the configuration file, you must create it, using
your favorite text editor.  It must contain text lines of the form:

                        <keyword>=<value>

Empty lines and lines that begin with a pound sign (`#') -- comments -- are
ignored.  Case is not significant.  Keywords and values may be specified in
upper, lower or mixed case.  There may be spaces around the equal sign
separator (`=') -- they will be ignored.  Spaces after <value> are assumed
to be part of it.


3.1  Configuration File Directives
----------------------------------

TOUCH2 recognizes the following configuration file keywords and their
shorthand forms.   It also recognizes any partial keyword that is singular --
e.g., "bau" for "baudrate", but not "ba", since both "baudrate" and
"background" begin with "ba".  The default values are used in the absence
of a configuration file specification.

        Keyword         Value           Significance
        -------         -----           ------------

        aftergraph      <string>        Set the printer control string to be
                                        issued at the end of the graph print
                                        file to <string>.  Usually <string>
                                        contains a form feed ASCII character
                                        (Ctrl-L or ^L) and other codes needed
                                        to reset the printer to its default
                                        state.  If this string is not defined,
                                        TOUCH2 assigns it and the "beforegraph"
                                        strings to the values for the default
                                        printer type, EPSON.

                                        See the Graph Printing section for
                                        more information.

                                        See the Defining Strings section for
                                        information on how to build a string
                                        that defines characters.

                                        The "aftergraph" string may also be
                                        set with the "-a <string>" option on
                                        the TOUCH2 call line.

        ag                              Shorthand for "aftergraph".

        bar             <string>        Define the character to be used on the
                                        printed graph for the bar line.

                                        The default is the IBM printer
                                        character with the hexadecimal value
                                        cd (a double horizontal line). 

                                        See the Defining Strings section for
                                        information on how to build a string
                                        that defines a character.

                                        The "bar" character may also be set
                                        with the "-b <char>" option on the
                                        TOUCH2 call line.

        baudrate        300, 1200       Set the data port baud rate to one of
                        2400 or 9600    these four values.  The default is
                                        9600.

        br                              Shorthand for "baudrate"

        background      COLOR           Set the background color to the COLOR
                                        value.  The default is BLUE.

                                        See the Colors section for information
                                        on color choices.

        bk                              Shorthand for "background"

        beforegraph     <string>        Set the printer control string to be
                                        issued at the beginning of the graph
                                        print file to <string>.  Usually
                                        <string> contains printer control codes
                                        to define 8 lines/inch spacing.  If the
                                        "aftergraph" string is not defined,
                                        TOUCH2 assigns it and the "beforegraph"
                                        strings to the values for the default
                                        printer type, EPSON.

                                        See the Graph Printing section for
                                        more information.

                                        See the Defining Strings section for
                                        information on how to build a string
                                        that defines characters.

                                        The "beforegraph" string may also be
                                        set with the "-B <string>" option on
                                        the TOUCH2 call line.

        checksum        on or off       Turn dump record checksum verification
                                        on or off.  The default is on.

                                        See the Checksum Verification section
                                        for an explanation of checksums and
                                        checksum verification handling.

                                        The checksum verification mode may
                                        also be turned off with the "-C"
                                        option on the TOUCH2 call line.

        cksum                           Shorthand for "checksum"

        comport         n,IRQm,addr     set the serial communications port
                                        number to n, where n is 1, 2, 3, or
                                        4.  The default is 1.  The remaining
                                        two fields, "IRQm" and "addr" are
                                        optional.

                                        If your COM port is served by a non-
                                        standard IRQ, add the comma, the
                                        string "IRQ" and the IRQ number, m.
                                        The defaults are: IRQ4 for COM1 and
                                        COM3; IRQ3 for COM2 and COM4.

                                        If your PC supports the COM port from
                                        a non-standard PC memory port address,
                                        add the comma and the port address in
                                        hexadecimal notation.  The port
                                        address defaults to the values that
                                        TOUCH2 finds in segment 0x40 of PC
                                        memory.  Usually they are: 3f8 for
                                        COM1; 2f8 for COM2; 3e8 for COM3; and
                                        2e8 for COM4.

                                        See the Using Ports Other Than COM1
                                        and COM2 section for more information.

        port                            Shorthand for "comport"

        DSRwait         on or off       Enable ("on") or disable ("off") the
                                        waiting for Data Set Ready (DSR) when
                                        transmitting to the meter.  The default
                                        is "on".

                                        See the The Transmit DSR Problem
                                        section for more information.

        dump            <format>        Set the dump format to raw or
                                        QuattroPro.

                                        The raw dump format matches the meter
                                        dump format.  There is a header line,
                                        all values are dumped, and all values
                                        are enclosed in quotation marks.
                                        
                                        The QuattroPro dump format contains no
                                        header line and only date, time and
                                        meter reading values.  The values are
                                        separated by commas, but are not
                                        enclosed in quotation marks.

                                        The default dump format is raw, but the
                                        "-r" option on the TOUCH2 call may be
                                        used to deselect raw format and select
                                        QuattroPro.

        event           <n>,<title>     Define a filter for event <n> with
                                        <title> for its title.  See the Event
                                        Filters section for more information
                                        on event filtering.

        framesize       7 or 8          Set the data port frame size to 7 or 8.
                                        The default is 8.

        gmax            <number>        Set the y coordinate value of the
                                        maximum level line on the graph to
                                        <number>.  The maximum level line
                                        provides a visual reference for
                                        maximum acceptable glucose readings.

                                        The default is 110 mg/dl or 6.1 mmol/l.

                                        The maximum level value may also be
                                        set with the "-G <max>" option on
                                        the TOUCH2 call line.

        gmin            <number>        Set the y coordinate value of the
                                        minimum level line on the graph to
                                        <number>.  The minimum level line
                                        provides a visual reference for
                                        minimum acceptable glucose readings.

                                        The default is 70 mg/dl or 3.9 mmol/l.

                                        The minimum level value may also be
                                        set with the "-g <min>" option on
                                        the TOUCH2 call line.

        graphname       <path>          Set the default graph file path to
                                        <path>.  The default is TOUCH2.GRF.

        graphtitle      <title>         Set the graph title line to <title>.
                                        <title> may contain no more than 66
                                        characters.

                                        The graph title line may be set with
                                        the "-t <ttl>" option on the TOUCH2
                                        call line and with the Title option
                                        on the dump menu.

                                        The graph title line normally follows
                                        a page number in the graph output file.
                                        The page number may be suppressed using
                                        the "-P" option on the TOUCH2 call
                                        line, "pcd=off", or "pgctdisp=off".

                                        See the Graph Title and Graph Title
                                        Variables sections for more information
                                        on the graph title line.  See also the
                                        "titlevar" configuration file
                                        directive.

        gttl                            Shorthand for "graphtitle"

        ignore          <string>        Define the list of event numbers whose
                                        associated dump records are to be
                                        ignored when graphing.  The numbers
                                        may be the integer digits 0 through 9,
                                        separated by spaces, commas, or without
                                        separators. See the Ignoring Events
                                        section for more information.

        intersection    <string>        Define the character to be used on the
                                        printed graph at the intersection of
                                        the bar and the maximum/minimum level
                                        lines.

                                        The default is the IBM printer
                                        character with the hexadecimal value
                                        d8 (a single vertical line intersecting
                                        a double horizontal line).

                                        See the Defining Strings section for
                                        information on how to build a string
                                        that defines a character.

                                        The "intersection" character may also
                                        be set with the "-i <char>" option on
                                        the TOUCH2 call line.
        
        ic                              Shorthand for "intersection"

        line            <string>        Define the character to be used on the
                                        displayed and printed graphs for the
                                        maximum/minimum level lines.

                                        The default is the IBM printer
                                        character with the hexadecimal value
                                        b3 (a single vertical line).

                                        See the Defining Strings section for
                                        information on how to build a string
                                        that defines a character.

                                        The "line" character may also be set
                                        with the "-l <char>" option on the
                                        TOUCH2 call line.

        lpp             <number>        Set the number of lines per page on the
                                        printed graph to <number>.  The default
                                        is 81, assuming printing at 8 lines per
                                        inch.  The minimum is 11.

                                        See the Graph Printing section for more
                                        information.

                                        The "lpp" value may also be set with
                                        the "-L <num>" option on the TOUCH2
                                        call line.

        parity          none, even      Set the data port parity to none, even
                        or odd          or odd.  The default is none.

        pgctdisp        on or off       Set the display of the page count in
                                        the graph file output on or off.  The
                                        default is on.  The "-P" option on the
                                        TOUCH2 call line may also be used to
                                        turn off the display of the page count.

        pcd                             Shorthand for "pgctdisp"

        printer         <name>          Set the printer type to <name>.  The
                                        legal values are EPSON, PCL4 and PPDS.
                                        The default is EPSON.

                                        Setting the printer sets default
                                        values for the "aftergraph" and
                                        "beforegraph" printer control strings.
                                        See the Graph Printing section for more
                                        information.

                                        The "printer" name may also be set
                                        with the "-p <name>" option on the
                                        TOUCH2 call line.

        promptbk        COLOR           Set the text prompt background color
                                        to COLOR.  The default is RED.

                                        See the Colors section for information
                                        on color choices.

                                        The prompt background color selection
                                        is ineffective when a graph is being
                                        displayed; the regular background color
                                        appears instead.  This is a limitation
                                        of VGA graphics mode.

        pbk                             Shorthand for "promptbk"

        prompttext      COLOR           Set the prompt text color to COLOR.
                                        The default is BRIGHT WHITE.

                                        See the Colors section for information
                                        on color choices.

        ptxt                            Shorthand for "prompttext"

        qdumpname       <path>          Set the default QuattroPro format dump
                                        file path to <path>.  The default is
                                        TOUCH2.CSV.

        range           <tm>,<ttl>      Set the times of the next available
                                        time selection to <tm> and the
                                        associated title to <ttl>.

                                        You may use one time range selection
                                        at a time to specify the dump records
                                        you want displayed in the graph output.

                                        See the Time Range Selection Filters
                                        section for more information on
                                        specifying time ranges for selecting
                                        records to be graphed.

                                        See the Skipping Records section for
                                        more information on specify records to
                                        be skipped when graphing.

        rdumpname       <path>          Set the default raw format dump file
                                        path to <path>.  The default is
                                        TOUCH2.DMP.

        rng                             Shorthand for "range"

        startstop       1 or 2          Set the data port start and stop bit
                                        count to 1 or 2.  The default is 1.

        stst                            Shorthand for "startstop"

        text            COLOR           Set the text color to COLOR.  The
                                        default is YELLOW.

                                        See the Colors section for information
                                        on color choices.

        titlevar        <n>,<val>       Set title variable n [0-9] to <val>.
                                        See the Graph Title and Graph Title
                                        Variables sections for more information
                                        on setting and using graph title line
                                        variables.

        ttlio           yes or no       Enable (yes) or disable (no) the
                                        reading or writing of the graph title
                                        from or to the dump file.

                                        Title reading and writing is enabled
                                        by default.

                                        See the Storing the Graph Title in a
                                        Dump File section for more information.

        tv                              Shorthand for "titlevar"

        warn            on or off       Enables (on) or disables (off) warnings
                                        about incompatible display modes when
                                        TOUCH2 begins execution.  The default
                                        is on.

                                        TOUCH2 works best when it can set the
                                        display mode to C80.  Other modes
                                        -- e.g., Hercules monochrome mode --
                                        may be adequate for some display
                                        operations, but may result in incorrect
                                        colors or other display variations.
                                        If TOUCH2 cannot put the display in
                                        C80 mode, it displays a warning screen
                                        when it begins execution.  This
                                        directive may be used to enable or
                                        disable the warning display.

                                        The display warning mode may also be
                                        disabled with the "-w" option on the
                                        TOUCH2 call line.


3.2  Colors
-----------

Color group 1 -- menu background, graph background, and text COLOR values
may be:

  BLACK   BLUE   GREEN   CYAN   RED   MAGENTA   BROWN   WHITE

Color group 2 -- graph background and text COLOR values may be:

  GRAY            LIGHT BLUE    LIGHT GREEN   LIGHT CYAN   LIGHT RED
  LIGHT MAGENTA   LIGHT BROWN   BRIGHT WHITE

Case is not significant: any of the above COLOR values may be specified in
lower (or even mixed) case.  The space between LIGHT or BRIGHT and the color
word is optional -- e.g., BRIGHT WHITE and BRIGHTWHITE are equivalent.

If a color from group 2 is specified as a menu or prompt background color,
TOUCH2 displays a warning screen, explaining that the color cannot be used as
a background for menus or prompts, and specifying how the color will be
converted to one from group 1 -- e.g., GRAY will be converted to BLACK, LIGHT
RED to RED, etc.  The menu background colors are limited to those from group
1, because TOUCH2 uses the C80 video display mode.  That mode allows 16 text
colors, but only 8 background colors.

TOUCH2 may also display a warning screen if it cannot set the display mode
to C80 -- e.g., you have a Hercules monochrome adapter.  While some display
operations may be correct, others, such a color generation, will not be.
Both warning screens may be disabled with the "warn=off" directive or the
"-w" option on the TOUCH2 call line.

TOUCH2 imposes another limitation on color choices when it draws a graph.
Since it uses the medium resolution VGA video mode to draw the graph, it
cannot display a separate background color for the prompt.  The regular
background color appears instead.  The graph background color may be chosen
from either group 1 or 2.


3.3  Configuration File Examples
--------------------------------

The following is a sample configuration file.  It sets the background color
to white; the text color to black; the prompt background to blue; the prompt
text to yellow; minimum (60 mg/dl) and maximum (150 mg/dl) level line values;
the graph title line to my name; the default dump file name to C:\MYDUMP; an
event code 9 filter with the title "Event 9"; one selection for the time
range 10 a.m. to 2 p.m. titled "Lunch Time"; and a specification that dump
records with an event number of 3 are not to be graphed.

#
# Sample TOUCH2 configuration file
#
bk=WHITE
qdump=C:\MYQPDMP.CSV
text=black
prompttext=yellow
PbK = bLuE
gmin=60
gmax=150
gttl=Victor A. Abell
event=9,Event 9
range=10am-2pm,Lunch Time
ignore=3

Note the use of the partial keyword "qdump", legitimate because no other
possible keyword begins with the same characters; the use of lower, upper
and mixed case; and the spaces around the equal sign.

Here is a sample configuration file for a monochrome, Zenith SuperSport
SX PC.  The color choices were selected to give the best contrast between
the prompt line and the text and graphics displays.

#
# Sample TOUCH2 configuration file for monochrome, Zenith SuperSport SX
#
bk=black
text=brightwhite
pbk=white
ptxt=brown


4.0  Error Handling and Meter Communications Problems
-----------------------------------------------------

This section explains how TOUCH2 hands errors when communicating with the
meter, and gives some hints about what you can do to counter the errors.


4.1  Checksum Verification
--------------------------

Data records dumped from the meter contain a checksum that TOUCH2 can
verify to insure that the records it has read match what the meter sent.
TOUCH2 computes a checksum for the header record and each data record from
the characters of the record and compares it with the checksum value in the
record that was computed by the meter when it sent the record.

If you get checksum verification error messages, you should check both ends
of the cable that connects your meter to your computer.  A bad connection
might cause some data record characters to be transmitted in error.

A less likely cause is that your computer's communication port is not fast
enough to keep up with the meter speed you have chosen.  This is most apt
to happen if you are using the 9600 baud rate.  You can try reducing the
baud rate via the meter's baud rate mode menu.  Once you have changed the
meter's baud rate, you must tell TOUCH2 about the change, using the
communications parameter change menu or the "baudrate" configuration file
directive.  (You can't use TOUCH2 to change the meter's baud rate, because
that would disable communications between TOUCH2 and the meter.)

Another possible cause is that you are running TOUCH2 in a DOS window under
MS Windows.  TOUCH2 may conflict with Windows over the management of the COM
port, or Windows CPU scheduling and pre-emption may interfere with TOUCH2.
If you have problems running TOUCH2 in a Windows DOS window, try exiting
Windows and running TOUCH2 from a DOS prompt.

Finally, it is possible that your meter or the special circuitry in the
meter cable is malfunctioning, or it is possible that TOUCH2 is not handling
checksums correctly.  Contact LifeScan if you suspect your meter or cable
is at fault; contact me if you think TOUCH2 is the villain.

When TOUCH2 encounters a checksum that can't be verified, it displays the
checksum it computed, the one it received, and the record for which
verification failed.  (Unprintable characters in the record are displayed
as question marks.)  What follows depends on the key you press.

        *  If you press the ESCape key, the dump operation will be aborted.
        
        *  If you press any key other than the ESCape key, TOUCH2 will accept
           the unverified record and continue.

Checksum verification may be disabled with the "-C" option on the TOUCH2
call line, or with the "checksum=off" and "cksum=off" configuration file
directives.


4.2  Meter Error Records
------------------------

The meter may occasionally determine that a reading is erroneous.  It will
mark such a reading with an asterisk on its display.  When error records
are dumped from the meter, their reading values are followed by a question
mark.

TOUCH2 displays error readings using the meter's asterisk display notation,
but stores them in a dump file with the meter's question mark notation.
TOUCH2 does not include error readings in the statistical summary, but does
display them on the graph.

TOUCH2 does not write meter error readings to QuattroPro dump files unless
you request they be written with the C option on the dump menu or the "-c"
option on the TOUCH2 call line.


4.3 The Transmit DSR Problem
----------------------------

Some cables for the TOUCH2, not manufactured by LifeScan, may cause TOUCH2
to complain when you try to use it to send commands to the meter.  When this
happens you will see the message:

        COMn send time out error

on your screen, shortly after the "Waiting on meter" message vanishes.  (`n'
is the COM port you are using.)

Since you normally will not receive this message until after TOUCH2 has
successfully received the "INSERT STRIP" message from the meter, it usually
means that TOUCH2 can receive from the meter, but can't send to it.

The reason this happens is that some non-LifeScan cables do not supply a
standard communications signal called Data Set Ready (DSR).  This signal
tells the program (TOUCH2 in this case), managing the communications device,
that the device is ready to accept characters.

In its default configuration TOUCH2 waits for the DSR signal.  It can be
told to stop waiting for DSR with the "-D" option on the TOUCH2 call, by
using the `D' option on the communications menu, or by specifying the
"DSRwait=off" configuration file directive.

If you encounter the "COMn send timeout error message," try using one of
these three alternatives to disable the DSR test.


5.0  Selecting Dump Records for Graphing
----------------------------------------

You can graph all the records you read from your meter or from a previously
created dump file.  You can also graph subsets of those records by their
event number or by their date and time fields.  The TOUCH2 methods for
selecting records are called filters.

The filters are applied in this order:

        1.  If any until-which date and time is defined, dump records
            are skipped until the until-which date and time is reached.
            All other filters are ignored.

        2.  If an after-which filter is defined and it has been
            reached, all subsequent dump records are skipped.  All
            other filters are ignored.

        3.  If a time range filter is defined, it is applied.  If
            the dump record fails the time range test, it is skipped
            and the event filter (if specified) isn't applied.

        4.  If an event number filter is defined, it is applied.


5.1  Event Filters
------------------

You may specify filters for the event numbers that you record in your meter
with its `C' button when you are viewing a reading.  Since you can record
nine event numbers, 1 through 9, you can define nine event filters to TOUCH2.

When you define an event filter, only those records that have the defined
event number associated with them in their event code field will be graphed.
Each event filter definition may have a graph title associated with it.

There are two ways to define an event filter: 1) with the "event" configura-
tion file directive; and 2) via the Event menu.  (To get to the Event filter
menu, start at the main menu and select `D' to reach the Dump menu; select
`G' to reach the Graph menu; select `E' to reach the Event menu.)

Here's a filter defined for event 3 via a configuration file directive:

        event=3,This is an event 3 title.

The Event filter menu shows the event filters defined in the configuration
file.  Select one of them by entering its number.  Redefine any one of them
by pressing `N'.  You are then invited to associate a graph title with the
event.  (See the Graph Title section for information on entering graph
titles.)

If you have defined an event filter and want to disable it, use the `D'
option on the Graph menu or the `S' option on the Event filter menu.


5.2  Ignoring Events
--------------------

It is also possible to specify dump records to be ignored when graphing by
their associated event numbers.  Any one of the ten event numbers, 0 through
9, may be specified.

There are two ways to specify ignore-event numbers.  The numbers can be
listed on an "ignore" configuration file directive.  This example states
that events 1, 3, 8, and 9 are to be ignored:

        ignore=1,3 89

The `I' option on the Graph menu allows you to specify ignore-event numbers.
It activates a separate menu for specifying them, offering two options: `I'
for entering the ignore-event numbers; and `E' for erasing the current list
of ignore-event numbers.

If you define a temporary ignore-event number list with the `I' option on the
graph menu, the list originally defined by the "ignore" configuration file
directive is restored when you exit the Graph menu.  (If no list was defined
with the "ignore" directive, an erased list is restored.)


5.3  Time Range Selection Filters
---------------------------------

TOUCH2 allows you to specify time ranges to select records from a dump for
graphing.  For example, suppose you want to divide the records of a dump into
four groups: readings made after fasting; readings made at mid-day; readings
made in the evening; and readings made before you go to bed.  These groupings
might be defined by these time ranges:

        Fasting:        11 p.m. to 10 a.m.
        Mid-day:        10 a.m. to 2 p.m.
        Evening:        2 p.m. to 7 p.m.
        Bed-time:       7 p.m. to 11 p.m.

If you tell TOUCH2 these ranges, and if you select one of them before you
direct TOUCH2 to draw a graph, it will include in the graph only those dump
records whose times are within the boundaries of the selected range.
Specifically, the dump records whose time is greater than or equal to the
starting time of the range and whose time is strictly less than the ending
time of the range.

You may specify up to six time ranges and titles for the graph whose entries
they select with the "range" configuration file directive.  You may also
define a new range via the graph time selection menu, reached via `T' from the
graph menu.  (The graph menu is reached via `D' from the main menu; then via
`G' from the dump menu.)

The time selection menu shows the ranges already defined -- e.g., from the
"range" directives in your configuration file.  If you want to use one of
them, just press its corresponding number.  If you want to define a new range,
use `N', then enter the range times and the title for the range.

Times may be specified as hours in twelve or twenty four hour notation.
Minutes must be separated from hours with a colon.  "A.M.", "a.m., "AM", "am",
"P.M.", "p.m.", "PM", and "pm" are accepted.  Blanks are ignored.  A minus
sign must separate the starting time from the ending time.  Both times must
be specified.  Midnight is 12 A.M. or 24:00; noon is 12 p.m. or 12:00.

The title follows the first comma in the "range" configuration file directive.
Here are sample "range" directives for the four time divisions suggested at
the beginning of this section:

        Fasting:        11 p.m. to 10 a.m.      range=11pm-10am,Fasting

        Mid-day:        10 a.m. to 2 p.m.       rng=10:00A.M - 14,Mid-day

        Evening:        2 p.m. to 7 p.m.        rng=2p.m.-7:00p.M,Evening

        Bed-time:       7 p.m. to 11 p.m.       rng=19-23,Bed-time

When using TOUCH2's menus to make equivalent definitions, you are prompted
first for the time range, then for the title.  You may use built-in and
pre-defined variables in the title.  See the Graph Title section for more
information on graph title variables.

If a time range selection is in effect, you may disable it with the `D'
option of the Graph menu.


5.4  Record Skipping Filters
----------------------------

Sometimes rather than selecting a range of records, you want to skip some
records.  A good example is when you want to skip old records at the end of
a dump.  The Graph menu offers two options -- `A' for skip-records-after,
and `U' for skip-records-until.  The controls for after and until selections
are the date and time in the records.

When you select the `A' or `U' option from the Graph menu, you will be asked
to enter date and time characters.  You must enter at least one character for
each.  Whatever you enter will be matched to the date and time in each record
in the dump.  The first record whose date and time start with the stated
characters will be the record after which skipping will begin, or until which
skipping will take place.  When you enter a date and time, TOUCH2 checks for
the record immediately; displays one if it exists; or complains if it doesn't.

The `D' option of the Graph menu disables the after and until specifications.

As an example of how you might use the skip-records-after option, assume that
your meter is full of readings and that you have already graphed the readings
after 5:25:00 PM on 11/07/94. If you select the `A' option on the graph menu,
enter "11/07/95" as the date, and enter "5:25:00 PM" for the time, TOUCH2 will
graph all records up to and including the one with the specified date and time,
skipping everything that follows.

Similarly, if you decide that you want to graph the readings that start at
5:25:00 PM on 11/07/94, select the `U' option and specify that date and time.
TOUCH2 will skip records until it reaches the one with the specified date and
time, then it will graph the rest.

You can shorten your date and time entries to as little as one character each.
TOUCH2 matches whatever you enter from the beginning of the date and time
fields in the dump records and stops at the first record that fully matches
what you enter.  So you could specify only a month -- e.g., "11" -- and only
and hour -- e.g., "5" -- but be careful that doesn't result in an unexpected
match; carefully check the matching record that TOUCH2 displays when you
enter shortened values to avoid surprises.

You can use both after and until specifications.  Be careful when you do that,
because it's not too hard to specify dates and times that eliminate all dump
records.

Also be careful when you have both skip and range filters in use at the same
time.  You can, for example, specify a skip-record-until date and time, only
to have the range filter eliminate it from the graph.


5.5  Reversing Dump Record Order
--------------------------------

The dump records in the meter's data log are recorded in most recent to oldest
order.  That's the way TOUCH2 stores them in its dump buffer when it reads
them from the data log.

If you want to graph the dump records in the reverse order -- normal calendar
order -- oldest to most recent, you can use the `V' option on the Dump menu
to reverse the order of the records in TOUCH2's dump buffer.  You can reverse
the order of the dump records as many times as you want, as long as there are
two or more of them.

Be careful using the skip-records-after and skip-records-until filters when
you have reversed the order of the dump records.  Once you have reversed the
dump record order, your previous skip-records-after specification should
probably be changed to a skip-records-until specification with a different
date and time.  You might also need to make an equivalent change to the skip-
records-until specification you had previously made.


6.0  Saving and Reusing Dumps
-----------------------------

TOUCH2 will write a meter dump to a file in two formats, QuattroPro and raw.
The default format is raw.

The QuattroPro format contains only meter readings -- no header line -- and
only date, time and meter reading values.  The values are separated by commas,
but are not enclosed in quotation marks.  The default QuattroPro dump file
path is TOUCH2.CSV.

The raw format contains a header line and all information provided by the
meter -- date, time, reading type, reading and checksum.  Values are
separated by commas and enclosed in quotation marks.  The raw format is the
only file input format that can be reused.  The default raw dump file path
is TOUCH2.DMP.

To write a dump file, select the Dump option from the main menu.  From the
file menu select the dump type with `Q'.  If you select the QuattroPro
format, you may then elect to include or exclude check, error, and high
readings.  Select the File option from the dump menu.  (You may also want
to specify a file path different from the TOUCH2.CSV or TOUCH2.DMP defaults.)

To reuse a dump file, select the Dump option from the main menu and the
Read option from the dump menu.  (You may also have to specify a file
path if the default of TOUCH2.DMP isn't acceptable.)  The file must be in
the raw format -- TOUCH2 won't read a dump file written in the QuattroPro
format.

You may switch from raw to QuattroPro format with the "-r" option on the
TOUCH2 call line.  You may use the "dump=<format>" configuration file
keyword and value to select either format.


7.0  Graphing
-------------

Graphic results are a useful TOUCH2 product.  Consequently, this section
takes pains to describe what is graphed and how you can change it.


7.1  Graph Lines
----------------

The beginning of each graph line contains:

        date time event code reading

Where:

        date      date reading was taken
        time      time reading was taken (hour:minute -- seconds omitted)
        event     event number that you associated with the reading
                  (usually 0, displayed as ' ')
        code      the reading code:
                  ' '   normal
                  'C'   check reading
                  '!'   test strip reading
                  '*'   meter error
        reading   the value of the reading

There is no space between the event number and the reading code.


7.2  Graph Printing
-------------------

If you want to print a graph, select the TOUCH2 options that write a graph
to a file -- Dump from the main menu, Graph from the dump menu and File from
the graph menu.  Then copy the file to your printer -- e.g., to print a graph
written to the default graph file path, use the DOS command:

        COPY TOUCH2.GRF PRN

You may put a title line on each page of the graph.  The title line may have
no more than 66 characters and it may be defined with the "-t <ttl>" option
on the TOUCH2 call line, with the "graphtitle" or "gttl" configuration file
keyword and associated value, or via the Title options on the Dump and Graph
menus.  The title line normally follows a page number in the graph output
file.  You can suppress the page number display with the "-P" option on the
TOUCH2 call line, or the configuration file directives "pgctdisp=off" and
"pcd=off".

When a graph is written to a file, presumably for printing, TOUCH2 puts a
printer control string at the beginning and end of the file.  The beginning
string ("beforegraph") is supplied to condition the printer for the special
needs of the graph; the ending string ("aftergraph")  is supplied to reset
the printer to its previous state.

TOUCH2 will supply three predefined strings for the EPSON, PCL4 and PPDS
printer protocols.  See the Defining Strings section for information on
interpreting the following values.

        Printer         String          Value

        EPSON           aftergraph      \f\e@
                        beforegraph     \e0\et1\e7\ex1

                                        The "aftergraph" string issues a form
                                        feed and resets the printer.

                                        The "beforegraph" string sets 8 lines
                                        per inch spacing and selects an IBM
                                        graphics character set.

        PCL4            aftergraph      \f\eE\4
                        beforegraph     \e&l8D\e(10U

                                        The "aftergraph" string issues a form
                                        feed and resets the printer.

                                        The "beforegraph" string sets 8 lines
                                        per inch spacing and the PC-8 font.

        PPDS            aftergraph      \f\e[K\1\0\6\4
                        beforegraph     \e0

                                        The "aftergraph" string resets the
                                        printer.

                                        The "beforegraph" string sets 8 lines
                                        per inch spacing.

If you don't want any special strings, set "aftergraph" to the empty string
-- e.g., put this line in your configuration file

        aftergraph=

or use this option on the TOUCH2 call

        -a^@

TOUCH2 expects to print the graph at 8 lines per inch on 11 paper.  Thus,
it sets its lines per page value to 81.  If you change the line spacing or
use different size paper, change the lines per page value with the "lines"
keyword or the "-L <num>" call line option.


7.3  Graph Characters
---------------------

TOUCH2 writes a bar graph, containing horizontal bars and vertical lines for
the maximum and minimum level lines.  Normally TOUCH2 uses IBM graphics
characters for the bars and the lines.  It uses the double horizontal line
character (hexadecimal cd) for the bar, the single vertical line character
(hexadecimal b3) for the level lines, and a separate character (hexadecimal
d8) where the horizontal and vertical lines meet.  These three characters
may be redefined with the "bar", "line" and "intersection" strings, or with
the "-b <char>", "-i <char>" and "-l <char>" options on the TOUCH2 call.
See the Defining Strings section for more information on how to build a
string that defines a character.  Here's an example that uses configuration
file keywords and values to set the bar character to `*', the line character
to `|' and the intersection character to `+':

        bar=*
        intersection=+
        line=|


7.4  Graph Title
----------------

TOUCH2 lets you define a 66 character title line for each page of the graph
output.  You may use the "graphtitle=<ttl>" configuration file directive or
the "-t <ttl>" option on the TOUCH2 call.  However, you can't put embedded
spaces in the <ttl> part of the "-t <ttl>" option, so use the configuration
file directive if you want embedded spaces in your title.

When TOUCH2 encounters a dollar sign (`$') in the graph title line, it
attempts to interpolate a built-in or pre-defined variable in its place.  The
following characters define the dollar sign interpolations that are possible.

                     Result
        Characters   Length     Interpolation

        $$              1       single dollar sign -- `$'
        $Dy             3       day of week -- e.g., "Mon"
        $dy             2       month day number with leading 0 -- e.g., "01"
        $dY             2       month day number without leading zero --
                                e.g. " 1"
        $Mo             3       month -- e.g., "Jul"
        $mo             2       month number with leading zero -- e.g., "07"
        $mO             2       month number without leading zero -- e.g., " 7"
        $Yr             4       full year -- e.g., 1994
        $yr             2       year less 1900 -- e.g. "94"
        $Hr             2       hour with leading zero -- e.g., "09"
        $hr             2       hour without leading zero -- e.g., " 9"
        $Mn             2       minute without leading zero -- e.g., " 0"
        $mn             2       minute with leading zero -- e.g., "00"
        $Se             2       second without leading zero -- e.g., " 5"
        $se             2       second with leading zero -- e.g., "05"
        ${name}                 value of environment variable <name>
        $n                      value of title variable n [0-9]

Note that the values of similarly named built-in variables -- e.g., $dy and
$hr -- are not consistent for the handling of leading zeros.  TOUCH2 does this
so that the easiest usage generates the most commonly expected result -- e.g.,
$dy usually has a leading zero in yy/mm/dd forms, while $hr usually does not
have one in hh:mm:ss forms.

Here's an example.  If the uninterpolated graph title line is:

        Victor A. Abell, $dY $Mo $yr

and today's date is January 2, 1994, the interpolated graph title line is:

        Victor A. Abell,  2 Jan 94

TOUCH2 always displays the interpolated graph title line on the dump menu and
in the graph.  However, when you select the entry of a new title with the T
option of the dump menu, TOUCH2 displays the uninterpolated line for you to
inspect and change.

Remember that the length of the uninterpolated and interpolated graph title
lines is limited to 66 characters.


7.5  Graph Title Variables
--------------------------

TOUCH2 will interpolate ten graph title variables, represented by $0 through
$9, in the graph title line.  The graph title variables may be defined with
the "titlevar=<n>,<val>" configuration file directive or the "-v <n>,<val>"
option on the TOUCH2 call line.  However, you can't put embedded spaces in
the <val> part of the "-v <n>,<val>" option, so use the configuration file
directive if you want embedded spaces in a graph title variable.  You can
define a variable in the configuration file and then redefine it with a call
line option.

Here is an example.  Assume that TOUCH2.CF contains:

        titlevar=5,last month's
        tv=0,7.2
        graphtitle=Victor A. Abell, $5 A1C=$0

And the TOUCH2 call line is:

        touch2 -v 0,6.8

Then the title line displayed on the dump menu and placed in the graph is:

        Victor A. Abell, last month's A1C=6.8

The "-v 0,6.8" option on the TOUCH2 call line redefined the value of graph
title variable $0 to be 6.8, replacing the value of 7.2 set by the "tv=0,7.2"
configuration file directive.  ("tv" is shorthand for "titlevar".)


7.6  Storing the Graph Title in a Dump File
-------------------------------------------

The uninterpolated graph title may be stored in a dump file and retrieved
when the dump file is read.  The title is read from the dump file and used,
or written to the dump file (if it is defined) when the dump title I/O
option is enabled.

There are two ways to enable dump file graph title I/O.  The Dump menu's `L'
option is one way.  When the Dump menu `L' line says "yes," the title will
be read from the dump file and used when it is present in the dump file;
it will be written to the dump file when it is defined.  When the Dump menu
`L' line says "no", dump file graph title I/O is suppressed.  Press `L' to
switch the title I/O mode.

The second way to enable or disable the dump file graph title I/O mode is
with the "ttlio" configuration file directive.  A "ttlio=yes" directive
enables dump file graph title I/O; and "ttlio=no" disables it.

Remember, the title that is read or written is the title whose variables,
if any, have not been interpolated.  This insures that the variables will
be correctly interpolated when the title is read.


7.7  Multiple Title Management
------------------------------

In the course of a session using TOUCH2, you may have occasion to specify
several graph titles.  You may have defined titles in the TOUCH2.CF config-
uration file -- a main title and titles for event and time range filters;
your dump files may contain titles; and finally you may enter titles via
the `T' prompt of the Dump and Graph menus. 

TOUCH2 tries to maintain a hierarchy of titles, so that as you change from
one operation to another, previous titles are restored when appropriate.
For example, when you select a range filter from the Graph menu and accompany
that selection with a title specification, that title will be erased when you
exit the Graph menu if the dump file had a title.  Another example: when you
use the`E' option of the Dump menu, any title that came from the dump file is
erased, too, and the title from the configuration file "gttl" directive is
restored, if there was one.

Here is the order of precedence of titles:

     *  The title from the "gttl" configuration file directive is
        considered the most important title.

     *  As long as the records of a dump file remain in TOUCH2's dump record
        buffer, the dump file's title is temporarily considered the most
        important title.  The dump file title is erased when the dump file's
        records are erased.

     *  A title associated with filters or entered directly is considered
        lowest in importance and is erased in favor of the dump file or
        configuration file title upon exit from the Graph menu.  It's also
        erased when you use the `D' option of the Graph menu to disable
        event and range filtering.


8.0  Defining Strings
---------------------

TOUCH2 uses strings in its configuration file and on its call to define
special characters.  Here are the rules it follows:

        *  Non-special characters are taken from a string until a `\' is
           encountered.

        *  The `\' leads a special character definition.  It may be followed
           by:

           \            to define a `\' character

           e or E       to define an ESCape (hexadecimal 1b)

           f or F       to define a form feed (hexadecimal 0c)

           n or N       to define a line feed (hexadecimal 0a)

           r or R       to define a carriage return (hexadecimal 0d)

           t or T       to define a TAB (hexadecimal 09)

           ^            followed by any character in the set [@A-Z] to
                        define an ASCII control character -- ^@ produces
                        0; ^A, 1; etc.

           0o           (zero, lower case "oh") followed by 3 octal digits
                        to define an octal character value

           0t           (zero, lower case "tee") followed by 3 decimal digits
                        to define a decimal character value

           hh           two hexadecimal characters that define a single
                        character value

Here are some examples:

        \e0             defines a string with the two characters ESCape and
                        zero.

        \0o0330         defines the same string -- ESCape and zero.

        \0t0270         defines the same string -- ESCape and zero.

        \e[K\1\0\6      defines a string with ESCape, left bracket, capital
                        `K', hexadecimal 1, hexadecimal 0, and hexadecimal 6.

        \f\EE           defines a string with a form feed, an ESCape and a
                        capital `E'.
        
        \@              defines a hexadecimal 0 value

These strings may be used as values after keywords in the configuration file
and on the TOUCH2 call.  When used on the TOUCH2 call you should be careful
to avoid using characters that have special meaning to your command
interpreter -- e.g., the vertical bar (`|').


9.0  The TOUCH2 Call
--------------------

Some options that may be specified with configuration file keywords and
values may also be specified as options on the TOUCH2 call.  The option
indicator is the minus sign (`-') and the option keywords are single
characters.  When the same options are specified both ways, the call
line values apply.

Strings and characters are defined as described in the Defining Strings
section.  The options include:

        -a <string>     <string> is a string defining the "aftergraph" printer
                        control string.

        -b <char>       <char> is a string defining the printed graph bar
                        character.

        -B <string>     <string> is a string defining the "beforegraph"
                        printer control string.

        -c              selects the inclusion of check, error, and high
                        readings in a QuattroPro dump file.  The default is
                        to exclude these readings.

        -C              turn off checksum verification

        -d              sets debug mode.  When debug mode is set, TOUCH2
                        displays all characters it reads from the meter,
                        starting at the upper left corner of the screen,
                        and filling all the screen except for the prompt
                        line at the bottom.

        -D              disables the wait for DSR when transmitting to the
                        meter.  See the The Transmit DSR Problem section for
                        more information.

        -g <min>        sets the graph minimum level line value to <min>.
                        The default is 70 mg/dl or 3.9 mmol/l.

        -G <max>        sets the graph maximum level line value to <max>.
                        The default is 110 mg/dl or 6.1 mmol/l.

        -h              causes the display of "help" (usage) output.  No
                        further processing takes place.  TOUCH2 also displays
                        the "help" output and stops when it detects an error
                        in its options or in the configuration file.

        -i <char>       <char> is a string that defines the printed graph
                        intersection character.

        -l <char>       <char> is a string that defines the displayed and
                        printed graph intersection character.

        -L <num>        <num> defines the number of lines on the printed
                        graph page.  The default is 81.  The minimum is 11.

        -p <name>       <name> defines the printer type -- EPSON, PCL4 or
                        PPDS.  The default is EPSON when the "aftergraph"
                        printer control string is undefined.

        -P              turns off the display of the page number in the
                        graph output file.

        -r              deselects a raw dump file format in favor of the
                        QuattroPro dump format.

        -t <ttl>        sets the graph title line to <ttl>.

                        WARNING: <ttl> may not have embedded spaces -- use
                        the "graphtitle" configuration file directive to
                        embed spaces in the graph title line.

        -v <n>,<val>    sets title variable n [0-9] to <val>.

                        WARNING: <val> may not have embedded spaces -- use
                        the "titlevar" configuration file directive to embed
                        spaces in title variables.

        -w              disables warnings about display mode.


Warranty
--------

Because TOUCH2 is free software, it has no warranty to the extent
permitted by applicable law.  I provide TOUCH2 "as is" without any
warranty of any kind, either expressed or implied, including, but
not limited to, the implied warranties of merchantability and
fitness for a particular purpose.  The entire risk as to the quality
and performance of TOUCH2 is with you.  Should TOUCH2 prove defective,
you assume the cost of all necessary servicing, repair, or correction.


Comments
--------

Please direct comments to me via e-mail -- abe@cc.purdue.edu.

Vic Abell
May 14, 1995
