                        Audiogram Program
                          04/10/97 -med

Overview:

This program is intended as only a programming example to
guide a programmer on creating their own program to obtain 
information from the audiometer. 

This program shows an example of using the ASCII transmission 
from the audiometer to collect data into an audiogram. If you 
wish, you can switch it to FIPP Packet use by adding a the 
'P' to the command line. 

The audiogram is a simple text based display. It will collect 
masking level and pure tone levels using Earphones, Bone 
vibrator, or speaker. 


The symbols used on the audiogram are as follows:

   Left Earphone  = X
   Right Earphone = O
   Left Bone      = <
   Right Bone     = >
   Speaker        = S
   Left Masking   = {
   Right Masking  = }
   No response    = L or R


While the program will operate by itself in ASCII mode, it is 
preferred that the FRYERS.COM driver (or FRYERS32.DLL for the 
32 bit version) be available so that the interrupt based 
driver can be used. Without using the interrupt driver, the 
program may lose some collected data if signals are sent from 
the audiometer too fast. Normally this isn't a problem since 
the audiometer is being run manually it is unlikely that a 
valid signal would be sent repeatedly at a rapid rate to the 
computer. If you use the FIPP Packet option (by selecting the 
P option on the command line), you MUST load the FRYERS 
driver, or it will not work. If you are using Windows 95/NT, 
you must have the FRYERS32.DLL driver available in the Windows
directory or the program will not work. It is recommened that 
you use the FIPP Packet method of communicating if possible 
because it provides a much higher level of reliablity (there 
is no error checking in ASCII mode). As well as that the 
Fryers FIPP method provides a much greater level of control 
and ability for future enhancments.

Note that if you select the "R" option on the command line, the 
program will require the use of a patient switch to 
pick up the patient response signal from the audiometer.


Usage:

To use the program, first connect the audiometer to the desired 
COM port on the computer. For ASCII use, make sure that the 
audiometer is configured for ASCII operation (jumper inside 
the unit). If the jumper is not properly set, the program will 
try to switch the audiometer to ASCII operation, but it may 
not always work. For packet operation, leave the jumper in the 
FIPP position. It is recommended that the audiometer be used 
in FIPP (packet) operation normally unless you have a need to 
use the ASCII feature.

If you will be using COM1, then run the program by entering the 
program name "AGRAM". If you will be using COM2, then add a "2" 
to the command line "AGRAM 2". That will cause the program to 
use the COM2 port. 

Once the program is running, you will see an audiogram displayed 
on the screen. Note that it is limited to 100HL. Since this is an 
example program only, no work was done to implement the graph in 
graphic form which would allow the normal full range of -10dB to 
120dB of an audiogram graph. 

The graph will plot the responses on 5dB boundries at the 
standard 11 frequencies. 

At the right of the graph you will see the current status of the 
audiometer. Note that when the program is first brought up, that 
area of the screen will be blank. It is only updated when the 
audiometer sends data to the computer. 


Operation:

Operation of the program is simple. There is nothing that needs 
to be done at the computer once it is running. The program 
automatically updates the graph as it sees the changes occur at 
the audiometer. There are only four commands available. Pressing 
the Escape key or the "Q" key will exit the program. Pressing the 
"C" key will clear the graph allowing you to start over. Pressing 
the "R" or "L" key will clear the currently selected graph 
position. Pressing the "R" ir "L" key again will set a No Reponse 
indication on the graph at the currently selected position. 
A no response to be displayed at the 100dBHL level for the 
currently selected frequency. There is no data storage of the 
contents provided in the program. When the screen is cleared, 
the data is gone forever.

Normally the program will watch for the stimulus button to be 
pressed. When it sees the stimulus button pressed, it will
update the graph with the current panel configuration at the
selected frequency. 

If the 'R' option is selected at the command line, when the 
operator turns on the audiometer stimulus, the program 
will watch for the patient response signal. When it sees a 
patient response signal while the stimulus is enabled, the 
program will update the audiogram with the current information. 

The audiogram is updated by looking for past history information 
at the current selected frequency. If old data is found at the 
current frequency, it will be replaced with the new data and the 
mark on the graph will be moved to reflect the new input. 


As an example: 

Suppose the audiometer is set to 1000Hz at 20dBHL on the left 
channel. The operator presses the stimulus button. The 
audiometer sends this information to the computer. The 
computer then uses it to update the display and places a "X" 
at the 20dB point of the 1000Hz frequency. 

Next the operator releases the stimulus switch selects 10dB HL 
and presses the stimulus switch. The mark will be moved to the 
10dB HL location on the graph. If the patient did not respond, 
the operator would move the level dial to a higher level until
a response is obtained. The graph will remember the last 
level position for whihch stimulus was presented at each 
frequency. If the 'R' option is used and the patient does not 
respond, The graph will not be updated even though the stimulus 
button was pressed because no patient response signal was seen. 

The operator releases the stimulus switch and changes the level 
to 15dBHL. No stimulus has been presented yet, but the patient 
thinks they hear a tone and presses the response switch. With 
out the 'R' option, nothing will happen because the stimulus 
has not been presented yet. With the 'R' option, the graph 
will still not be updated because it is a false response. 
The Stimulus signal must be presented or the patient response 
signal is considered to be invalid and is ignored. 

Next the operator changes the frequency to 2000Hz and presents a 
stimulus at 30dBHL. A new "X" is now placed on the graph at the 
2000Hz 30dBHL position. Note that the "X" at 1000Hz @ 15dBHL 
remains in place as well. 

The operation of the program is such that the last known valid 
response for the specified frequency is displayed. If there is no 
known response, nothing is displayed. 

Sometimes a false response will be given at a particular 
frequency. To correct it, simply run the test for that frequency 
to update the graph. If there is no response for that frequency, 
you can cause a "L" or "R" to be dispayed at the 100dBHL 
position by pressing the "L" or "R" key on the computer. 
This will replace any response that might have been generated 
for that frequency previously. To clear the No Response 
indicator, press the "L" or "R" key again. If you wish a true
response to be indicated, you must run the test again for that 
frequency. Once the test position is cleared with the No 
Response indicator, the data for that position is lost.


The program will detect if the earphones, speaker, or bone 
vibrator are being used and display the appropriate symbol for 
the selected device. The program will also detect if masking is 
being used and provide a masking symbol at the selected masking 
level.


The MSDOS version of the program was written in Turbo Pascal 
and requires version 6.0 or better to compile. The 32 bit 
Windows 95/NT version of the program was written in Delphi 2.0.

The program can be compiled for either MSDOS or Windows 
operation. It should be noted that the Windows version is 
limited to text operation to keep it compatible to the MSDOS 
version. It is presumed that the programmer will write their 
own Windows interface if needed.
 
The MSDOS version of the program is AGRAM.EXE. The Windows95/NT
version of the program is AGRAM32.EXE. 

 
Command line options:

   2 : Use COM2 instead of COM1
   P : Use FIPP packet communication
   R : Require patient response for data validation

The command line options must be seperated by spaces with no 
other characters used. The options may be arranged in any order.

Example: AUDGRAM 2 R P 



History: 09/16/92 -med original
         04/10/97 -med revised

<eof>

