
        =======================================
              "SPC Tennis" Technical Notes      
                     File Structure
        =======================================

The structure of files used to store setting and results for SPC 
Tennis is very simple, and is in ASCII format. Here is an example:

SHOTOPTIONMIDDLE =  10 
SHOTOPTIONRIGHT =  50 
MANUALVELOCITYCENTRE =  50 
MANUALVELOCITYSPREAD =  50 
MANUALBOUNCECENTRE =  50 
MANUALBOUNCESPREAD =  50 
LAUNCHPOSITION =  1000 
VELOCITYDISTRIBUTION =  1 
BOUNCEDISTRIBUTION =  1 
VARIATIONPANELAVAILABLE = TRUE
VARIPROGBEGIN
1	50	50	50	50	
101	45	55	40	55	
301		60		60	
401	35		35		
501	50	50	50	50	
VARIPROGEND
RESULTSBEGIN
463	This is a note for shot 1
376	
394	This is a note for shot 3
367	
322	
RESULTSEND

There is a carriage return [CR] at the end of every line.

The section which contains the programmed variation changes is 
as follows:

VARIPROGBEGIN[CR]
shot no [TAB] velocity centre [TAB] velocity spread [TAB] bounce 
centre [TAB] bounce spread [CR]
shot no [TAB] velocity centre [TAB] velocity spread [TAB] bounce 
centre [TAB] bounce spread [CR]
shot no [TAB] velocity centre [TAB] velocity spread [TAB] bounce 
centre [TAB] bounce spread [CR]
VARIPROGEND[CR]

Any number of programme entries can be included in the above section.

The section containing the results is as follows:

RESULSBEGIN[CR]
shot no1 result [TAB] shot no1 note[CR]
shot no2 result [TAB] shot no1 note[CR]
shot no3 result [TAB] shot no1 note[CR]
shot no4 result [TAB] shot no1 note[CR]
shot no5 result [TAB] shot no1 note[CR]
RESULTSEND[CR]

Any number of shots can be included in the above section.
Results of integers between -10000 and 10000 will be accepted.

In both the VARIPROG section and RESULTS section, SPC Tennis will 
accept a comma in place of the [TAB] character.

In the RESULTS section, if there is no note, it is not necessary
to have a [TAB] or comma. Only the [CR] is necessary between each
entry.

No particular part of the file is compulsory. If a file is 
opened into "SPC Tennis" and parts of the file are omitted, then 
the previous setting will remain unchanged.

This makes it possible to use a standard spreadsheet to produce 
large variation programmes or files containing results. Most 
spreadsheets can produce ASCII files with entries in the same 
row separated by [TAB] characters, and [CR] at the end of each
line. With EXCEL V5 you use "Save as Type: Text (Tab delimited)". 

USING SPC TENNIS WITH REAL PROCESSES
SPC Tennis can only handle integer numbers betweeen -10000 and 
10000. If you want to use SPC Tennis to look at the results of 
real processes it may be necessary to use scaling factors to 
convert the measurements.  Five keywords have been provided so 
that SPC Tennis will perform the scaling when it opens files.

These keywords are:

SUBTRACT = 
MULTIPLY = 
AUTOSCALE
USL =
LSL =

If you include a statement such as 

SUBTRACT = 500

in the file, then 500 will be subtracted from each figure in the
section between RESULTSBEGIN and RESULTSEND before the figure is 
stored in SPC Tennis.  Similarly:

MULTIPLY = 1000

will multiply the numbers by 1000 before they are stored.  If you 
include both SUBTRACT and MULTIPLY statements, then the subtract 
will be performed first, then the multiplication.  

USL and LSL allow you to set values for the Upper Specification Limit
and the Lower Specification Limit.  Whatever scaling factors are 
applied to the data will also be applied to the Specification Limits.

The word:

AUTOSCALE 

in the file will cause SPC Tennis to calculate the subtract and 
multiply factors automatically to produce a set of results where
the measurements and the specification limits all lie between 
about -1000 and +1000.  The factors which have been applied to the 
data are written as a note for Shot no 1 (to read the note, choose 
Table from the Charts menu, then scroll to see shot 1). 

If you include values for USL or LSL in the file, then if you put 
the word 'SPEC' in the same line as AUTOSCALE e.g.

LSL = 37.5
USL = 39.1
AUTOSCALE SPEC

then the subtract and multiply factors will be calculated to put
the specification limits at exactly -1000 and +1000.

'DATA' in the same line as AUTOSCALE will cause the subtract and 
multiply factors to be calculated from the data only.  Any
specification limit values will be ignored.  The Average of the 
resulting data will be about zero.

Steve Horn,
21 Benjamin Drive, Bo'ness, West Lothian EH51 0QS, United Kingdom
CompuServe 100116,3151
Internet steve@horn.demon.co.uk

11 January 1996
