                               About the programs
                                  04/03/97 -med

        All the sample programs display the same information.  While it 
        was not possible to maintain everything exactly the same in all 
        details due to minor differences in the various languages, an 
        attempt was made to keep the display format as similar as 
        possible. Also an attempt was made to keep the program structure 
        as similar as possible in the samples provided. This allows the 
        differences between the way the various languages interface with 
        the FRYERS driver to be easily seen.

        The languages choosen were selected as examples from the more 
        popular types of languages currently used on the PC. ACURVE.ASM 
        shows the example program written in assembler. GWCURVE.BAS shows 
        the example program written in interperitive Basic (the program 
        will run under BASICA on the IBM, or GWBASIC on a PC compatible). 
        TBCURVE.BAS shows the example program written in compiled Turbo 
        Basic (now Power Basic). TCCURVE.C shows the example program 
        written in Turbo C. TP3CURVE.PAS shows the sample program written 
        in Turbo Pascal (version 3). TP4CURVE.PAS shows the example 
        program written in Turbo Pascal version 4.0 which also runs with 
        later versions. TP6CURVE.PAS shows the sample program writen for 
        a VGA screen (others are for CGA) and requires Turbo Pascal 6.0 
        or better to compile.  TPWCURVE.PAS shows the sample program 
        written for Windows operation. D2CURVE.DPR is for Delphi2.0.
        BCURVE.CPP/MAK is an example for Borland C++ Builder. 

        The programs are ment as samples only. Because an attempt was 
        made to keep all the programs as similar as possible, they are 
        not as efficient as they could otherwise be. It should not be 
        construed that the form shown is the only way, or even the best 
        way to write the program. 
        The programs do not perform error correction this is because 
        effort was directed towards showing a working sample without 
        overloading the code with all the possible error correction 
        schemes. Thus under some extreme conditions abnormal things may 
        happen. None of them should cause the program to lock up though, 
        and any trouble should clear up on the next screen write after 
        the abnormal condition has cleared.

        Normally an error will be noted by replacing the curve type 
        designator in the upper left corner of the screen with an error 
        message. If the instrument is not properly connected or setup, 
        the message "NO POLL" will be displayed indicating that the PC is 
        not receiving polls from the instrument.  If the instrument is in 
        a mode where it cannot respond with the requested curve data 
        (such as the power on Frye logo screen on the 6500), the message 
        "BAD RSP" will be displayed.  If an error is detected during the 
        transfer of data the message "ERROR" will be displayed.  Another 
        message that shouldn't normally be seen is "INVALID" which 
        indicates that the data in the requested curve is not valid.  If 
        the curve information was good then the two messages that will 
        normally appear are "dBSPL" indicating power output measurement, 
        or "GAIN" indicating a gain curve.

                                        1
        The scaling numbers on the left side of the screen are adjusted 
        to fit the curve being displayed. The minimum number that can 
        appear is -80 at the bottom of the screen, and a maximum number 
        of 180 at the top of the screen. The curve display itself is 
        moved to fit within the scaling. Scaling is changed when the 
        highest value of the curve data moves higher than the top 10dB of 
        the display box, or lower than 30dB below the top of the box. 
        (i.e. an attempt is made to keep the peak value in the curve 
        between the top two scale numbers shown at the left of the 
        display box.)

        Frequency distribution across the display is performed as log2 
        starting with 100Hz being displayed at the left of the screen, 
        and 8000Hz at the right of the screen. The table "XTAB" defines 
        the specific plot points used for each measured frequency. Lines 
        are then drawn between each of the measured points. The numbers 
        at the bottom of the graph show the frequency distribution.

        If the curve data exceeds the defined display area the curve 
        itself will be confined to the allowed area within the display 
        box. This can happen on start up when the scale information does 
        not match the data in the curve buffer. It is assumed that the 
        "top value" word contains the highest value in the curve data and 
        is used to determine scaling. 

        There are eight words of other data that are associated with the 
        curve data, The source amplitude which is the amplitude of the 
        source that was used when the curve was measured.  The rms out 
        which is the overall rms output of the curve. Top val is as was 
        previously discussed the highest (or peak) value present in the 
        curve data, and noise reduction which is the noise reduction that 
        was used (number of averaged measurements) when the curve was 
        measured.

        There are also two words used as flags to identify the curve data 
        information. These are displayed on the screen as the two hex 
        words below the flags label.  The second two words of spare flag 
        information do not contain any valid data currently, so they are 
        not displayed.

        Finally below the flags is the status label. The information 
        contained below status is the register result that is obtained 
        while waiting for a command response from the instrument. This is 
        primarily for debug purposes. The response wait loop is where the 
        program spends most of its time when it is not drawing the curve 
        on the display. The status is used to peek at the status of the 
        FRYERS program as it performs its tasks.

        One difference that can be noted between the programs is the way 
        that the Basic programs draw the curve compared to the other 
        sample programs. The Basic programs draw the curve as a 
        continuous line. The other programs draw the curve in a "pixel 
        per X" method.  The different method for Basic was used because 
        it is too slow to use point plotting to draw lines in Basic, so 
        Basic's own line draw routine was used instead.

                                        2
        In the "pixel per X" method, only one pixel is drawn in each "X" 
        (column) position of the display. This helps to more clearly see 
        what is happening at the higher frequencies when there is noise 
        in the response.  With a straight line drawing between the "Y" 
        points, a noisy response at the higher frequencies will cause 
        lines to be drawn on top of each other leaving an uncertainty as 
        to what frequency is plotted where. 

        The non-Basic programs have an option provided in them which 
        allows the curve drawing method to be changed. The constant 
        "CLTYPE" (for Curve Line Type) specifies what type of line to 
        draw.  A value of zero in this constant will draw the "X per 
        pixel" type line. A value of one in the constant will draw 
        straight lines like the Basic programs (pixels in both "X" and 
        "Y" coordinates between plot points). A value of two in the 
        constant will cause a smoothed line to be drawn (when a line 
        coordinate changes in the "Y" direction an overlapping pixel is 
        drawn).

        On the log2 scale there are a few frequencies that lay on top of 
        each other. Normally this results in several dots being displayed 
        in the same "X" position at the overlapping frequencies.  The 
        multi-X plotting can be avoided by not ploting the overlaping 
        frequencies.

        There are two possible ways to perform the selective plot, either  
        drive the ploting from an additional indexing table, or don't 
        plot the point if X1 = X2. The indexing table gives you selection 
        over which points are to be ploted and which are not. The no plot 
        on X1=X2 is easier to perform and so is the method that was 
        chosen in the sample programs.

        History:   11/12/87 -med  
                   08/10/88 -med
                   01/04/89 -med
                   06/20/89 -med
                   01/21/92 -med 
                   10/19/92 -med
                   12/17/92 -med
                   04/03/97 -med
        <end>











                                        3

