NIST

PUBLICATIONS

A111DE TbbSbl

NBSIR 88-3096

MEASUREMENT OF ADAPTER LOSS,

MISMATCH, AND EFFICIENCY

USING THE DUAL SIX-PORT

George J. Counas

Bill C. Yates

National Bureau of Standards

U.S. Department of Commerce

Boulder, Colorado 80303-3328

July 1988

Simulating America s Progress

1913 - 198$ 88-3096

1988

C.2

NJ. ~-T C Qc iOO < yio > 88 - 3

NBSIR 88-3096

MEASUREMENT OF ADAPTER LOSS,

MISMATCH, AND EFFICIENCY

USING THE DUAL SIX-PORT

George J. Counas

Bill C. Yates

Electromagnetic Fields Division

Center for Electronics and Electrical Engineering

National Engineering Laboratory

National Bureau of Standards

Boulder, Colorado 80303-3328

July 1988

Supported in part by

Newark Air Force Station, Ohio 43057

U.S. DEPARTMENT OF COMMERCE, C. William Verity, Secretan'

NATIONAL BUREAU OF STANDARDS, Ernest Ambler, Director

CONTENTS

Page

ABSTRACT 1

I. INTRODUCTION 2

II. EQUIPMENT USED 2

III. SOFTWARE 7

IV. MAKING A MEASUREMENT 9

A. GENERAL OVERVIEW OF THE MEASUREMENT PROCESS 9

B. DATA STORAGE AND USE 11

C. RUNNING THE PROGRAM 14

V. REFERENCES 2 2

VI. ACKNOWLEDGMENTS 2 2

APPENDIX I LISTING OF ADAPTER PARAMETER CALCULATING

SUBPROGRAM "FNAdp" 2 3

APPENDIX II LISTING OF ADAPTER PARAMETER CALCULATING

SUBPROGRAM "Gamma" 4 0

APPENDIX III COMPLETE LISTING OF MEASUREMENT PROGRAM

"ADP5M" 4 2

iii
LIST OF ILLUSTRATIONS AND TABLES

PAGE

FIGURE 1 SIMPLIFIED BLOCK DIAGRAM X-BAND FRONT END AND

RADIOMETER 3

FIGURE 2 MEASUREMENT SETUP USING WAVEGUIDE TO COAX ADPT . . .

FIGURE 3 MEASUREMENT SETUP FOR WAVEGUIDE TO COAX ADAPTER..

FIGURE 4 FUNCTIONAL FLOW CHART FOR ADAPTER MEASUREMENT

PROGRAM 10

FIGURE 5 SAMPLE DATA LOG FOR USE WITH ADAPTER PROGRAM .... 12

FIGURE 6 SAMPLE PRINTOUT OF ADAPTER PARAMETERS SIXPORT 1 14

TABLE 1 IDEAL LENGTH FOR AIRLINES TO CALIBRATE DUAL

SIXPORT WITH WAVEGUIDE INSERTION POINT 17

TABLE 2 CONTENTS OF S MATRIX USED TO STORE ADAPTER

EVALUATION RESULTS 21

IV
MEASUREMENT OF ADAPTER LOSS , MISMATCH, AND EFFICIENCY USING THE

DUAL SIX-PORT

George J. Counas and Bill C. Yates

National Bureau of Standards

Boulder, Colorado 80303-3328

A noise measurement system is being developed for the U. S.

Air Force which uses coaxial cryogenic and ambient noise

temperature standards to determine the noise temperature of the

device under test. When the device under test has a different

connector than those on the noise standards, an adapter has to be

used. Adapter loss and complex reflection coefficients must be

compensated for or noise measurement accuracy is affected. A

technique has been developed which uses a dual six-port

measurment system to determine the mismatch, loss, and ultimately

the efficiency of the adapter used. This enables correction of

measurement results and allows measurements to be made with an

adapter with no degradation of accuracy.

This report describes this method of evaluating adapters and

provides instructions for its use.

Key words: adapter parameters, dual six-port measurement syster,

efficiency, loss, measurement technique, mismatch.

1
I . INTRODUCTION

A noise measurement system is being developed at the

Boulder Laboratories of the National Bureau of Standards for use

by the Metrology Engineering Section at Newark Air Force Station.

This system has accented the need for a reliable method of

evaluating adapter input and output reflection coefficient, loss,

and efficiency. A technique has been developed and tested which

uses the dual six-port measurement system to ascertain these

parameters. This technique requires calibrating the dual sixport system without adapters and then calibrating it again with

adapters attached to the two measurement ports. Reflection

coefficients and losses of the adapters on six-ports 1 and 2

are then calculated using the calibration results. After one

further measurement which involves connecting the device under

test to the adapter and determining the input reflection

coefficient of this device, the efficiency of the combination can

be calculated. If the device under test and adapter combination

are left intact after this determination, an accurate correction

for the the adapter can be made. In the following discussion,

the adapter evaluation technique using the dual six-port

measurement system is explained in simple terms. A detailed

mathematical analysis of this technique is beyond the scope of

this report. The main purpose of this report is to explain its

function and use.

II. EQUIPMENT USED

The radiometer under developement is a complex multiband

system. For simplicity, only the X-band front of this system is

shown in Figure 1 which is a block diagram of this portion of the

2
7. ISOLATOR

8. HARMONIC FILTER

9. MIXER

10. LOCAL OSCILLATOR

11. AMPLIFIER

12. RADIOMETER

SIMPLIFIED BLOCK DIAGRAM

X BAND FRONT END AND RADIOMETER

FIGURE 1

3
radiometer. The insertion point of this portion of the system is

coaxial, but by using the evaluation technique described above,

the loss, reflection coefficient, and efficiency of an X-band

waveguide to coax adapter could be determined and the system then

used to calibrate waveguide noise sources. See figure 2 for a

typical noise measurement setup. Note that the two standards are

coaxial and that the device under test is waveguide. Since the

complex reflection coefficients and loss of the waveguide to coax

adapter can be determined, the measurement can be made with very

little degradation in accuracy. In a similar fashion,

correction can be made for coaxial adapters used to connect a device under test with a different connector type than the one on

the standards.

Figure 3 shows a typical setup for evaluating waveguide to

coaxial adapters. The top portion of the figure shows the

calibration system with no adapters while the bottom portion

details the setup for measuring the loss and reflection

coefficient of a waveguide to coax adapter. The two bends are

used to eliminate any moding problems encountered when

calibration standards are connected directly to the adapters.

Short straight sections would do just as well but the bends were

used to keep the insertion distance as short as possible and

compensate for the right angle connections on the adapters.

The standards used to calibrate waveguide are the same as

those used to calibrate coax except that in place of the open

circuit calibration standards, quarter wave short circuits are

used. These quarter wave short circuits need not be cut for the

precise frequency of measurement. They should, however, be

4
AMO. STD.

MEASUREMENT SETUP USING WAVEGUIDE TO COAX ADAPT.

FIGURE 2

SOURCE

5
USE COAXIAL STANDARDS

\\ CALIBRATION POINT ( WAVEGUIDE FLANGES ) USE WAVEGUIDE STANDARDS

MEASUREMENT SETUP FOR WAVEGUIDE TO COAX ADAPTER

FIGURE 3

6
bolted in place when in use. Also the calibration airline is

replaced by a waveguide straight section which ideally is of the

length to cause a 90 degree phase shift. Table 1 (page 17) shows

the ideal length for airlines at frequencies in the WR-284, WR187, WR-137 , and WR-90 waveguide sizes. The 90 degree column is

the optimum length for a 90 degree airline. However,

especially at higher frequencies, this length is shorter than

practical. A workable airline can be achieved by adding to the

90 degree length, a length equivalent to 180 degrees until the

desired length is obtained. The 180 degree column shows the

length to add.

III. SOFTWARE

The software developed for adapter evaluation is modeled

from a technique described by Glenn F. Engen in 1974 [1] and

implemented by Ramon Jesch using an automatic network analyzer

and power measurement system in 1977 [2].

The technique uses the following:

Sll= (b 1 -b) / ( a-b ' c) (1)

S22= (a 1 c-ac ' ) / (a-b ' c) (2)

S12 A 2= (a ' -be 1 ) / (a-b ' c) + S11S22 (3)

where Sll and S22 are the complex reflection coefficients at each

end of the adapter being measured and S12 is the transmission

coefficient of the adapter from port 1 to port 2. The complex

parameters a, b, and c are obtained by calibrating the six-ports

without the adapters and a', b', and c'are obtained by

calibrating the six-ports with the adapters in place. Figure 3

is a block diagram showing the measurement of a waveguide to coax

adapter pair. The loss and reflection coefficient of each

7
adapter is obtained. a', b', and c

# are not independent of a, b,

and c. Some variables are obtained and stored during the

calibration without the adapters and used to compute a', b', and

c' with the adapters. These variables are computed in the

"Iparab" and "Fparab" subprograms and are designated Zeta, Rho,

Wl, Re(W2), and IM(W2) in lines 5293 through 5298 of the adapter

measurement program. The adapter measurement program is a modified version of the calibration program " CALBR" . The

modifications are mainly changes in program flow and include the

addition of Subprograms "Gamma" and "FNAdpll". These subprograms

provide for the calculation of scattering coefficients and

efficiency of the adapters on the two six-ports by using the

following in addition to (1), (2), and (3):

Alpha 120=S12mA 2/ (l-SllmA 2) (4)

Alpha 2 10=S2 lmA 2/ ( l-S22mA

2

)

(5)

where Slim, S22m, S12m, and S21m are scattering coefficient

magnitudes for the adapter determined by using (1) , (2) , and (3)

Alpha 120 and Alpha 210 are loss coefficients for the adapter

from port 1 to 2 and port 2 to 1 respectively. Input power times

the loss coefficient equals the output power.

G1=S11 + (S12*S21*Gx)/ (l-S22*Gx) (6)

where G1 is the calculated complex reflection coefficient of the

device under test and adapter combination, and Gx is the complex

^.nput reflection coefficient of the device under test as measured

from the adapter.

Alpha 12= ( l-GxmA

2

) *S12mA

2 ) / ( ( l-GlmA

2

) * [ 1-S22GX] A 2 ) (7)

where Alpha 12 represents the efficiency of the device under test

and adapter combination and Gxm, S12m, Glm, and [1-S22GX] are

8
magnitudes of previously determined quantities. The quantity

Alpha 12 is the correction factor for the adapter. Divide the

measured noise temperature by this factor if the adapter is on

the device under test; Multiply by this factor if the adapter is

on the standard.

For convenience, listings of these subprograms are included in

APPENDIX I of this report. The current version of the complete

adapter measurement program has been named "ADPM5"

IV. MAKING A MEASUREMENT

A. GENERAL OVERVIEW OF THE MEASUREMENT PROCESS

The operator will find little difference between using this

program and the software (PROGRAM "CALBR" ) furnished with the

six-port measurement system. Program flow has been modified so

that two calibrations are performed instead of one and a measurement of the device under test attached to the selected

adapter is made. An additional store and print segment has been

added to print adapter parameters and save them for use later.

A flow diagram describing the operation of program "ADPM5"

is shown in Figure 4. As can be seen in the figure, calibration

frequencies and other calibration parameters are input. Then,

calibration of the dual six-port measurement system is performed

first without the adapters under test, and then with the

adapters. Finally, after the two calibrations, the device under

test is attached to the desired adapter and measured. The power

data obtained from the three operations is processed and the

losses, reflection coefficients, and efficiencies of the adapters

on both six ports are calculated and stored.

A log of data collected from calibration of the six-port:.

9
RJNCTIONAL PLOW CHART

FOR

ADAPTER MEASUREMENT

PROGRAM

FIGURE 4
hould be maintained. Figure 5 is a sample data log showing the

ata stored in one adapter evaluation. The program storage is

r ranged so that the files shown are overwritten if a new

valuation is made. Permanent storage of calibration results is

rovided in user named files if this is desired. The prompt: "DO

OU WANT TO SAVE SYSTEM PARAMETER DATA ON MASS STORAGE —Y/N" is

isplayed at the end of each calibration sequence. A yes answer

s followed by prompts asking for file names desired and for a

lisc to be placed in the correct disc drive. A no answer exits

:he routine and program execution continues.

J. DATA STORAGE AND USE

The first functions performed during program execution are

calibrations of the six-ports with and without adapter. The

results of the calibrations are stored in the power matrix files

designated with a prefix of PWRH and PWRD. A number is added to

this prefix to provide identification for the file. PWRH1

contains header information and describes the data file PWRD1

which contains the power data from the first calibration (without

the adapters) . After calibration, the power data is processed

and file CRST1 is created. This file contains the results of the

first calibration. The second calibration (with adapters) is now

made and files PWRH2 , PWRD2 , and CRST2 are created and filled.

After the calibrations, a device under test (usually a noise

source with one output port is connected to the appropriate

adapter and measured. Power data from this measurement is stored

in file 1PRD3 which is described by header file 1PRH3 . After the

measurement of the device under test, Subprogram "Gamma"

automatically accesses the correct files and computes, display:;.

11
DATE CONN TYPE

850731

850731

TIME FREQ

GHZ

DATA

FILE NAMES

DESCRIPTION

1722 3 PWRH1

PWRD1

CRST1

1744 3 PWRH2

PWRD2

CRST2

SYSTEM CAL NO ADPT . N

HEADER INFO

POWER MATRIX

RESULT MATRIX

ADAPTER ON SIX-PORT N

HEADER INFO

POWER MATRIX

RESULT MATRIX

D.U.T. ON ADPT.

1PRH3 HEADER INFO ( D . U . T . )

1PRD3 POWER MATRIX (D.U.T.)

CRST3 MODIFIED RESULT FOR ADPT.

AD-1 ALL ADAPTER SCATTERING

PARAMETERS, LOSS, AND

EFFICIENCY

SAMPLE DATA LOG FOR USE WITH ADAPTER PROGRAM

FIGURE 5

12
and stores the reflection coefficients for the device under

test--adapter combination. Subprogram " FNAdpt " then

automatically retrieves data and calculates scattering

coefficients, loss, and efficiency of the adapter. This data is

stored in file AD-1 in the S matrix. A list of the contents of

this matrix is found in Table 2 which is intended to be an aid in

data retrieval. This data will be used to correct the noise

temperature of the device under test for adapter error.

Figure 6 is a sample printout from the final phase of the

program and details the loss and reflection coefficient of the

adapters on both six-ports. The adapters used here were Type N

male to female adapters.

C. RUNNING THE PROGRAM

Load n ADPM5" and press run.

As the program is run, prompts displayed on the screen lead

the operator through required operations step by step.

1. The first prompt asks for the input option.

1) Start, stop, and step list

2) Type in list

5) Exit

Answer with the appropriate response (usually 1)

2. The second prompt asks:

Input six-port option

1) <=2GHZ 6-port

2) >=2ghz 6-port

Answer with the appropriate response.

3. The third prompt asks for frequency input as specified by

options 1 or 2

13
FILES PR0CESSED=CRST5 AND CRST6

FREQUENCY= 7GHZ

ADAPTOR LOSS AT 6 PORT NUMBER 1

SYSTEM CONSTANTS

A8 , A9 , B8 , B9 , C8 , C9

A1 / A2 / B1 / B2,C1,C2 .36931454192

-1.758488244E-02 -.250158691953

ADAPTER CONSTANTS

A8 ^9 , 38 ^9 , 08,09

.20671621467

7.2367883E— 02

-6 . 4 02 56E-02

-3 . 36437E-02

-.418296616

-.259555044

A1,A2,B1,B2,C1,C2 -6 . 402565E-02

-4 . 721805E-02 -3 . 3 64 37 6E-02

S12m,S12a,S12r / S12a

.98546034012 -68.400123

IMPEDANCE DATA FOR ADAPTER PM SIXSll MAGNITUDE Sll ANGLE

. 1030

S22 MAGNITUDE

. 1017

-119.84

S22 ANGLE

162 . 6897

LOSS DATA FOR ADAPTER ON SIX-PORT

ALPHA 12 LOSS DB

.9815 .0809

. 53012308

-.41825661

-.25955504

.36277018

•PORT #1

Sll REAL

-.0513

S22 REAL

-.0971

1

ALPHA 21

.9813

SAMPLE PRINTOUT OF ADAPTER PARAMETERS SIXFIGURE 6

. 525670491353

4 . 721305E-02

. 53012307

-.9162586

Sll IMAGINARY

-.0893

S22 IMAGINARY

. 0303

LOSS DB

. 0820

PORT 1

14
4. After the frequecies desired are entered, the fourth prompt

5.

6 .

7.

asks

Enter options for next operation

1) Input frequency

2) Determine system parameters without power standard

3) Measure 1-port on adapter

4) Evaluate Adapters

5) Exit

A response of 1 returns to the frequency input section of

the program. A response of 2 is the normal input for a calibration sequence. A response of 3 is given only after

both calibration have been performed . A response of 4 is

given after both calibrations and the measurement of the

one port device.

(This segment of the program is returned to after each task

is accomplished and the program proceeds in response to the

answers to the prompts)

The fifth prompt:

Turn on amplifiers Press continue when ready

The sixth prompt:

Enter connector type option

1) 14mm, 7mm, or waveguide

2) Type N male adapter on 6-port 1

3) Type N Female adapter on 6-port 1

4) Other, not available at present

Enter the desired response.

The seventh prompt asks for connection of shorts, opens,

a measurement with system ports connected, a 2-port, n . 1

15
airline with measurements being made on each device and

the powers stored at the end of the sequence in a PWRD1 or

PWRD2 file. After the first calibration, prompt 4 above is

again displayed, and the program execution is repeated from

that point until the two calibrations are completed.

When the second calibration is completed, prompt 4

is again displayed. This time answer with 3. This causes

the program to access the measurement routines. Place the

device under test on the appropriate adapter and continue

program execution.

After the device under test is measured, prompt 4 is

again displayed. This time answer the prompt with 4. This

causes the program to automatically process the stored data

and print and store the adapter evaluation data. When this

has been accomplished, prompt 4 is again displayed. This

time the correct response is 5. The beginning of the program

is now accessed and measurements are complete. Press stop

if no further measurements are desired.

The accuracy of the results obtained by this technique

depends on a variety of factors. One way to evaluate

systematic error is to perform the above tasks without

inserting an adaptor. The varience of efficiency from unity

is a measure of this error. This varience is usually less

than .002.

16
TABLE 1

IDEAL LENGTH FOR AIRLINES TO CALIBRATE DUAL SIXPORT

WITH WAVEGUIDE INSERTION POINT

WR-284 WAVEGUIDE

FREQUENCY GHZ GUIDE WAVELENGTH

INCHES

IDEAL AIRLINE

INCHES

90 DEG 180 DEG

2 .

6

7 . 55 1.89 3 .78

2 .

6 . 85 1.71 3 .43

2 .

8

6.29 1.57 3 . 15

2 .

9

5.83 1.46 2 . 92

3 .

5 .45 1.36 2 . 73

3 .

5 . 13 1.28 2 . 57

3 .

4 . 85 1.21 2 .43

3 .

4 . 60 1.15 2 .30

3 .

4 .39 1.10 2 .20

3 .

5

4 . 19 1.05 2 . 10

3 .

6

4 . 02 1.00 2 . 01

3.7 3 .85 0 .96 1.93

3 .

8

3 .71 0.93 1.86

3 .

9

3 . 57 0.89 1.79

3 .95 3 .51 0.88 1.76

WR187 WAVEGUIDE

FREQUENCY GHZ GUIDE WAVELENGTH

INCHES

IDEAL AIRLINE

INCHES

90 DEG 180 DEG

4 .

4 . 79 1.20 2 .40

4 .

4 . 50 1 . 13 2 .25

4 .

4 .25 1.06 2 . 13

4 .

4 . 04 1.01 2 . 02

4 .

3 . 84 0 .96 1.92

4 .

5

3 . 68 0.92 1.84

4 .

3 . 52 0.88 1.76

4 .

3 .39 0 .85 1.70

4 .

8

3 .26 0.82 1.63

4 .

9

3 . 15 0.79 1.58

17
TABLE 1 (CONTINUED)

WR187 WAVEGUIDE (CONT)

FREQUENCY GHZ GUIDE WAVELENGTH IDEAL AIRLINE

INCHES INCHES

9 0 DEG 180 DEG

5.0 3 . 04 0.76 1.52

5.1 2.94 0.74 1.47

5.2 2.85 0.71 1.43

5.3 2 . 77 0.69 1.39

5.4 2 . 69 0.67 1.35

5.5 2 . 62 0.65 1.31

5.6 2 . 55 0.64 1.28

5.7 2 . 49 0.62 1.25

5.8 2.42 0.61 1.21

5.85 2 . 39 0.60 1.20

WR137 WAVEGUIDE

FREQUENCY GHZ GUIDE WAVELENGTH IDEAL AIRLINE

INCHES INCHES

9 0 DEG 180 DEG

5.9 2 . 92 0.73 1.46

6.0 2 . 82 0.71 1.41

6.1 2 .73 0.68 1.36

6.2 2 . 64 0.66 1.32

6.3 2 . 56 0.64 1.28

6.4 2 . 49 0.62 1.25

6.5 2 .42 0.61 1.21

6.6 2 .36 0.59 1.18

6.7 2 .30 0.57 1.15

6.8 2.24 0.56 1.12

6.9 2 . 19 0.55 1.09

7.0 2 . 14 0.53 1.07

7 .

2 . 09 0.52 1.04

7.2 2 . 04 0.51 1.02

7 .

2 . 00 0.50 1.00

7.4 1.96 0.49 0.98

7.5 1.92 0.48 0.96

7 .

6

1.88 0.47 0.94

7 .

1.85 0.46 0.92

7.8 1.81 0.45 0 .91

7.9 1.78 0.45 0.89

8.0 1.75 0.44 0.87

8 .

1.72 0.43 0.86

8 .

1.69 0.42 0.85

18
TABLE 1 (CONTINUED)

WR9 0 WAVEGUIDE

FREQUENCY GHZ

8 . 2

8 .

8 .

8 .

5

8 . 6

8 . 7

8 . 8

8 .

9

9 . 0

9.1

9 .

9 .

9.4

9 . 5

9 . 6

9 . 7

9 . 8

9 .

9

10 .

10.1

10.2

10.3

10.4

10.5

10.6

10 .

10.8

10.9

11.0

11.1

11.2

11.3

11.4

11.5

11.6

11.7

11.8

GUIDE WAVELENGTH

INCHES

2 .40

2 . 32

2 .25

2 . 18

2 . 12

2.06

2 . 01

1.96

1.91

1.87

1.83

1.79

1.75

1.72

1.68

1.65

1.62

1.59

1.56

1.54

1.51

1.49

1.46

1.44

1.42

1.40

1.38

1.36

1.34

1.32

1.30

1.28

1.27

1.25

1.23

1.22

1.20

IDEAL AIRLINE

INCHES

9 0 DEG 180 DEG

0.60 1.20

0.58 1.16

0.56 1.12

0 . 55 1.09

0.53 1.06

0.52 1.03

0.50 1.01

0.49 0.98

0 .48 0.96

0.47 0.94

0.46 0.91

0.45 0.89

0.44 0.88

0.43 0.86

0.42 0.84

0.41 0.83

0.41 0.81

0 .40 0.80

0.39 0 .78

0 .38 0.77

0.38 0.76

0 . 37 0 .74

0.37 0.73

0.36 0.72

0.35 0.71

0.35 0.70

0.34 0.69

0.34 0.68

0.33 0 . 67

0.33 0.66

0.32 0.65

0.32 0.64

0.32 0.63

0.31 0.62

0.31 0.62

0.30 0.61

0.30 0.60

19
TABLE 1 (CONTINUED)

WR90 WAVEGUIDE (CONT)

FREQUENCY GHZ GUIDE WAVELENGTH

INCHES

IDEAL AIRLINE

INCHES

90 DEG 180 DEG

11.9 1.19 0.30 0.59

12 .1.17 0.29 0.59

12 .1.16 0.29 0.58

12 .

1.15 0.29 0.57

12 .

1.13 0.28 0.57

12.4 1.12 0.28 0.56

20
TABLE 2

CONTENTS OF S MATRIX USED TO STORE ADAPTER EVALUATION RESULTS

MATRIX ELEMENT DESCRIPTION

ADAPTER ON SIX-PORT ONE

S ( F , 1

)

S ( F , 2 ) S ( F , 3 ) S(F,4)

S ( F , 5

)

S (F, 6)

S (F , 7

)

S ( F , 8 ) S ( F , 9 ) S ( F , 10

)

S (F, 11)

S (F , 12 ) S(F,13)

S ( F , 14

)

S ( F , 15

)

S ( F

,

16 ) S ( F , 17 )

Sll MAGNITUDE

Sll PHASE

Sll REAL PART

511 IMAGINARY PART

ALPHA 12

S22 MAGNITUDE

S22 PHASE

S22 REAL PART

S22 IMAGINARY PART

ALPHA 21

5 12 MAGNITUDE

S21 MAGNITUDE

REFL. COEFF. OF D.U.T. AND ADAPT.

REFL. COEFF. ANGLE OF D.U.T. AND ADPT.

REAL PART OF S(F,14)

IMAGINARY PART OF S(F,14)

EFFICIENCY OF ADAPTER

ADAPTER ON SIX-PORT TWO

S (F, 18)

S ( F , 19 ) S (F, 20)

S ( F , 2 1

)

S (F, 22)

Sll MAGNITUDE

Sll PHASE

Sll REAL PART

Sll IMAGINARY PART

ALPHA 12

S (F, 23)

S ( F , 24

)

S(F,25)

S (F, 26)

S (F, 27)

S (F, 28)

S (F, 29)

S (F, 30)

S (F, 31)

S (F, 32)

S (F, 33)

S ( F , 3 4 )

S22 MAGNITUDE

S22 PHASE

S22 REAL PART

S22 IMAGINARY PART

ALPHA 21

S12 MAGNITUDE

S21 MAGNITUDE

REFL. COEF. OF D.U.T. AND ADPT.

REFL. COEF. PHASE OF D.U.T. AND ADPT.

REAL PART OF S(F,30)

IMAGINARY PART OF S(F,30)

EFFICIENCY OF ADAPTER

NOTE: THE F IN THE MATRIX IDENTIFIER REFERS TO THE FREQUENCY

NUMBER.

21
V. REFERENCES

[1] Engen, Glenn F. Calibration Techniques for Automatic Network

Analyzers with Application to Adapter Evaluation; IEEE Transactions

on Microwave Theory and Techniques; Vol MT-22, No. 12; December 1974.

[2] Jesch Ramon C. Evaluation of Low-Loss/Low Reflection Two-Port

Devices or Adapters by Automated Measurement Techniques; NBSIR 78-870;

1977.

VI . ACKNOWLEDGMENTS

The authors wish to acknowledge the technical assistance and

support by Bill Daywitt and John Juroshek and the financial support

rendered by the Metrology Engineering Section of Newark Air Force

Station.

22
APPENDIX I

LISTING OF ADAPTER PARAMETER CALCULATING SUBPROGRAM "FNAdp"

6470 DEF FNAdp (Nfreqs, Repeats, Ml, PI, M2, P2,CA$)

6480 !Calc Parameters for Adapter from 6-Port Measurements 850805

6490 OPTION BASE 1

6500 Msus$=" :F8, 1"

6510 DIM Result (Nfreqs, 60) , Freqs (Nfreqs) , Id_content$ [ 80 ]

, S (Nfreqs , 34

)

6521 K=0

6570 ! LINPUT "ENTER FILE NAME FOR DATA WITHOUT ADAPTER" ;N1$

6580 FIXED 0

6590 ! LINPUT"ENTER FILE NAME FOR DATA WITH ADAPTER" ;N2$

6620 N1$="CRST1"

6630 N2$="CRST3

6640 CALL Redhed (Nl$ , Msus$ , Date$ , Time$ , Typ$ , Nfreqs , Freqs (*)

,

Repeats, Sp, Std_mnt , Id_contents$ , Cnnct$)

6650 MASS STORAGE IS ":F8,1"

6660 PRINTER IS 16

6670 PRINT "START OF FNADPT"

6680 Nfreq=N=Nfreqs

6690 PRINT

6700 PRINT

6710$Sport=l

6720 PRINTER MS 0

6721 PRINT

6724 PRINT "ADAPTER EVALUATION"

6725 PRINT" — »

23
6727 PRINT

6730 PRINT "FILES PROCESSED=" ;N1$ ; " AND " ; N2$

6740 PRINT

6750 N1=INT(N1)

6760 N2=INT(N2)

6770 PRINTER IS 16

6780 FOR P=1 to Nfreqs

6790 FOR Prt=l to 2

6800 PRINTER IS 16

6810 ON Prt GOTO 6820,6850

6320 CALL Redwrt (N2$ , " : F8 , 1" , " ", Result (*), Nfreqs)

6830 Nfreq=l

6840 GOTO 6870

6850 CALL Redwrt (N2$, " :F8, 1" , " " .Result (*), Nfreqs)

6860 NORMAL

6870 ON Sport GOTO 6880,6900

6880 Mc=0

6890 GoTo 6910

6900 Mc=12

6910 A8=Result (P, 6+Mc)

6920 A9=Result (P, 7+Mc)

6930 B8=Result (P, 8+Mc)

6940 B9=Result (P, 9+Mc)

6950 C8=Result (P, 10+Mc)

6960 C9=Result(P, 11+Mc)

6980 GOTO 6990

6990 All (Prt) =A8

7000 A22 (Prt) =A9

24
7010 Bll (Prt) =B8

7020 B22 (Prt) =B9

7030 Cll (Prt) =C8

7040 C22 (Prt) =C9

7050 ON Prt GOTO 7060,7140

7060 FIXED 4

7061 PRINTER IS 16

7070 PRINT "FREQUENCY = " ;Freqs (P) ; " GHZ"

7080 PRINT

7090 PRINT "ADAPTER LOSS AT 6 PORT NUMBER ";Sport

7100 PRINT

7110 PRINT "SYSTEM CONSTANTS"

7120 PRINT

7130 GO TO 7180

7140 PRINT

7150 PRINTER IS 16

7160 PRINT "ADAPTER CONSTANTS"

7170 PRINT

7180 FIXED 4

7190 PRINT "A8,A9,B8,B9,C8,C9"

7200 PRINT A8 , A9 , B8 , B9 , C8 , C9

7210 PRINT

7220 PRINT "A1,A2,B1, B2 , Cl , Cl" ; All (Prt ) ,A22 (Prt) ,Bll(Prt)

,

B22 (Prt) , Cll (Prt) ,C22 (Prt)

7230 PRINT

7240 NEXT Prt

7250 !

25
7260 l Sll=(b'-b) /(a-b'c)

7270 !

7280!

7290 Z1=B11 ( 2

)

7300 Z2=B22(2)

7310 Z3=B11 ( 1)

7320 Z4=B22 ( 1)

7330 CALL Csua (Z1 , Z2 , Z3 , Z4 , Z9 , Z0)

7340 Nr=Z9

7350 Ni=Z0

7360 Z3=C11 ( 1)

7370 Z4=C22 ( 1

)

7380 CALL Cmua (Z1 , Z2 , Z3 , Z4 , Z9 , Z0)

7390 Z3=Z9

7400 Z4=Z0

7410 Z1=A11 ( 1)

7420 Z2=A22 (1)

7430 CALL Csua (Z1 , Z2 , Z3 , Z4 , Z9 , Z0)

7440 Zl=Nr

7450 Z2=Ni

7460 Z3=Z9

7470 Z4=Z0

7480 CALL Cdia (Z1 , Z2 , Z3 , Z4 , Z9 , ZO)

7490 Sllr=Z9

7500 Slli=Z0

7510 X=Z9

7520 Y=Z0

7530 CALL CRPA (X, Y , R, T)

26
7540 PRINT

7550 S 1 1M=R

7560 Slla=T

7570!

7580! S22= (a ' c-ac ' ) / (a-b ' c)

7590!

7600!

7610 Z1=A11(2)

7620 Z2=A22 ( 2

)

7630 Z3=C11 ( 1)

7640 Z4=C22 ( 1)

7650 CALL Cmua (Zl, Z2 , Z3 , Z4 , Z9 , Z0)

7660 Mr=Z9

7670 Mi=Z0

7680 Z1=A11 ( 1)

7690 Z2=A22 ( 1)

7700 Z3=C11 (2

)

7710 Z4=C22 (2

7720 CALL Cmua (Z1 , Z2 , Z3 , Z4 , Z9 , Z0)

7730 Zl=Mr

7740 Z2=Mi

7750 Z3=Z9

7760 Z4=Z0

7770 CALL Csua ( Z1 , Z2 , Z3 , Z4 , Z9 , Z0)

7780 Mr=Z9

7790 Mi=Z0

7800 Z1=B11 ( 2

)

27
7810 Z2=B22(2)

7820 Z3=C11 ( 1)

7830 Z4=C22 ( 1)

7840 CALL Cmua (Z1 , Z2 , Z3 , Z4 , Z9 , Z0)

7850 Z3=Z9

7860 Z4=Z0

7870 Z1=A11(1)

7880 Z2=A22 ( 1)

7890 CALL Csua (Z1 , Z2 , Z3 , Z4 , Z9 , ZO)

7900 Z3=Z9

7910 Z4=Z0

7920 Zl=Mr

7930 Z2=Mi

7940 CALL Cdia (Z1,Z2,Z3,Z4,Z9,Z0)

7950 S22r=Z9

7960 S22 i=Z0

7970 X=Z9

7980 Y=Z0

7990 CALL Crpa (X, Y , R, T)

8000 S22M=R

8010 S22a=T

8020!

8030 !S12 A 2=(a' -be ' ) / (a-b ' c) +S11*S22

8040 ! 8050!

8060 Z3=C11 (2

)

8070 Z4=C22 (2

8080 Z1=B11(1)

28
8090 Z2=B22 ( 1)

8100 CALL Cmua (Zl, Z2 , Z3 , Z4 , Z9 , Z0)

8110 Z1=A11 ( 2

)

8120 Z2=A22 ( 2

)

8130 Z3=Z9

8140 Z4=Z0

8150 CALL Csua(Zl,Z2,Z3,Z4,Z9,Z0)

8160 Mr=Z9

8170 Mi=Z0

8180 Z 1=B11 ( 2

)

8190 Z2=B2 2(2)

8200 Z3=C11 ( 1)

8210 Z4=C22 ( 1)

8220 CALL Cmua (Zl, Z2 , Z3 , Z4 , Z9 , Z0)

8230 Z1=A11 ( 1)

8240 Z2=A22 ( 1)

8250 Z3=Z9

8260 Z4=Z0

8270 CALL Cmua (Zl , Z2 , Z3 , Z4 , Z9 , Z0)

8280 Zl=Mr

8290 Z2=Mi

8300 Z3=Z9

8310 Z4=Z0

8320 CALL Cdia (Zl , Z2 , Z3 , Z4 , Z9 , Z0)

8330 Mr=Z9

8340 Mi=Z0

8350 Zl=Sllr

29
8360 Z2=Slli

8370 Z3=S22r

8380 Z4=S22i

8390 CALL Cmua (Z1 , Z2 , Z3 , Z4 , Z9 , Z0)

8400 Z1=Z9

8410 Z2=Z0

8420 Z3=Mr

8430 Z4=Mi

8440 CALL Cada (Z1,Z2,Z3,Z4,Z9,Z0)

8450 Z1=Z9

8460 Z2=Z0

8470 CALL Csqra (Z1,Z2,Z9,Z0)

8480 S12r=Z9

8490 S12i=Z0

8500 S12m=SQR(Z9 A 2+Z0 A 2)

8510 S 1 2 a=ATN (S12i/S12r) *18 0/PI

8520 PRINT "S12m,S12a,S12r,S12i"

8530

8540

PRINT S12m, S12a,S12r,S12i

i

8550 [ *****************************************************************

8560 ! Alpha 210=(S21m) A 2/ (l~S22mA 2)

8570 ! Alpha 12 0=(S21m) A 2/ ( l-SllmA 2

)

8580!******************************************************************

8590 A120=S12mA 2/ ( l-SllmA 2

)

8600 A210=S12iaA 2/(l-S22mA 2)

8610 Dbl20=10*LGT (A120)

8620 Db210=10*LGT (A210)

8630 PRINTER IS 16

30
8640 PRINT

8650 FIXED 0

8660 PRINTER IS 0

8680 PRINT

8690 PRINT "REFLECTION COEFFICIENTS FOR ADAPTER ON SIX-PORT #";Spor

8691 FIXED 2

8700 PRINT

8701 PRINT"FREQUENCY";Freqs(P) ;"GHZ"

8702 PRINT

8710 PRINT "Sll MAGNITUDE Sll ANGLE Sll REAL Sll

IMAGINARY"

8720 PRINT " __________

8730 FIXED 4

8740 PRINT Slim, Slla, Sllr,Slli

8750 PRINT

8760 PRINT "S22 MAGNITUDE S22 ANGLE

IMAGINARY"

8770 PRINT " ____

S22 REAL S22

8780 PRINT S22m,S22a,S22r,S22i

8790 PRINT

8791 PRINT

8800 FIXED 0

8810 PRINT "LOSS DATA FOR ADAPTER ON SIX-PORT" ; SPORT

8820 PRINT "Alpha 12 LOSS DB Alpha 21

8830 PRINT"- —----—

31
8840 FIXED 4

8860 PRINT A120 , Dbl20 , A210 , Db210

8870 K=0

8880 PRINT

8900 NORMAL

8920 IF Sport =2 THEN K=17

8921 IF Sport=l THEN K=0

8930 S (P, K+l) =Sllm

8940 S (p, K+2) =Slla

8950 S (P, K+3 ) =Sllr

8960 S (P, K+4 ) =Slli

8970 S (P, K+5) =A120

8980 S(P,K+6)=S22m

8990 S (P,K+7)=S22a

9000 S (P,K+8)=S22r

9010 S ( P , K+ 9

) =S 2 2

9020 S (P, K+10) =A120

9030 S(P,K+ll)=S12m

9040 S (P, K+12 ) =S2 1m

9050![ *****************************************************

9060 PRINTER IS 16

9070!! THE FOLLOWING CODE EXISTS TO CALCULATE EFFICIENCY OF

ADAPTER AND D.U.T.

9080 i

9090

9100

9110

|

! G1=S11+ (S12*S21*Gx) / ( l-S22*Gx)

1

9111 ON Sport GOTO 9120 9132

32
9120 R=Gxm (Sport) =M1

9130 T=Gxa (Sport) =P1

9140 CALL Cpra(R,T,X,Y)

9150 Gxr (Sport) =X

9160 Gxi (Sport) =Y

9210 Zl=Z3=S12r

9220 Z2=Z4=S12

9230 CALL Cmua (Z1 , Z2 , Z3 , Z4 , Z9 , Z0)

9240 Z1=Z9

9250 Z2=Z0

9260 Z3=Gxr

9270 Z4=Gxi

9280 CALL Cmua (Z1 , Z2 , Z3 , Z4 , Z9 , Z0)

9290 Nur=Z9

9300 Nui=Z0

9310 PRINT Nur, Nui,Z9,Z0

9320 Zl=S22r

9330 Z2=S22i

9340 Z3=Gxm( Sport)

9350 Z4=0

9360 CALL Cmua (Zl, Z2 , Z3 , Z4 , Z9 , Z0)

9370 PRINT "S22GX"

9380 PRINT Z9,Z0

9390 Zl=l

9400 Z 2=0

9410 Z3=Z9

9420 Z4=Z0

33
9430 CALL Csua (Z1 , Z2 , Z3 , Z4 , Z9 , Z0)

9440 PRINT "1-S22GX",Z9,Z0

9450 Zl=Nur

9460 Z2=Nui

9470 Z3=Z9

9480 Z4=Z0

9490 Magl=SQR(Z9 A 2+Z0 A 2) A 2

9500 CALL Cdia (Z1,Z2,Z3,Z4,Z9,Z0)

9510 Zl=S21r

9520 Z2=S2 li

9530 PRINT "S11R, Sill"; Sllr,Slli

9550 Z3=Z9

9560 Z4=Z

9570 CALL Cada (Z1 , Z2 , Z3 , Z4 , Z9 , Z0)

9580 Glr=Z9

9590 Gli=Z0

9600!

9610! ! 9620! Alphal2= [

( l-GxmA

2

) *S12mA 2 ]/ [ l-GlmA 2* ( l-S22Gx)

A 2

]

9630!

9660 Magn=(l-GxmA 2) *S12mA 2)

9670 Glm=SQR(GlrA 2+Gli A 2) A 2

9680 X=Glr

9690 Y=Gli

9700 CALL Crpa (X, Y,R,T)

9710 Gla=T

9720 Magd= ( 1-Glm) *Magl

9730 Alphal2=Magn/Magd

34
9740

9750

9760

9770

9780

9790

9801

9805

9806

9807

9808

9810

9920

9830

9840

9850

9860

9861

9890

9900

9910

9920

9930

9940

9950

9951

9952

A12=Alphal2

PRINTER IS 16

PRINT "Glm, Gla , Glr, Gli"

Print SQR(Glm) ,Gla,Glr,Gli

PRINT "Gxm,Gxa,Gxr,Gxi"

PRINT Gxm (Sport) ,Gxa (Sport) , Gxr (Sport) ,Gxi (Sport)

PRINTER IS 0

PRINT "EFFICIENCY OF ADAPTER AND DEVICE COMBINATION" ?A12

PRINT

PRINT

PRINTER IS 16

IF Sport=l then GOTO 9830

GO TO 9900

S (P, K+13 ) =Gxm (Sport)

S ( P , K+ 14 ) =Gxa ( Sport

)

S (P,K+15)=Gxr (Sport)

S(P,K+16)=Gxi (Sport)

S (P,K+17)=A12

GOTO 9940

S (P, K+13 )=Gxm (Sport)

S (P, K+14 ) =Gxa (Sport)

S(P / K+15)=Gxi (Sport)

S (P, K+16) =Gxr (Sport)

Sport=Sport+l

if Sport=2 THEN GOTO 6790

PRINT PAGE

Sport=l

35
9955 NEXT P

9960 GOTO 9980

9970 PRINTER IS 16

9980 MASS STORAGE IS ":F8,1"

9990 FOR 1= ! TO 20

10000 NORMAL

10010 FIXED 0

10020 ASSIGN #1 TO "AD-" &VAL$ ( I )

, Check

10021 ASSIGN #1 TO *

10030 IF Check THEN Q$=VAL$(I)

10040 IF Check THEN 10060

10050 NEXT I

10060 CREATE "AD-"$Q$ , 2*Nfreqs

10070 ASSIGN #1 TO "AD-"&Q$

10080 PRINT #1;S (*)

10090 ASSIGN #1 TO *

10110 RETURN 0

10120 SUB Cmua (21, 22, 23, 24, 29, 20)

10130 29=21*23-22*24

10140 20+21*24+22*23

10150 SUBEXIT

10160 SUBEND

10170 SUB Cdia (21,22,23,24,29,20)

10180 26=23 A 2+24 A 2

10190 29= (21*23+22*24) /26

10200 20= (22 *23-21*24) /26

10210 SUBEXIT

10220 SUBEND

36
10230 SUB Cinva (Zl, Z2 , Z3 , Z4 , Z9 , Z0)

10240 Z6=Z1 A 2+Z2 A 2

10250 Z9=Z1/Z6

10260 Z0=Z2/Z6

10270 SUBEXIT

10280 SUBEND

10290 SUB Csqa (Z1 / Z2,Z3 / Z4,Z9,Z0)

10300 Z9=Z1*Z1-Z2*Z2

10310 Z0=2*Z1*Z2

10320 SUBEXIT

10330 SUBEND

10340 SUB Cada (Z1,Z2,Z3,Z4,Z9,Z0)

10350 Z9=Z1+Z3

10360 Z0=Z2+Z4

10370 SUBEXIT

10380 SUBEND

10390 SUB Csua (Z1,Z2,Z3,Z4,Z9,Z0)

10400 Z9=Z1-Z3

10410 Z0=Z2-Z4

10420 SUBEXIT

10430 SUBEND

10440 SUB Caba(Zl,Z2,Z9)

10450 Z9=SQR(Z1*Z1=Z2*Z2)

10460 SUBEXIT

10470 SUBEND

10480 SUB Csqra (Z1,Z2,Z9,Z0)

10490 X=Z1

37
10500 Y=Z2

10510 CALL Crpa(X, Y,R,T)

10520 R=SQR(R)

10530 T=T/2

10540 Z9=R*COS(PI*T/180)

10550 Z0=R*SIN(PI*T/180)

10560 GOTO 12570

10570 SUBEXIT

10580 SUBEND

10590 SUB Crpa (X, Y,R,T)

10600 r R=SQR (XA 2+YA

) 10610 IF X=0 THEN GO TO 10640

10620 T=ATN (Y/X)

10630 GO TO 10650

10640 T=PI*SGN(Y) /2

10650 T=T*180/PI

10660 IF X>=0 THEN 10710

10670 IF Y>=0 THEN 10700

10680 T=T~180

10690 GO TO 10710

10700 T=T+ 180

10710 SUBEXIT

10720 SUBEND

10730 SUB cmi<a<3i<!i(Zl,Z2 ,Z3 ,Z* ,Zb ,Z6 ,Z1 ,ZZ ,Z9 ,Z0)

10740 Z9=Z1*Z3-Z2*Z4+Z5*Z7-Z6*Z8)

10750 Z0=Z1*Z4-Z2*Z3+Z5*Z8+Z6*Z7)

10760 SUBEXIT

10770 SUBEND

38
10780

10790

10800

10810

10820

SUB Cpra (R, T, X, Y)

X=R8COS (PI*T/180)

Y=R*SIN(PI*T/180)

SUBEXIT

SUBEND

39
APPENDIX II

LISTING OF ADAPTER PARAMETER CALCULATING SUBPROGRAM "Gamma"

11300 SUB Gamma (Nfreqs, Repeats , Ca$)

11310 OPTION BASE 1

11320 DIM Power (Nfreqs , Repeats , 16 , 10) , Po (1 , 8) , Result (Nfreqs, 60)

Wrspt (2 , 12)

11330 FREAD " 1PRD& " 3 " & " : F8 # 1 " , Power ( *

)

11340 G=1

11350 PRINTER IS 16

11360 File$="CRST"&"2"

11370 FOR F=1 TO Nfreqs

11380 CALL Redwrt (File$ , "F8 , 1" , " ", Result (*) , Nfreqs)

11390 FOR J=1 TO 2

11400 FOR N=1 TO 12

11410 PRINTER IS 0

11420 Wrspt (J,N) =Result (F,N+ (J-l) *12)

11430 NEXT N

11440 NEXT J

11480 FOR Mnt=l to 8

11490 Po ( 1 ,Mnt+Inc) =Power (F, 1 , 1 ,Mnt+Inc)

11500 NEXT Mnt

11520 CALL Mg ( Po ( * )

, 1, 1, Wrspt (*) , "P" ,M1 , PI , Rl)

11530 CALL Mg ( Po ( * )

, 1 , 1 , Wrspt (*) , "P" ,M1, PI, R2)

11540 PRINTER IS 0

11550 PRINT "FREQ#" ,

11552 PRINT

40
11554 PRINT "DEVICE PLUS ADAPTER ON 6 -PORT 1"

11555 PRINT

11560 PRINT "GAMMA MAGNITUDE" , "GAMMA PHASE"

11561 PRINT " " , " "

11562 PRINT USING 11585;M1,P1

11563 PRINT

11564 PRINT "DEVICE PLUS ADAPTER ON 6 -PORT 2"

11565 PRINT

11567 PRINT "GAMMA MAGNITUDE" , "GAMMA PHASE"

11568 PRINT " —

11570 PRINT USING 11585 ;M2,P2

11585 IMAGE MD. DDDDD, 12X,MDDD. DDDD

11590 NEXT F

11591 NORMAL

11592 PRINT

11593 PRINT

11594 PRINT

11595 PRINTER IS 16

11600 Q=FNAdp (Nfreqs, Repeats, Ml, PI, M2 ,P2 ,Ca$)

11610 SUBEXIT

11620 SUBEND

41
APPENDIX III

COMPLETE LISTING OF MEASUREMENT PROGRAM "ADP5M"

880519

ADP5M

3

t ****** ADP5M ******

4 ! RE-STORE "ADP5M:F8" ! AUGUST 28, 1985 1020

6 i FILE NAME: ADPTR5 1850828 0804 BCY-GJC

ORIG VS IS CALBR4 02 05-1000 BCY

7 ! ADP11 INSERTED AT LINE 9000 THIS VERSION

9 OPTION BASE 1

12 DIM F_list(ll) ,Path(ll) ,Amps(5) ,Line(ll) ,Fstop_a(ll) ,Famps( 6 ) 13 DIM Typ$ [ 6 ]

, Fil_nam$ [ 6 ]

, Linput$ [160] , Mntno (10)

14 ! CALL Doc

22 PRINTER IS 16

23 DISP " " 24 Max_pts=ll

27 Nfreqs=0

28 G1=0

30 Typ=l

31 Cal=l

33 ON ERROR GOTO Off

36 Tape$="14"

39 MASS STORAGE IS ":T"&Tape$

40 MASS STORAGE IS ":F8,1"

42 Print$="0"

45 OFF ERROR

48 GOTO Freq

51 Off: OFF ERROR

54 Print$="7, 1"

57 GOTO Freq

60 Task: PRINT CHR$ ( 12 ) ;LIN (5) ;TAB ( 10) ;CHR$ (7 ) ; "ENTER OPTION

NUMBER FOR NEXT OPERATION:"

61 IF Proc<0 THEN INPUT "NUMBER OF FREQUENCIES TO PROCESS AND

NUMBER OF Repeats" , Nfreqs , Repeats

63 GOSUB Menu

66 Opt: LINPUT "OPTION NUMBER ? " , Linput$

69 IF NOT FNNumi ( Linput$ ) THEN Opt

72 Typ=VAL(Linput$)

75 IF (Typ<0) OR (Typ>5) THEN Opt

76 IF Typ>2 THEN Typ=Typ+l

78 IF Typ>5 THEN End

79 IF Proc=-l THEN Proc=0

80 IF Typ=5 THEN CALL Gamma (Nfreqs, Repeats ,Ca$)

81 IF Typ=5 THEN GOTO 22

83 Freq: IF Typ=l THEN CALL Freqin (Max_pts , Nfreqs ,Hi_lo_port,

F_1 ist ( * )

, Path ( * )

, Amps ( * )

, Line ( * )

, Lines , Fstopa ( * ) , Famps (*) , Proc)

42
84

87

90

93

96

99

102

105

108

111

114

115

117

118

119

120

121

122

123

124

126

129

132

135

138

141

144

147

150

151

153

156

159

162

163

164

165

168

169

171

174

177

178

180

183

186

IF Typ>l THEN Typ

GOTO Task

Typ: PRINT CHR$ (7) ;LIN(5) ;TAB(10) ;"TURN ON AMPLIFIER (S) :

FOR 1=1 TO 5

IF Amps ( I ) THEN PRINT TAB (15) ;Famps(I) ; ;Famps (1+1)

NEXT I

PRINT LIN(2) ;TAB(10) ;"PRESS ' CONT ' WHEN READY"

PAUSE

Dim=16* (Typ<3 ) +4* (Typ=3 ) + (Typ>3 ) + (Typ=5)

IF Typ=l THEN Typ $=" FREQ"

IF Typ=2 THEN Typ$="PRTCAL"

IF Typ=4 THEN Typ$="l_PORT"

Cnnct : PRINT CHR$ ( 7 ) ; CHR$ ( 12 ) ; LIN ( 5 ) ; TAB ( 1 0 ) ; " ENTER

CONNECTOR TYPE OPTION:"

IF Cal=4 THEN Cal=VAL(Ca$)

PRINT

IF ( Cal=2 ) AND (Typ=4) THEN PRINT " CONNECT

ADAPTER AND 1 PORT DEVICE" ; CHR$ ( 7

)

IF (Cal=2 ) AND (Typ<4) THEN PRINT " CONNECT ADAPTER

; CHR$ ( 7

)

PRINT

GOSUB Menul

LINPUT "ENTER OPTION NUMBER ",Linput$

IF NOT FNNumi (Linput$) THEN Cnnct

Cnnct=VAL ( Linput$

)

IF (Cnnct<l) OR (Cnnct>3) THEN Cnnct

IF Cnnct=l THEN Cnnct$="NOT N"

IF Cnnct=2 THEN Cnnct$="TN_2L"

IF Cnnct=3 THEN Cnnct$="TN_2R"

IF Cnnct=4 THEN Cnnct$="WGN"

Rep2 : PRINT CHR$ (12) ;CHR$ (7)

! LINPUT "ENTER # OF REPEAT MEASUREMENTS (SIDE-ARM SCANS) — (1-10) " ,Linput$

Linput$="l"

Tst : IF NOT FNNumi (Linput$) THEN Rep2

Repeats=VAL ( Linput$

)

IF (Repeats<l) OR (Repeats>10) THEN Rep2

IF (Repeats>3 ) AND (Typ<3) THEN Rep2

! IF (Proc=l) AND (Typ=4) THEN GOTO Gammal

IF Proc>0 THEN GOTO 171

Cal: DISP

CALL Caldat (Max_pts , Nfreqs , Repeats , Dim, Hi_lo_port

,

F_list(*) ,Typ$,S_port,Std_mnt,Print$,Path(*) ,Line(*)

,

Lines , Fstop_a ( * )

, Cnnct$ , Mounts , Mntno ( * ), Cal

)

IF Typ=4 THEN GOTO 225

CALL Calres (Max_pts , Nfreqs , Repeats , Dim , Typ$ , S_port

,

Std_mnt , Hi_lo_port , Print$ , Cal , G1 , Ca$

)

DISP " " DISP "DO YOU WANT TO SAVE SYSTEM PARAMETER DATA ON

MASS STORAGE ?";CH$(7)

Flag=FNYorn

IF NOT Flag THEN GOTO Jump225

DISP " " DISP "INSERT USER DISC INTO MASS STORAGE F8 ,

0

PRESS 'CONT' WHEN READY" ; CHR$ ( 7

)

IV

43
189

192

195

198

201

204

207

210

213

216

219

220

221

222

223

224

225

226

228

230

231

234

235

236

237

238

239

240

243

244

245

246

249

252

255

258

261

264

267

268

270

271

272

273

LESS THAN 7

PAUSE

File: DISP " ";CHR$(7)

LINPUT "ENTER USER FILE NAME

CHARACTERS" , Fil_nam$

IF LEN (Fil_nam$) >6 THEN DISP "FILE NAME IS TOO

LONG" ; CHR$ ( 7 )

IF LEN (Fil_nam$) >6 THEN File

ASSIGN #1 TO Fil_nam$&" : F8 , 0" , Check

ASSIGN * TO #1

IF Check THEN Disc

DISP " " DISP "FILE NAME " ; Fil_nam$ ; " IS IN USE.

CONTINUE — (Y/N) ?";CHR$(7);

IF FNYorn THEN Flag=l

IF Flag THEN PURGE Fil_nam$&" : F8 , 0"

IF Flag THEN Disc

GOTO File

IF Gl=l THEN Ca$="3"

Disc: CALL Disc_copy (Fil_nam$ , Nfreqs , Typ$ , Ca$)

Ca$=VAL$ ( Cal

)

Jump225 : IF Cal=4 THEN GOTO Cnnct

IF Cal=l THEN GOTO 2 37 !!!!! i 1 !!!!!!!!! i !!!!!!!!!!!!!!! ! IF Cal=3 THEN Task ! Gamma ( Nfreqs, Repeats , Ca$)

GOTO 22

GOTO Task

Cal=l

GOTO Task

Cal=2

GOTO Cnnct

Menu: IF Proc<0 THEN CALL Gamma (Nfreqs , Repeats , Ca$)

IF Proc<0 THEN GOTO 48

PRINT USING Forml

PRINT USING Form2

RETURN

Menul : PRINT USING Form3

PRINT USING Form4

RETURN

Forml: IMAGE /10X"1) INPUT FREQUENCIES"/10X"2

)

DETERMINE SYSTEM PARAMETERS WITHOUT POWER

STANDARD"

Form2 : IMAGE 10X"3) MEASURE 1-PORT ON ADAPTER"/ 10X" 4

)

EVALUATE ADAPTERS "/I OX" 5) EXIT"

Form3 : IMAGE /10X"1) 14mm, 7mm, OR WAVEGUIDE"/10X"2

)

TYPE N, MALE ADAPTER ON 6-PORT #1"/10X"3) TYPE N,

MALE ADAPTER ON 6-PORT #2"

Form4 : IMAGE 10X"4) OTHER, NOT AVAILABLE AT PRESENT"

End: DISP "MEASUREMENT SESSION DONE"

PRINT CHR$ ( 12

)

Gammal: PRINT "THIS IS Gamma"! THIS SEGMENT MUST CALL DATA

FILES NEEDED

PAUSE

CALL Caldat (Max_pts,Nfreqs, Repeats, Dim,Hi_lo_port,F_list(*)

,

Typ$ / S_port , Std_mnt , Print$ , Path ( * )

, Line ( * )

, Lines

,

Fstop_a ( * )

, Cnnct$ , Mounts , Mntno ( * )

, Cal

)

CALL Gamma (Nfreqs)

44
274 Q=FNAdp (Nfreqs)

275 GOTO 235

276 END

279 ! FILE NAME: FREQIN ! 800610-1615 BCY

MAIN

Amps ( 12 83 96

Ca$ 80 118 171 223 224 225 239

Ca$0 223

Cal 31

225

118

226

118

228

120

230

121

235

168

237

171

272

Cal165

Check 204 210

Cnnct 129 132 132 135 138 141 144

Cnnct$ 0 135 138 141 144 168 272

Cnnct$

0 135 138 141 144

Cnnct

117 126 132 226 238

Dim 108 168 171 272

Disc

224 210 221

End: 267 78

F_list

(

12 83 168 272

Famps

(

12 83 96 96

Fil_nam$ 13

224

195 198 201 204 216 220

File: 192 201 222

Flag 178 180 219 220 221

Forml: 255

Form2

258

Form3 261

Form4

264

Freq: 83 48 57

45
Fstopa

(

12 83 168 272

G1 28 171 223

Gamma 1: 270

Hi_lo_port 83 168 171 272

I 93 96 96 96 99

Jump225226 180

Line ( 12 83 168 272

Lines 83 168 272

Linput$ 13

151

66

153

69

156

72 124 126 129

Max_pts 24 83 168 171 272

Menul246 123

Menu: 239 63

Mntno ( 13 168 272

Mounts 168 272

Nfreqs 27

239

61

272

80

273

83

274

168 171 224

Off: 51 33

Opt: 66 69 75

Path ( 12 83 168 272

Print$ 42 54 168 171 272

Proc 61 79 79 83 164 239 240

Q 274

Rep2

147 153 159 162

Repeats 61

171

80

239

156

272

159 159 162 168

S_port 168 171 272

Std_mnt 168 171 272

Tape$ 36 39

46
Task: 60 87 230 234 236

Tst153

Typ 30 72 75 75 76 76 76

78 80 81 83 84 108 108

108 108 111 114 115 120 121

162 169

Typ$ 13 111 114 115 168 171 224

272

Typ$

0 111 114 115

Typ: 90 84

47
282 SUB Freqin(Max_pts,Nfreqs,Hi_lo_port,F_list (*) , Path(*)

,

Amps(*) , Line(*) , Lines, Fstopa (*) , Famps (*) , Proc)

285 OPTION BASE 1

288 PRINTER IS 16

291 PRINT CHR$ ( 12

)

294 DISP " " 297 Famps (1)=. 25

300 Famps(2)=l

303 Famps (3) =2

306 Famps (4) =4

309 Famps (5) =8

312 Famps (6) =18

315 CALL Freq(Max_pts,Nfreqs,Hi_lo_port,F_list (*) , Path(*) / Amps(*)

,

Line ( * ), Lines , Fstop_a ( * ), Bail$ , Proc)

318 PRINT CHR$ ( 12

)

321 DISP " ,s 324 SUBEND

327 ! *************** SUBPROGRAM FREQ ***********************

330 1 FILE NAME: FREQ ! 811216-1715---BCY

S Freqin(

Amps ( 282

Bail$ 315

F_list

(

282

Famps

(

282

Fstopa

(

282

Hi_lo_port 282

Line ( 282

Lines 282

Max_pts 282

Nfreqs 282

Path ( 282

Proc 282

315

315

297 300 303 306

315

315

315

315

315

315

315

315

309 312

48
333 SUB Freq(Max_pts,Nfreqs,Hi_lo_port,F_list(*) ,Path(*) ,Amps(*)

,

Line(*) , Lines, Fstop_a(*) ,Bail$,Proc)

336 OPTION BASE 1

339 DIM A$ [ 32 ]

, Linput$ [ 160

]

342 A$=" FREQUENCY INPUT/OUTPUT SECTION"

345 Center= (80-LEN (TRIM$ (A$) ) ) /

348 PRINT TAB ( Center) , A$ , LIN ( 2 ) ; CHR$ ( 7

)

351 PRINT "MAXIMUM # OF FREQUENCIES =";Max_pts

354 ! INPUT OPTIONS

357 P_optl: PRINT USING Forml ;CHR$ (7)

360 LINPUT "INPUT OPTION # ",Linput$

361 IF Linput$="5" THEN GOTO 428

363 IF NOT FNNumi (Linput$) THEN P_optl

366 Opt=VAL(Linput$)

367 IF VAL ( Linput$ ) =3 THEN Proc=l

368 IF VAL ( Linput$ ) =4 THEN Proc=-l

369 IF Proc<0 THEN GOTO 431

370 Opt=l

371 IF (Opt<=0) OR (Opt>2 ) THEN P_optl

373 P_opt2 : PRINT USING Form2 ; CHR$ ( 7

)

375 LINPUT "INPUT 6-PORT OPTION # " ,Linput$

378 IF NOT FNNumi (Li nput$) THEN P_opt2

381 S_opt=VAL(Linput$)

384 IF (S_opt<=0) OR (S_opt>2) THEN P_opt2

387 Hi_lo_port=S_opt-l

390 PRINT CHR$ ( 12

)

393 Opt: Bail$="N"

396 Flag=0

399 ON Opt GOSUB Sss,Type

402 IF Bail$="Y" THEN GOSUB Restart

405 IF Flag THEN Opt

408 IF NOT Flag AND (Bail$="Y") THEN Exit

411 ! PROCESS DATA, WHICH AIR LINE, AMPLIFIER

414 Round: 1=1+1

417 F_1 ist ( I

) =PROUND ( F_1 ist ( I ) ,-6)

42 0 IF KNfreqs THEN Round

423 CALL Aline (Hi_lo_port, Nfreqs , F_list (*), Line (*), Lines

,

Fstop_a (*) ) 426 CALL Path (Hi_lo_port, Nfreqs , F_list (*), Amps (*), Path (*)

)

427 GOTO 431

428 PRINT "END OF SESSION"

429 STOP

431 Exit: SUBEXIT

432 ! —- START, STOP, STEP

435 Sss: CALL F_step (Opt , Hi_lo_port ,Max_pts , Nfreqs , F_1 ist (*)

,

Bail$ , Proc)

438 RETURN

441 ! — TYPE IN LIST

444 Type: CALL F_type (Opt, Hi_lo_port, Max_pts , Nfreqs , F_list (*)

,

Bail$, Proc)

447 RETURN

450 ! RESTART

453 Restart: DISP "RESTART SAME OPTION ? — ( Y/N) " ; CHR$ ( 7 ) ; ! retry

same option ?

456 IF FNYorn THEN Flag=l
459 RETURN

462 ! IMAGE FORMATS

465 Fomtl: IMAGE /"OPTIONS : "//"l . START, STOP, STEP LIST"/"2.

TYPE IN LIST" , K!/"3 . PROCESS DATA FOR ADAPT

LOSS"/" 4. CALCULATE ADAPTER LOSS"/"5. EXIT"

/,K

468 Form2 : IMAGE /"INPUT 6 -PORT OPTION:"/"

>—2 GHz 6 -PORT"/ ,

471 SUBEND

474 1 ************** SUBPROGRAM ALINE *****

477 ! FILE NAME: ALINE !

1) <=2GHz 6-PORT"/"2

******************

811216-1600 BCY

S Freq(

A$ 339 342 345 348

Amps ( 333 426

Bail$ 333 393 402 408 435 444

Center 345 348

Exit: 431 408

F_list

(

333 417 417 423 426 435 444

Flag 396 405 408 456

Forml

465

Form2

468

Fstop_a

(

333 423

Hi_lo_port 333 387 423 426 435 444

I 414 414 417 417 420

Line ( 333 423

Lines 333 423

Linput$ 339

375

360

378

361

381

363 366 367 368

Max_pts 333 351 435 444

Nfreqs 333 420 423 426 435 444

Opt 366 370 371 371 399 435 444

Opt: 393 405

P_optl

357 363 371

50
P_opt2

373 378 384

Path ( 333 426

Proc 333 367 368 369

Restart453 402

Round: 414 420

S_opt 381 384 384 387

Sss

435 399

Type: 444 399

444

51
480

483

486

489

492

495

498

501

504

507

510

513

516

519

522

525

528

531

534

537

540

543

546

549

552

555

558

561

564

567

570

573

576

579

582

585

588

591

594

597

600

603

606

609

612

615

618

621

SUB Aline (Hi_lo_port,Nfreqs,F_list (*) ,Line(*) , Lines, Fstop_a (*)

)

OPTION BASE 1

DIM F (7 , Nfreqs)

Aline (1) =15

Aline (2) =5

Aline (3) =3

.25 —<.75 GHz

.75 —2 GHz

2 —3.75, 6.25 —8.75,

16.25 —18 GHz

11.25 —13.75,

Aline (4 ) =5 ! >3.75 —5.25, 9.75 —<13.75 GHz

Aline ( 5) =6 ! 5.625—<6.25, >13.75 —14.375,

15.625 —<16.25 GHz

Aline (6) =7 . 5 !>8.75 —9.375, 14.5—15.5 GHz

Aline (7 ) =10 !>5.25—<5.625, >9.375 —<9.75, >15.5

“-<15.625 GHz

Start=J= (Hi_lo_port=l) *2

Stop=2+ (Hi_lo_port=l) *5

H i_l o=H i_l o_port+

Inc i1 = 1+1 BEGIN LINE SORT

X=F_list (I)

K=0

ON Hi_lo GOSUB Lo, Hi

Cntr (K) =Cntr (K) +1

F (K, I) =X

IF KNfreqs THEN Inc_i

Inc_j : J=J+1

IF J>Stop THEN SUBEXIT

IF Cntr ( J) =0 THEN Inc_j

L=0

Inc_l: L=L+1

IF L>Nfreqs THEN Inc_j

IF F ( J , L) =0 THEN Inc_l

N=N+1

F_list (N) =F ( J , L)

Fstopa (N) =Cntr ( J)

Cnt=Aline ( J)

Line (N) =Cnt

IF Cnt<>Last_cnt THEN Lines=Lines+l

Last_cnt=Cnt

GOTO Inc 1

Lo: K=1

IF X>= . 7 5 THEN K=2

RETURN

Hi: IF (X>=2 ) AND (X<=3.75) OR (X>=6.25) AND (X<=8.75) OR

(X>=11 .25) AND (X<=13 .75) OR (X>=16.25) AND (X<=18) THEN

K=3

IF K THEN RETURN

IF (X>3 .75) AND (X<=5.25) OR (X>=9.75) AND (X<13.75) THEN K=4

IF K THEN RETURN

IF (X>=5 .625) AND (X<6.25) OR (X>13.75) AND (X<=14.375)

OR (X>=15 . 625) AND (X<16.25) THEN K=5

IF K THEN RETURN

IF (X>8 .75) AND (X<=9.375) OR (X>=14.5) AND (X<=15.5)

THEN K=6

IF K THEN RETURN

K=7

RETURN

52
624 SUBEND

627 ! ************* SUBPROGRAM F_STEP ***********************

630 ! FILE NAME: F STEP I 811216-0830 BCY

S Aline

(

Aline

(

489 492 495 498 501 504 507

570

Cnt 570 573 576 579

Cntr ( 531 531 546 567

F( 486 534 558 564

F_list

(

480 522 564

Fstop_a

(

480 567

Hi: 594 528

Hi_lo 516 528

Hi_lo_port 480 510 513 516

I 519 519 522 534 537

Inc_i

519 537

Inc_j 540 546 555

Inc_l 552 558 582

J 510 540 540 543 546 558 564

567 570

K 525 531 531 534 585 588 594

597 600 603 606 609 612

615 618

L 549 552 552 555 558 564

Last_cnt 576 579

Line ( 480 573

Lines 480 576 576

Lo: 585 528

N 561 561 564 567 573

Nfreqs 480 486 537 555

53
Start 510

Stop 513 543

X 522 534

594 594

600 606

612 612

588 594 594 594 594

594 594 600 600 600

606

612

606

612

606 606 606

54
633

636

639

642

645

648

651

654

657

660

663

666

669

672

675

678

681

684

687

690

693

696

699

702

705

708

SUB F_step(Opt,Hi_lo_port,Max_pts,Nfreqs,F_list (*) , Bail$,Proc)

OPTION BASE 1

Bail$="N"

MAT F_list=ZER

Start: DISP "INPUT START , STOP , STEP ( GHz ) e.g., 2,.l ";CHR$(7);

INPUT FI , F2 , F3

PRINT LIN (2 ), "FREQUENCY INPUT IS FROM" ; FI ; "TO" ; F2 ; "STEP"

; F3 ; "GHz " ; CHR$ ( 7

)

CALL F_limt (FI , F2 , F3 , Opt, Hi_lo_port,Max_pts, Error)

IF Error THEN Err_test

IF F3=0 THEN Exit

Nfreqs=INT ( (F2-F1) /F3) +1

Incr: Idx=Idx+l

IF Idx=Nfreqs THEN Exit

F_list (Idx+1) =Fl+Idx*F3

IF Idx<Nfreqs THEN Incr

Exit: F_list ( 1) =F1

IF F3=0 THEN Nfreqs=l

SUBEXIT

Err_test: Times=Times+l

IF Times<=2 THEN Start

PRINT "DO YOU WANT TO CONTINUE ? — (Y/N) " ; CHR$ ( 7

)

IF FNYorn THEN Start

Bail$="Y"

SUBEND

i *************** SUBPROGRAM F TYPE *********************

! FILE NAME: F TYPE ~ i 811216-0900 BCY

S F_step

(

Bail$ 633 639 699

Err_test

687 657

Error 654 657

Exit: 678 660 669

FI 648 651 654 663 672 678

F2 648 651 654 663

F3 648 651 654 660 663 672

F_list

(

633 642 672 678

Hi_lo_port 633 654 - Idx 666 666 669 672 672 675

Incr: 666 675

Max_pts 633 654

55
Nfreqs 663 669 675 681

Opt

Proc

Start:

Times

633

633 654

633

645 690

687 687

696

690

56
711

714

717

720

723

726

729

732

735

738

741

744

747

750

753

756

759

762

765

768

771

774

777

780

783

786

789

792

795

798

801

804

807

810

813

816

819

822

825

828

831

834

837

840

843

846

849

852

855

858

861

864

SUB F_type(Opt,Hi_lo_port,Max_pts,Nfreqs,F(*) ,Bail$)

OPTION BASE 1

DIM Linput$ [ 160

]

Bail$="N"

MAT F=ZER

Start: 1=0

PRINT CHR$ ( 12

)

DISP " " PRINT "INPUT FREQUENCY LIST — ANY ORDER"

PRINT LIN ( 1) ; "TERMINATE FREQUENCY LIST WITH 0

IF LESS THAN ";Max_pts;" FREQUENCIES" ;CHR$ (7)

PRINT LIN (1); "LIST TERMINATES WITH " ;Max_pts;"

FREQUENCIES INPUT" ; CHR$ ( 10 ) ;CHR$(7)

Incre: 1=1+1

DISP "INPUT F

( " ; I

; " ) GHz ";CHR$(7);

INPUT F (I)

IF NOT F ( I ) THEN Testl

PRINT "#" ; I ;F (I) ; "GHz"

IF I<>Max_pts THEN Incre

1=1+1

Testl: IF 1=1 THEN Start

Nfreqs=I-l

Chng: GOSUB Changes

DISP " " CALL Order (F(*) ,Nfreqs)

CALL F_limt(F(l) ,F(Nfreqs) , 0 , Opt , Hi_lo_port , Max_pts , Error

IF Error THEN GOSUB Err_test

IF Error THEN Chng

DISP "CHANGES ? — ( Y/N) " ; CHR$ ( 7 )

IF NOT FNYorn THEN RETURN

PRINT CHR$ ( 12

)

1=0

1=1+1

PRINT " #

" ; I ; F ( I )

; " GHZ"

IF IoNfreqs THEN Inc

DISP "FREQUENCY LIST # ?";CHR$(7);

LINPUT " " , Linput$

IF NOT FNNumi (Linput$) THEN List

Digit=VAL ( Linput$)

IF (Digit<=0) OR (Digit>Nfreqs) THEN List

DISP "CORRECTED # ";Digit;" "?CHR$(7);

INPUT F (Digit)

PRINT LIN (1) ; "CORRECTED #:"

PRINT SPA(5) ; " ; Digit ; SPA ( 2 ) ;F(Digit) GHz";CHR$(7)

GOTO Changes

Err_test: Times=Times+l

IF Times<=2 THEN RETURN

PRINT LIN (2 ) ; "DO YOU WANT TO CONTINUE ? — ( Y/N) " ; CHR$ ( 7

)

IF FNYorn THEN RETURN

Bail$="Y"

SUBEND

1************* SUBPROGRAM PATH ************************

! FILE NAME: PATH ! 811216-0930 BCY

SUBEXIT

Changes

Inc

List

57
S Ftype

(

Bail$ 711 720 855

Changes

792 771 840

Chng: 771 786

Digit 822 825 825 828 831 837 837

Err_test843 783

Error 780 783 786

F ( 711 723 750 753 756 111 780

780 807 831 837

Hi_lo_port 711 780

I 726 744 744 747 750 753 756

756 759 762 762 765 768 801

804 804 807 807 810

Inc: 804 810

Incre: 744 759

Linput$ 717 816 819 822

List: 813 819 825

Max_pts 711 738 741 759 780

Nfreqs 711 768 111 780 810 825

Opt 711 780

Start: 726 765

Testl

765 753

Times 843 843 846

58
867

870

873

876

879

882

885

888

891

894

897

900

903

906

909

912

915

918

921

924

927

930

933

936

939

942

945

948

951

954

957

960

963

966

969

972

975

978

981

984

987

SUB Path(Hi_lo_port,Nfreqs,F_list (*) ,Amps(*) ,Path(*)

)

OPTION BASE 1

Hi_lo=Hi_lo_port+l

Inc_i: 1=1+1

IF I>Nfreqs THEN SUBEXIT

X=F_list(I)

ON Hi_lo GOSUB Lo , Hi

ON Amp GOSUB Ampl , Amp2 , Amp3 , Amp4 , Amp5

Path (I) =Path

IF Amp< =Last_amp THEN Inc_i

Amps (Amp) =Amp

La st_amp=Amp

IF KNfreqs THEN Inc_i

SUBEXIT

Lo: Amp=l

IF X>1 THEN Amp=2

RETURN

Hi: Amp=3

IF X>4 THEN Amp=4

IF X>7 . 8 THEN Amp=5

RETURN

Ampl: Path=l

IF X> . 3

5

THEN Path=2

IF X> .

5

THEN Path=3

IF X> .THEN Path=4

RETURN

Amp2 : Path=5

IF X>1 . 3 THEN Path=6

RETURN

Amp3 : Path=7

IF X>2 .

5

THEN Path=8

RETURN

Amp4 : Path=9

IF X>5 .

THEN Path=10

RETURN

Amp5: Path=ll

IF X>10 . 5 THEN Path=12

RETURN

SUBEND

I ************** SUBPROGRAM F LIMT ******************

! FILE NAME: F LIMT _

! 811208-1600

S Path

(

Amp 888 894 897

918 921 924

Ampl

930 888

Amp2 945 888

Amp3 954 888

Amp4 963 888

* * * * BCY

912

59
Amp5

972 888

Amps ( 867 897

F_list

(

867 882

Hi: 918 885

Hi_lo 873 885

Hi_lo_port 867 873

I 876 876 879 882 891 903

Inc_i

876 894 903

Last_amp 894 900

Lo: 909 885

Nfreqs 867 879 903

Path 891 930 933 936 939 945

954 957 963 966 972 975

Path ( 867 891

X 882 912 921 924 933 936

948 957 966 975

948

939

60
990 SUB F_1 imt( FI, F2 , F3 , Opt , Hi_lo_port , Max_pts , Error)

993 OPTION BASE 1

996 Error=0

997 PRINT "HILOPORT" ;Hi_lo_port

999 IF Opt>l THEN Test

1002 IF F1>F2 THEN Msgl

1005 IF F1+F3>F2 THEN Msg2

1008 IF (F1<>F2) EXOR (F3<>0) THEN Msg6

101 Min_step= (F2-F1) / (Max_pts-1)

1014 IF Min_step>F3 THEN Msg3

1017 Test: IF Hi_lo_port AND (F2>18) OR NOT Hi_lo_port AND

(F2>2 ) THEN Msg4

1020 IF Hi_lo_port AND (Fl<2) OR NOT Hi_lo_port AND

(FK.25) THEN Msg5

1023 SUBEXIT

1026 Msgl: PRINT "START>STOP" ;CHR$ (7)

1029 GOTO Exit

1032 Msg2 : PRINT "STEP TOO LARGE" , CHR$ (7

)

1035 GOTO Exit

1038 Msg3 : IMAGE "MINIMUM STEP TO COVER RANGE REQUESTED IS ",

Z.6D," GHZ " ,

1041 PRINT USING Msg3 ;Min_step ; CHR$ ( 7

)

1044 GOTO Exit

1047 Msg4 : PRINT "HIGH FREQUENCY OUT OF BOUNDS ", CHR$ ( 7

)

1050 GOTO Exit

1053 Msg5 : PRINT "LOW FREQUENCY OUT OF BOUNDS" , CHR$ ( 7

)

1056 GOTO Exit

1059 Msg6: PRINT "START, STOP, STEP FREQUENCIES ARE INCONSISTENT",

, CHR$ ( 7

)

1062 Exit: Error=l

1065 SUBEND

1068 1 *************** SUBROUTINE CALDAT *********************

1071 ! FILE NAME : CALDAT ! 810916-2120 BCY

1074 !

S F_limt

(

Error 990 996 1062

Exit: 1062 1029 1035 1044 1050 1056

FI 990 1002 1005 1008 1011 1020 1020

F2 990 1002 1005 1008 1011 1017 1017

F3 990 1005 1008 1014

Hi_lo_port 990 997 1017 1017 1020 1020

Max_pts 990 1011

Min_step 1011 1014 1041

Msgl

1026 1002

61
Msg2 1032 1005

Msg3: 1038 1014

Msg4: 1047 1017

Msg5 : 1053 1020

Msg6 : 1059 1008

Opt 990 999

Test: 1017 999

62
1077 SUB Caldat (Max_pts , Nfreqs , Repeats , Dim, Hi_lo_port , Freq_a ( *) , Typ$ , Sp , Std_mnt , Print$ , Path_a ( * )

, Line ( * )

, Lines , Fstop_a ( * )

,

Cnnct $ , Mounts , Sn ( * )

, Cal

)

1080 OPTION BASE 1

1083 DIM Freq_o (Nfreqs) , Path_o (Nfreqs) ,Fstop_o(l) ,Type$ [7]

,

Id_content$ [80]

1086 DIM Map (Nfreqs) , Power (Nfreqs , Repeats, Dim, 10) ,Rvgl (2)

,

Rvg2 (2) , Pi (Nfreqs, 2 Repeats, Dim) , Pmnt (Nfreqs , Repeats , Dim, 2

)

1089 REDIM Freq_a (Nfreqs) , Path_a (Nfreqs) ,Fstop_a (Nfreqs)

1092 PRINTER IS 16

1093 Cal$=VAL$ (Cal)

1095 CALL Fdata (Nfreqs, Freq_a (*) ,Freq_o(*) ,Path_a(*) ,Path_o(*)

,

Fstop_o ( * )

, Map ( * )

)

1098 Typ_f lag=POS (Typ$ , "P"

)

1101 IF Typ_flag>l THEN Meas_x! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!

1104 I CALIBRATE ALL BUT LINES

1107 End=l

1110 Devices=6

1113 Type$=" ORDERED"

1116 CALL Measre (Type$ , Repeats , End, Freq_o (*) , Path_o (*), Line (*)

,

Fstop_o(*) , Hi_lo_port, Nfreqs , Devices , Rvgl ( *)

,

Rvg2 ( * ), Power ( * ), Map ( * ), Typ$ , Sp , Pi ( * ), Pmnt ( * )

,

Sn (*)

)

1119 ! MEASURE AIR LINE(S)

1122 End=4

1125 Devices=Lines

1128 Type $=" AIRLINE"

1131 CALL Measre (Type$ , Repeats, End, Freq_a (*), Path_a (*), Line (*)

,

Fstop_a (*) , Hi_lo_port , Nfreqs , Devices , Rvgl ( * )

,

Rvg2 ( * )

, Power ( * ), Map ( * ), Typ$ , Sp , Pi ( * )

, Pmnt ( * )

,

Sn (*)

)

1134 GOTO Index

1137 ! 1-PORT, 2 -PORT, POWER MOUNT

1140 Meas_x: End=l+3* (Typ_flag=2 ) !!!!!!!!!!! 1 !!!!!!!!!!!!!!

1143 Devices=l+Mounts

1146 Type$="ORDERED"

1149 CALL Measre (Type$, Repeats, End, Freq_o (*) ,Path_o(*) , Line (*)

,

Fstop_o(*) , Hi_lo_port, Nfreqs, Devices, Rvgl (*)

,

Rvg2 (*) , Power (*) ,Map(*) , Typ$ , Sp, Pi ( *) , Pmnt (*)

Sn ( *)

)

1152 ! IF Typ_flag=4 THEN Disc

1155 ! IF Typ_flag<>3 THEN Index

1158 ! IF (Typ_flag=3 ) AND (Sp=3) THEN Index

1159 GOTO Index !!!!!!!! i l !!!!!!!!! ! 1161 1 ZERO POWER ARRAY FOR ONE 1-PORT

1164 Col=6

1167 K=1

1170 IF Sp=2 THEN Col=l

1173 Inci: 1=1+1

1176 IF I>Nfreqs THEN Index

1179 J=0

1182 Incj : J=J+1

1185 IF J>Repeats THEN Inci

1188 L=-l

1191 Inci: L=L+1

63
1194 IF L>3 THEN Incj

1197 Power ( I , J , K , L+Col ) =0

1200 GOTO Incl

1203 ! RE-INDEX POWER MATRIX

1206 Index: 1=0

1209 Stopk=16* (Typ_flag<2) +4* (Typ_flag=2) + (Typ_flag>2)

+ (Typ_flag=4 ) +Mounts

1212 ! Stopk=Dim !!!!!!!!! ! !!!!!!!!!! 1 !!!!!!!! ! 1215 Inc_i: 1=1+1

1218 IF I>Nfreqs THEN Disc

1221 J=0

1224 Inc_j : J=J+1

1227 IF J>Repeats THEN Inc_i

1230 K=0

1233 Inc_k: K=K+1

1236 IF K>Stopk THEN Inc_j

1239 L=0

1242 Inc_l : L=L+1

1245 IF L>4 THEN Inc_k

1248 Power (I, J , K, L+4 ) =Power (I, J,K,L+5)

1251 GOTO Inc_l

1254 ! DI SK WRITE TO SCATCH PADS — —

1257 Disc: Dtg$=FNDtg$

1260 Date$=Dtg$ [1,6]

1261 Time$=Dtg$ [8,13]

12 62 MASS STORAGE IS ":F8,1"

1263 Ca$=VAL$ (Cal)

1264 ! FOR 1=1 TO 50

1265 ! IF Typ$="l_port" THEN GOTO 1269

1266 ! ASSIGN #1 TO "PWRH" &VAL$ ( I ) &" : F8 , 1" , Check

1267 ! GOTO 1270

1269 ! ASSIGN #1 TO "1PRH"&VAL$ (I) &" : F8 , 1" , Check

1270 ! ASSIGN #1 TO * 1271 ! IF Check THEN Ca$=VAL$(I)

1272 ! IF Check THEN GOTO 1276

1274 ! NEXT I

1276 ON Typ_flag+1 GOSUB TypOl , TypOl , Typ2 , Typ3 , Typ4

1277 PRINT CHR$ (7

)

1278 LINPUT "ENTER ANY 80 CHARACTER STRING TO IDENTIFY DATA",

Id_content$

1279 CALL Wrthed (Fileo$ , " : F8 , 1" , 0 , Date$ , Time$ , Typ$ , Nfreqs

,

Freq^o ( * ), Repeats , Sp , Std_mnt , Id_content $

,

Cnnct$)

1280 CALL Wrtbin (Filed$ ,": F8 , 1" , Power (*), Records)

1281 MASS STORAGE IS ":F8,0"

1284 ! PRINT OUT

1287 DISP "DO YOU WANT PRINT OUT OF POWER DATA ? — (Y/N)"?

CHR$ (7)

1290 IF NOT FNYorn THEN SUBEXIT

1293 CALL Prtpwr (Print$,Nfreqs, Repeats ,Typ_flag, Rvgl (*)

,

Rvg2 (*) , Freq_o (*) , Power (*) , Date$ , Time$ , Pi (*)

,

Mounts, Dim)

SUBEXIT

TypOl: Fileo$="PWR"&"H"&Ca$

Filed$="PWR"&"D"&Ca$

1296

1299

1302

64
Records=INT (Max_pts*3*16*10*8/256) +4

Fileo$="2P0RTH"

Filed$="2P0RTD"

Records=INT (Max_pts*10*4*10*8/256) +4

Fileo$="lPRH"&"3"

Filed$=" 1PRD" & " 3

Records=INT (Max_pts*10*l*10*8/256) +4

RETURN

Typ4 : Fileo$="PRMNTH"

Filed$="PRMNTDn Records=INT (Max_pts*3*10*10*8/256) +4

RETURN

SUBEND ************** SUBPROGRAM PRTPWR *********************

FILE NAME: PRTPWR ! 811217-1630 BCY

1305

1308 RETURN

1311 Typ2

1314

1317

1320 RETURN

1323 Typ3

1326

1329

1332

1335

1338

1341

1344

1347

1350 ! 1353 !

S Caldat(

Ca$ 1263 1299

Cal 1077 1093

Cal$ 1093

Cnnct$ 1077 1279

Col 1164 1170

Date$ 1260 1279

Devices 1110 1116

Dim 1077 1086

Disc

1257 1218

Dtg$ 1257 1260

End 1107 1116

Filed$ 1280 1302

Fileo$ 1279 1299

Freq_a

(

1077 1089

Freq_o

(

1083 1095

Fstop_a

(

1077 1089

Fstop o( 1083 1095

1302

1263

1197

1293

1125 1131 1143 1149

1086 1086 1293

1261

1122 1131 1140 1149

1314 1326 1338

1311 1323 1335

1095 1131

1116 1149 1279 1293

1131

1116 1149

65
Hi_lo_port 1077 1116 1131 1149

I 1173 1173 1176 1197 1206 1215 1215

1218 1248 1248

Id_content$ 1083 1278 1279

Inc_i1215 1227

Inc_j

1224 1236

Inc_k: 1233 1245

Inc_l

1242 1251

Inci1173 1185

Incj : 1182 1194

Incl

1191 1200

Index: 1206 1134 1159 1176

J 1179 1182 1182 1185 1197 1221 1224

1224 1227 1248 1248

K 1167

1248

1197 1230 1233 1233 1236 1248

L 1188 1191 1191 1194 1197 1239 1242

1242 1245 1248 1248

Line ( 1077 1116 1131 1149

Lines 1077 1125

Map ( 1086 1095 1116 1131 1149

Max_pts 1077 1305 1317 1329 1341

Meas_x: 1140 1101

Mounts 1077 1143 1209 1293

Nfreqs 1077 1083 1083 1086 1086 1086 1086

1089 1089 1089 1095 1116 1131 1149

1176 1218 1279 1293

Path_a

(

1077 1089 1095 1131

Path_o

(

1083 1095 1116 1149

Pi ( 1086 1116 1131 1149 1293

Pmnt ( 1086 1116 1131 1149

66
Power

(

1086

1280

1116

1293

1131 1149 1197 1248 1248

Print$ 1077 1293

Records 1280 1305 1317 1329 1341

Repeats 077

1185

1086

1227

1086

1279

1086

1293

1116 1131 1149

Rvgl ( 1086 1116 1131 1149 1293

Rvg2 ( 1086 1116 1131 1149 1293

Sn ( 1077 1116 1131 1149

Sp 1077 1116 1131 1149 1170 1279

Std_mnt 1077 1279

Stopk 1209 1236

Time$ 1261 1279 1293

Typ$ 1077 1098 1116 1131 1149 1279

TypOl: 1299 1276 1276

Typ2 : 1311 1276

Typ3

1323 1276

Typ4 1335 1276

Typ_flag 1098

1276

1101

1293

1140 1209 1209 1209 1209

Type$ 1083 1113 1116 1128 1131 1146 1149

67
1356

1359

1362

1365

1368

1371

1374

1375

1380

1383

1386

1389

1392

1395

1398

1401

1404

1407

1410

1413

1416

1419

1422

1425

1428

1431

1434

1437

1440

1443

1446

1449

1452

1455

1458

1461

1464

1467

1470

1473

1476

1479

1482

1485

1488

1491

1494

1497

150

SUB Prtpwr (Print$,Nfreqs, Repeats, Typ_flag, Rvgavl (*)

,

Rvgav2 ( * )

, Freq_o ( * )

, Power ( * ), Date$ , Time$ , Pi ( * )

,

Mounts, Dim)

OPTION BASE 1

DISP " " IF POS (Print$ , "

, " ) THEN PRINTER IS 7,1

IF POS (Print$, "0") THEN PRINTER IS 0

PRINT TAB ( 10 ) ; "RVG1 (VOLTS ) " ; TAB ( 44 ) ; "RVG2 (VOLTS ) " ; TAB ( 67 )

Date$&" . "&Time$

PRINT USING Header0 ;Rvgavl (1) ;Rvgavl(2) ;Rvgav2(l) ;Rvgav2(2)

PRINT LIN (2) ; TAB (29) SIDE-ARM POWER DATA"

PRINT TAB ( 33 ); "MILLIWATTS"

Stopk=Dim

Inci: 1=1+1

IF I>Nfreqs THEN Exit

PRINT USING Headerl ; "FREQUENCY" ;Freq_o (I) ;" GHz" ;Repeats

" REPEAT (S)"

PRINT LIN(l) ; TAB (19) ;" 6-PORT #1" ;TAB(43) ;CHR$ (124)

TAB ( 59 ); "6-PORT #2";LIN(1)

PRINT USING Header2 ; "MNT1 " ; "MNT2 " ; "MNT3 " ; "MNT4 "?

"MNT1 " ; "MNT2 ";"MNT3 " ; "MNT4 " K=0

I nek: K=K+1

IF K>Stopk THEN Inci

Swcl=Swc2=Swpl=Swp2=0

IF

IF

IF

IF

IF

IF

IF

IF

IF

IF

IF

IF

IF

IF

IF

IF

Typ_flag>2 THEN J_loop

Typ_flag=2 THEN Two_p

K=1 THEN PRINT "POWER MOUNT"

K=3 THEN PRINT "SHORT"

K=4 THEN PRINT "OPEN"

K=5 THEN PRINT "THRU"

K=9 THEN PRINT "LINE"

K=13 THEN PRINT "TWO PORT"

(K=5) OR (K=9 ) OR (K=13) THEN PRINT "0 DEGREES"

(K=10) OR (K=14) THEN PRINT "90 DEGREES"

OR ( K= 15)

OR (K=16)

OR (K=15)

OR ( K= 16)

(K=6)

(K=7)

(K=8)

(K=7)

(K=8)

OR

OR

OR

OR

OR

Swcl THEN K=K+1

Swc2 THEN K=K-1

(K=ll)

(K=12)

(K=ll)

( K= 12)

THEN PRINT "180 DEGREES"

THEN PRINT "270 DEGREES"

THEN Swcl=l

THEN Swc2=l

GOTO J_loop

Two_p: IF K=1 THEN PRINT "0 DEGREES"

IF K=2 THEN PRINT "90 DEGREES"

IF K=3 THEN PRINT "180 DEGREES"

IF K=3 THEN Swpl=l

IF K=4 THEN PRINT "270 DEGREES"

IF K=4 THEN Swp2=l

IF Swpl THEN K=K+1

IF Swp2 THEN K=K-1

J_loop: J=0

FOR J=1 TO Repeats

Pincl=PROUND (Pi (I , 1 , J, K) ,-5)

IF Pincl=0 THEN Nextjj

Pinc2=PROUND ( Pi ( I , 2 , J , K) ,-5)

68
1503

1506

1509

1512

1515

1518

1521

1524

1527

1530

1533

1536

1539

1542

1545

1548

1551

1554

1557

1560

1563

1566

1569

1572

PRINT "Pincl= " ;Pincl, "Pinc2= " ?Pinc2 , ”Pratio="

PROUND ( Pinc2/Pincl , -5

)

Nextj j : NEXT J

J=0

Incj : J=J+1

IF J<=Repeats THEN L_loop

PRINT

IF Swcl OR Swpl THEN K=K-1

IF Swc2 OR Swp2 THEN K=K+1

GOTO Inck

L_loop: L=0

Incl: L=L+1

IF L>8 THEN PRINT

IF L>8 THEN Incj

PRINT USING Forml ; Power ( I , J , K, L)

GOTO Incl

HeaderO: IMAGE #,2X,D.7D,6X

Headerl : IMAGE //9A, 3D. 6D, 4A, 5X, 2D, 10A/

Header2 : IMAGE 8(5X,5A)/

Forml: IMAGE #,2X,2D.5D

Exit: PRINTER IS 16

DISP " " SUBEND

i *********** SUBPROGRAM FDATA **************************

! FILE NAME: FDATA ! 811217-1400 BCY

S Prtpwr(

Date$ 1356

Dim 1356

Exit: 1560

Forml

1557

Freq_o

(

1356

HeaderO

1548

Headerl 1551

Header2 1554

I 1386

Inci: 1386

Incj : 1512

Inck: 1404

Incl

1533

1371

1383

1389

1392

1386 1389 1392 1494

1407

1539

1527

1545

1500 1542

69
J 1488 1491 1494 1500 1506 1509 1512

1512 1515 1542

J_loop: 1488 1413 1461

K 1401 1404 1404 1407 1419 1422 1425

1428 1431 1434 1437 1437 1437 1440

1440 1440 1443 1443 1443 1446 1446

1446 1449 1449 1449 1452 1452 1452

1455 1455 1458 1458 1464 1467 1470

1473 1476 1479 1482 1482 1485 1485

1494 1500 1521 1521 1524 1524 1542

L 1530 1533 1533 1536 1539 1542

L_loop: 1530 1515

Mounts 1356

Nextj j

1506 1497

Nfreqs 1356 1389

Pi ( 1356 1494 1500

Pincl 1494 1497 1503 1503

Pinc2 1500 1503 1503

Power

(

1356 1542

Print$ 1356 1365 1368

Repeats 1356 1392 1491 1515

Rvgavl

(

1356 1374 1374

Rvgav2

(

1356 1374 1374

Stopk 1383 1407

Swcl 1410 1449 1455 1521

Swc2 1410 1452 1458 1524

Swpl 1410 1473 1482 1521

Swp2 1410 1479 1485 1524

Time$ 1356 1371

Two_p: 1464 1416

Typ_flag 1356 1413 1416

70
1575

1578

1581

1584

1587

1590

1593

1596

1599

1602

1605

1608

1611

1614

1617

1620

1623

1626

1629

SUB Fdata(Nfreqs,Freq_a(*) , FreqL_o(*) ,Path_a(*) ,Path_o(*)

,

Fstop_o ( * ), Map ( * )

)

OPTION BASE 1

MAT Fstop_o=(Nfreqs)

MAT Freq_o=Freq_a

MAT Path_o=Path_a

CALL Order (FreqL.o(*) ,Nfreqs)

CALL Order (Path_o(*) ,Nfreqs)

Inc_i: 1=1+1

IF I>Nfreqs THEN SUBEXIT

Temp=Freq_o ( I

)

J=0

Inc_j : J=J+1

IF J>Nfreqs THEN Inc_i

IF Freq_a ( J) <>Temp THEN Inc_j

Map ( J) =1

GOTO Inc_i

SUBEND

1 *********** SUBPROGRAM MEASURE ***********************

! FILE NAME: MEASRE ! 810916-2120 BCY

S Fdata

(

Freq_a

(

1575 1584 1614

Freq_o 1575 1584 1590 1602

Fstop_o

(

1575 1581

I 1596 1596 1599 1602 1617

Inc_i: 1596 1611 1620

Inc_j

1608 1614

J 1605 1608 1608 1611 1614

Map ( 1575 1617

Nfreqs 1575 1581 1590 1593 1599

Path_a

(

1575 1587

Patho

(

1575 1587 1593

Temp 1602 1614

1617

1611

71
1632

1635

1638

1641

1644

1647

1650

1653

1656

1659

1662

1665

1668

1671

1674

1677

1680

1683

1686

1689

1692

1695

1698

1701

1702

1704

1707

1710

1713

1716

1719

1722

1725

1728

1731

1734

1737

1740

1743

1746

1749

1752

1755

1758

1761

1764

1765

SUB Measre (Type$ , Repeats , End , Freq ( * )

, Path ( * ), A1 ine ( * )

,

Fstop(*) ,Hi_lo_port ,Nfreqs , Devices , Rvgl(*)

,

Rvg2 ( * )

, Po_out ( * ), Map ( * )

, Typ$ , Sp , Pi ( * )

, Pmnt ( * )

,

Sn(*)

)

OPTION BASE 1

DIM Von (Repeats, 10) , Vine (Repeats, 10)

DIM Cont$[41] ,Clear$[12]

DIM Voff 1 (1,10) , Voff 2 (1,10) ,Vioffl (1, 10) , Viof f 2 ( 1 , 10)

,

CXir$ [ 12

]

DIM Wait$ [ 24 ] ,Clr$[18] ,Edit$[20] ,Cler$[12] ,Ec$[l] ,Clar$[12]

,

Cnt$ [41]

Ec$=CHR$ ( 27

)

Wait$=" -- WAIT"

Cont$=Ec$&"&a3r34C"&" — PRESS 'CONTINUE' WHEN READY"

Cnt$=Ec$&"&a3r26C"&" ~ PRESS 'CONTINUE' WHEN READY"

Clear$=Ec$&"m"&Ec$&"&a3r34C"&Ec$&"J"

Clr$=Ec$&"m"&Ec$&"&a3rOC"&Ec$&"J"&Ec$&"&a3r9C"

Cler$=Ec$&"m"&Ec$&"&a3r34C"&Ec$&"K"

Edit$=Ec$&"&a3rl6C" &Ec$&"Q"&"ED" &Ec$&"R" &Ec$&"B" &Ec$&"B"

&Ec$&"l"

Clar$=Ec$&"m"&Ec$&"&a3r26C"&Ec$&"J"

Clir$=Ec$&"m"&Ec$&"&a3r28C"&Ec$&"J"

Typ_f lag=POS (Typ$ , "P"

)

Rvg_reads=10

Vof f_rds=Pwr_reads=Dvm_rds=2

Nphase=End

T_device=Al ine ( 1

)

Mode=0

CALL Fase_shft (4 ,Hi_lo_port)

IF ( Type $<> "ORDERED" ) AND (Nfreqsol) THEN Rfout

IF Type$<>" ORDERED" THEN Pause

IF Typ_flag=l THEN GOSUB Device3

IF Typ_flag=2 THEN GOSUB Device6

IF Typ_flag=3 THEN GOSUB Device8

IF Typ_flag=4 THEN GOSUB Device9

IF Hi_lo_port AND (Typ_flag<>4 ) THEN OUTPUT 710; "5354"

IF NOT Hi_lo_port OR (Typ_flag=4) THEN OUTPUT 710 ; "52545556"

Rfout: CALL Rfout ( "INIT" , Path (*) ,Freq(*) , 1 , 1 , Hi_lo_port)

IF Type$ < > " ORDERED " THEN Pause

IF (Typ_flag=4) OR NOT Hi_lo_port THEN CALL Rvgs (Rvg_reads

,

Hi_lo_port , Typ_flag , Rvgl ( * )

, Rvg2 ( * )

)

IF (Typ_flag<>4) AND Hi_lo_port THEN CALL Rvgs (Rvg_reads

,

Hi_lo_port, Typ_flag, Rvgl (*) ,Rvg2 (*)

)

PRINT USING "K";Ec$&"V"

WAIT 3000

IF Typ_flag<>4 THEN PRINT Clear$ ;Cont$ ;CHR$ (7)

IF Typ_flag=4 THEN PRINT Clear$ ;Cnt$ ;CHR$ (7)

DISP " » Pause: PAUSE

IF Type$= " ORDERED" THEN PRINT Clar$;Edit$

IF Type$="AIRLINE" THEN PRINT Clear$?Edit$

Stop=0

Freqs=l

I - START MEASUREMENTS

IF Type$<> "AIRLINE" THEN OUTPUT 717 , 718 ; "F3VR1S4T0 ,

72
1766

1767

1770

1773

1776

1779

1782

1785

1788

1791

1794

1797

1800

1803

1806

1809

1812

1815

1818

1821

1824

1827

1830

1833

1836

1839

1842

1845

1848

1851

1854

1857

1860

1863

1866

1869

1872

1875

1878

1881

1884

1887

1890

1893

1896

1899

1902

CALL Fase_shft (1 ,Hi_lo_port)

FOR Device=l TO Devices

IF Device>4 THEN Nphase=4

IF Typ_flag=2 THEN Nphase=4

IF Type$ < > "AIRLINE " THEN Order

Start=Stop+l

Stop=Fstop (Freqs) +Start-1

Cntphi=8

GOTO Begin

Order: Start=l

Stop=Nfreqs

Begin: Path=Path (Start)

! OUTPUT 710 USING "4 (K/) "

? "71" ; "41" ; "4" ; "7"

! CALL Preads (Vof f_rds,Hi_lo_port, 1, Voff 1 (*) , Viof f 1 (*) )

i PHASE LOOP

FOR Phase=l TO Nphase

Cntphi=Cntphi+l

IF (Cntphi=l) AND (Typ_flag=l) THEN Dev

IF (Cntphi=2 ) AND (Typ_flag=0) THEN Cnnct

IF (Cntphi=2 ) AND (Typ_flag<=l) THEN Dev

IF Typ_flag>l THEN Freqs

IF Cntphi<>9 THEN Freqs

IF Type$<> "AIRLINE" THEN Cntphi=13

i - FREQUENCY AND REPEAT LOOP

Freqs: FOR Freqs=Start TO Stop

Vof f : OUTPUT 710 USING "4 (K/) "

; "71" ; "41" ; "4" ; "7"

CALL Preads (Vof f_rds,Hi_lo_port / 1, Vof fl (*) ,Vioffl(*)

)

IF Typ_flag=4 THEN CALL Pwrmnt (Rvgl (*) , Rvg2 (*) , Repeats , Freqs

,

Device , Pwr_reads , Pmnt ( * )

)

IF Type_flag<>4 THEN OUTPUT 710 USING "4 (K/) "

; "71" ; "40"

ii 4ii . ii 7ii Repeat: FOR Repeat=l TO Repeats

CALL Preads ( Dvm_rds , Hi_lo_port , Repeat , Von ( * )

, Vine ( * )

)

NEXT Repeat

OUTPUT 710 USING "4 (K/) "

; "71" ? "41" ; "4" ? "7"

CALL Preads (Vof f_rds,Hi_lo_port, l,Voff2 (*) ,Vioff2 (*)

)

IF Nfreqs=l THEN Pcalc

IF FreqsoStop THEN CALL Rfout ( "NEXT" , Path (*) , Freq(*) , Freqs, Start, Hi_lo_port)

IF FreqsoStop THEN Pcalc

IF (Freqs=Nfreqs) OR (Phase<>4) THEN CALL Rfout

("FIRST" , Path (*) ,Freq(*) , Freqs , Start , Hi_lo_port)

IF (Freqs=Nfreqs) OR (Phase<>4) THEN Pcalc

CALL Rfout ("NEXT", Path (*) ,Freq(*) , Freqs , Start , Hi_lo_port)

i — CALCULATE POWER

Pcalc: ! CALL Pcalc (Type$,Typ$,Hi_lo_port, Repeats, Cntphi, Freqs, Rvgl (*)

,

Rvg2 ( * )

, Vof f 1

( * )

, Vof f 2

( * )

, Von ( * ), Vine ( * )

, Po_out ( * ), Map ( * )

,

Pi (*) ,Viof f 1 (*) , Vioff 2 (*)

)

NEXT Freqs

IF (Device>4) OR (Type$="AIRLINE" ) OR (Typ$="2PORT"

)

AND (Freqs-l=Stop) THEN CALL Fase_shft ( Phase MOD

4+1 , Hi_lo_port)

i - end frequency and REPEAT LOOP

FOR I=Start TO Stop

73
1905

1908

1911

1914

1917

1920

1923

1926

1929

1932

1935

1938

1941

1944

1947

1950

1953

1956

1959

1962

1965

1968

1971

1974

1977

1980

1983

1986

1989

1992

1995

1998

2001

2004

2007

2010

2013

2016

2019

2022

2025

2028

2031

2034

2037

2040

2043

2046

2049

2052

2055

2058

FOR J=1 TO Repeats

IF Type$<> "ORDERED” THEN Aline

PRINT "Pincl= " ; PROUND (Pi (I , 1 ,J, Cntphi) , -5) , "Pinc2= "?

PROUND ( Pi ( I , 2 , J , Cntphi ) ,-5) , "Pratio= " ; PROUND ( Pi ( I , 2 , J

,

Cntphi) /Pi (I, 1,J, Cntphi) , -5)

GOTO Nxxtj

A1 ine : Pincl=Pi (Map (I) , 1 , J , Cntphi

)

Pinc2=Pi (Map (I) , 2 , J , Cntphi

)

PRINT "Pincl= " ; PROUND ( Pincl , -5 )

,

" Pinc2= PROUND (Pinc2 , -5) , "Pratio= " ; PROUND (Pinc2/Pincl , -5

)

Nxxtj: NEXT J

FOR J=1 TO Repeats

FOR K=1 TO 10

IF Type$ < > " ORDERED" THEN Nxtprt

PRINT USING Form; Po_out (I ,J, Cntphi ,K)

GOTO Nxtk

Nxtprt: PRINT USING Form ;Po_out (Map (I) ,J, Cntphi , K)

Nxtk: NEXT K

NEXT J

PRINT

PRINT

NEXT I

NEXT Phase

j __________________ END PHASE LOOP

IF Typ_flag=l THEN Test

IF (Typ_flag<>4) AND (Device=l) THEN Test

IF Device=Devices THEN Dev

GOSUB Device2

PAUSE

PRINT Clir$ ;Edit$

Test: IF Typ_flag>l THEN Dev

IF NOT Typ_flag AND (Device=l) THEN Dev

Cnnct : IF Type$<> "AIRLINE" THEN GOSUB Connect

PRINT

IF Type$<> "AIRLINE" THEN GOTO Paws

IF Stop=Nfreqs THEN Paws

Nxt_device=Aline (Stop+1)

IF T_device<>Nxt_device THEN GOSUB Connect

PRINT

T_device=Nxt_device

Paws: IF Device=Devices THEN Dev

IF Typ_flag<>4 THEN PRINT Clear$ ;Cont$ ?CHR$ (7)

IF Typ_flag=4 THEN PRINT Clear$ ;Cnt$ ;CHR$ (7)

PAUSE

IF Typ_flag<>4 THEN PRINT Cler$;Edit$

IF Typ_flag=4 THEN PRINT Clar$;Edit$

Dev: NEXT Device

! — END MEASUREMENT LOOP —

IF Type$ <> " ORDERED" THEN Exit

IF NOT ( (Typ_flag=0) OR (Typ_flag=4 ) ) THEN What

FOR Freqs=l TO Nfreqs

FOR Reps=l TO Repeats

FOR Device=l TO Devices

FOR Mnt=l TO 2

Po_out (Freqs, Reps, Device, 4+Mnt) =Pmnt (Freqs, Reps, Device, Mnt)

74
2061 NEXT Mnt

2064 FOR 1=7 TO 10

2067 Po out (Freqs, Reps , Device, I )=0

2070 NEXT I

2073 NEXT Device

2076 GOTO Rep

2079 Sp2

Po out ( Freqs , Reps ,1,1) =Po_out ( Freqs , Reps

,

2082 Po out ( Freqs , Reps ,1,2) =Pmnt ( Freqs , Reps

)

2085 FOR 1=3 TO 5

2088 Po out(Freqs,Reps,l,I)=0

2091 NEXT I

2094 Rep: NEXT Reps

2097 NEXT Freqs

2100 What: IF Typ f lag>l THEN Exit

2103 IF Type$ < > " AIRLINE " THEN SUBEXIT

2106 Exit: PRINT Ec$&"m" ;CHR$ (12)

2109 OUTPUT 710 USING "4 (K/) "

; "71" ; "41" ; "4" ; "7"

2112 LOCAL 717,718

2115 RESET 717,718

2118 LOCAL 728

2121 OUTPUT1 710 ;"C"

2124 PRINT CHR$ (12)

2127 DISP " it 2130 SUBEXIT

2133 | r*rwi\T'C' r*rr r>TT7T r»rc cttddattt' t xtt? c 2136 Connect: DISP "CONNECT NEXT DEVICE ? — (Y/N) " ; CHR$ (7

)

2139 D0=FNYorn

2142 IF DO THEN T airlin

2145 IF NOT DO THEN PRINT Ec$&"m" ; CHR$ ( 12 ) ; LIN ( 10 ) ; TAB

PROGRAM HALT — PRESS RUN TO RESTART"

STOP

T_airlin: IF Type$0"AIRLINE" THEN Which

PRINT USING "#,K";Clr$; "CONNECT Aline (Stop+I)

" CM AIR LINE" ;Cont$;CHR$(7)

RETURN

Which: ON Device+1 GOTO Devicel , Device2 , Device3 , Device4

,

Device5 , Device6 , Device72163 Devicel: PRINT "NOTHING"

Device2: PRINT CHR$ (12) ; Clr$ ; CHR$ (7) ; "CONNECT MOUNT";

Sn(Device+l) ; "TO B1 AND 6-PORT 1";CHR$(13)

&CHR$ (10) ;TAB(10) ; "MOUNT" ; Sn(Device+2) ; "TO B2"

PRINT LIN(l) ; TAB (10) ; "IF MOUNT - 0, USE ANY MOUNT";

LIN(2) ; TAB (10) ;

PRESS 'CONT' WHEN READY" ; CHR$ (7)

2172 RETURN

2175 Device3 : IF Typ_flag THEN PRINT CHR$ (12) ; Clr$ ; CHR$ (7)

"CONNECT SHORTS" ;Wait$

2178 IF NOT Typ_flag THEN PRINT CHR$ (12) ; Clr$ ; CHR$ (7)

"CONNECT SHORTS" ;Cont$

2181 RETURN

2184 Device4 : PRINT USING "#,K" ;Clr$ ; "CONNECT OPENS" ; Cont$ ; CHR$ (7

)

2187 RETURN

2190 Device5 : PRINT USING "# ,K" ; Clr$ ; "CONNECT THRU" ;Cont$ ;CHR$(7)

2193 RETURN

2196 Device6 : PRINT USING "# ,K" ; Clr$ ; CHR$ (7)

2148

2151

2154

2157

2160

2166

2169

75
2199 IF Typ_flag<2 THEN PRINT USING "#,K" ; "CONNECT

2 -PORT" ;Cont$

2202 IF Typ_flag-2 THEN PRINT USING "#,K" ; "CONNECT

2-PORT" ;Wait$

2205 RETURN

2208 Device7 : PRINT USING "#,K" ;Clr$; "CONNECT "; Aline (1) ; " CM

AIR LINE" ;Cont$;CHR$(7)

2211 RETURN

2214 Device8 PRINT USING "#,K" ;Clr$ ; "CONNECT l-PORT(S) " ; Wait$

HR$(7)

2217 RETURN

2220 Device9 : PRINT CHR$ (12) ; Clr$ ; CHR$ (7) ; "CONNECT STD MOUNT" ;Sn(l)

"TO B1 AND 6-PORT 1" ; CHR$ (13)&CHR$ (10) ; TAB(IO)

"MOUNT WITH SERIAL NUMBER" ; Sn(2) ; "TO B2" ;Wait$

2223 RETURN

2226 Form: IMAGE #,10(D.5D,X)

2229 SUBEND

2232 ! *************** SUBPROGRAM RVGS **********************

2235 ! FILE NAME: RVGS ! 810526-1455- - -BCY

S Measre(

Aline

(

1632 1692 2004 2154 2208

Aline1917 1908

Begin: 1797 1788

Clar$ 1647 1674 1752 2031

Clear$ 1641 1662 1740 1743 1755 2019 2022

Cler$ 1647 1668 2028

Clir$ 1644 1677 1983

Clr$ 1647 1665 2154 2166 2175 2178 2184

2190 2196 2208 2214 2220

Cnnc t

1992 1818

Cnt$ 1647 1659 1743 2022

Cntphi 1785 1812 1812 1815 1818 1821 1827

1830 1890 1911 1911 1911 1911 1917

1920 1938 1944

Connect

2136 1992 2007

Cont$ 1641 1656 1740 2019 2154 2178 2184

2190 2199 2208

DO 2139 2142 2145

Dev: 2034 1815 1821 1974 1986 1989 2016

76
Device 1767 1770 1845 1896 1971 1974 1989

2016 2034 2052 2058 2058 2067 2073

2160 2166 2166

Devicel

2163 2160

Device2

2166 1977 2160

Device3

2175 1704 2160

Device4

2184 2160

Device5

2190 2160

Device6

2196 1707 2160

Device7

2208 2160

Device8

2214 1710

Device9

2220 1713

Devices 1632 1767 1974 2016 2052

Dvm rds 1686 1854

Ec$ 1647 1650 1656 1659 1662 1662 1662

1665 1665 1665 1665 1668 1668 1668

1671 1671 1671 1671 1671 1671 1674

1674 1674 1677 1677 1677 1734 2106

2145

Edit$ 1647 1671 1752 1755 1983 2028 2031

End 1632 1689

Exit: 2106 2040 2100

Form: 2226

Freq( 1632 1722 1869 1875 1881

Freqs 1761 1782 1836 1845 1869 1869 1872

1875 1875 1878 1881 1890 1893 1896

2046 2058 2058 2067 2079 2079 2082

2082 2088 2097

Freqs

1836 1824 1827

Fstop( 1632 1782

Hi_lo_port 1632 1698 1716 1719 1722 1728 1728

1731 1731 1766 1842 1854 1863 1869

1875 1881 1890 1896

77
I 1902

1938

2088

1911

1944

2091

1911

1959

1911

2064

1911

2067

1917

2070

1920

2085

J 1905

1926

1911

1929

1911

1938

1911

1944

1911

1950

1917 1920

K 1932 1938 1944 1947

Map( 1632 1890 1917 1920 1944

Mnt 2055 2058 2058 2061

Mode 1695

Nfreqs 1632

2046

1701 1794 1866 1875 1878 2001

Nphase 1689 1770 1773 1809

Nxt_device 2004 2007 2013

Nxtk: 1947 1941

Nxtprt1944 1935

Nxxtj

1926 1914

Order: 1791 1776

Path 1797

Path( 1632 1722 1797 1869 1875 1881

Pause

1749 1702 1725

Paws

2016 1998 2001

Pcalc

1887 1866 1872 1878

Phase 1809 1875 1878 1896 1962

Pi( 1632

1920

1890 1911 1911 1911 1911 1917

Pincl 1917 1923 1923

Pine 2 1920 1923 1923

Pmnt ( 1632 1845 2058 2082

Po out( 1632

2079

1890

2082

1938

2088

1944 2058 2067 2079

Pwr reads 1686 1845

78
Rep

2094 2076

Repeat 1851 1854 1857

Repeat

1851

Repeats 1632 1638 1638 1845 1851 1890 1905

1929 2049 2049 2058 2058 2067 2079

2079 2082 2082 2088 2094

Rfout

1722 1701

Rvgl( 1632 1728 1731 1845 1890

Rvg2( 1632 1728 1731 1845 1890

Rvg reads 1683 1728 1731

Sn( 1632 2166 2166 2220 2220

Sp 1632

Sp2

2079

Start 1779 1782 1791 1797 1836 1869 1875

1881 1902

Stop 1758 1779 1782 1794 1836 1869 1872

1896 1902 2001 2004 2154

T_airlin: 2151 2142

T device 1692 2007 2013

Test1986 1968 1971

TyP $ 1632 1680 1890 1896

Typ_flag 1680 1704 1707 1710 1713 1716 1719

1728 1728 1731 1731 1740 1743 1773

1815 1818 1821 1824 1845 1968 1971

1986 1989 2019 2022 2028 2031 2043

2100 2175 2178 2199 2202

Type$ 1632 1701 1702 1725 1752 1755 1765

1776 1830 1890 1896 1908 1935 1992

1998 2040 2103 2151

Type_flag 1848

Vine ( 1638 1854 1890

Vioffl

(

1644 1842 1890

79
Vioff2

(

1644 1863

Voffl( 1644 1842

Voff2

(

1644 1863

Voff1839

Voff rds 1686 1842

Von( 1638 1854

Wait$ 1647 1653

What2100 2043

Which: 2160 2151

1890

1890

1890

1863

1890

2175 2202 2214 2220

80
2238

2241

2244

2247

2250

2253

2256

2259

2262

2265

2268

2271

2274

2277

2280

2283

2286

2289

2292

2295

2298

2301

2304

2307

2310

2313

2316

2319

2322

2325

2328

2331

2334

2337

2340

2343

2346

2349

2352

2355

2358

2361

2364

2367

2370

2373

2376

2379

2382

2385

2388

SUB Rvgs (Reads, Hi_lo_port,Typ_flag, Rvgavl(*) ,Rvgav2(*))

OPTION BASE 1

DIM Rvgl$ (Reads+1) , Rvg2$ (Reads+1) .Tempi (Reads) ,Temp2 (Reads)

Start: Dvml-717

Dvm2-718

Stopj-1

IF NOT Hi_lo_port OR (Typ_flag=4) THEN OUTPUT 710; "5556"

IF NOT Hi_lo_port OR (Typ_flag«4) THEN J-l

IF NOT Hi_lo_port OR (Typ_flag=4) THEN Stopj-2

IF NOT Hi_lo_port OR (Typ_flag»4) THEN Inc-1

OUTPUT Dvml , Dvm2 USING Initial

OUTPUT 709; "0919"

Incj : J-J+l

IF J>Stopj THEN Exit

CALL Dvms (Reads, Rvgl$ (*) ,Rvg2$(*))

1=0

Inci: 1=1+1

IF I>Reads THEN Test

Tempi (I)=-VAL(Rvgl$ (1+1)

)

Temp2(I)—VAL(Rvg2$(I+l))

GOTO Inci

Test : Rvgtest=Rvgavl(J)=SUM (Tempi) /Reads

GOSUB Swtch

Rvgtest=Rvgav2 ( J)=SUM(Temp2) /Reads

IF NOT Hi_lo_port THEN GOSUB Swtch

Maxs-Maxt-0

Mins=Mint=9

1-0

Inc_i : 1=1+1

IF I>Reads - 1 THEN Var

Maxl=MAX(Templ(I) ,Templ(I+l))

Minl-MIN (Tempi ( I ) ,Templ(I+l))

Max2-MAX(Temp2 (I ), Temp 2(1+1))

Min2-MIN(Temp2(I) ,Temp2(I+l))

IF Maxl>Maxs THEN Maxs-Maxl

IF Minl<Mins THEN Mins-Minl

IF Max2>Maxt THEN Maxt=Max2

IF Min2<Mint THEN Mint=Min2

GOTO Inc_i

Var: Varl-Maxs-Mins

Var2-Maxt -Mint

PRINT USING "K" ; CHR$ (27)&"&al5R"

Secline: PRINT "MAXIMUM VARIATION WITH ";Reads;

"READINGS ON RVG ("; J+Inc ;");"=" ;Varl ; LIN( 1 )

TAB (41) ; "RVG ( " ; J+Inc+1 ; " ) - ";Var2;" VOLTS"

Inc-Inc+1

! IF NOT Hi_lo_port OR (Hi_lo_port-2) THEN OUTPUT 710; "5556"

GOTO Incj

Swtch: IF Rvgtest<2 THEN DISP "RVG MECHANICAL SWITCH (ES)

ARE IN THE WRONG POSITION OR SCANNER IS OFF -- PAUSE"

CHR$ (7)

IF Rvgtest>2 THEN RETURN

PAUSE

LOCAL Dvml , Dvm2

RESET Dvml,Dvm2

81
2391 WAIT 3000

2394 GOTO Start

2397 Exit: OUTPUT 709 ;"C"

2400 LOCAL Dvml , Dvm2

2403 RESET Dvml,Dvm2

2406 IF Hi_lo_port AND (Typ_flag<>4) THEN OUTPUT 710; "5 ,5354

2409 Initial: IMAGE "F3VR1S7T0 ,

2412 SUBEND

2415 ! **************** SUBPROGRAM DVMS *********************

2418 ! FILE NAME: DVMS ! 810514-1805- - -BCY

S Rvgs

(

Dvml 2247 2268 2385 2388 2400 2403

Dvm2 2250 2268 2385 2388 2400 2403

Exit2397 2277

Hi lo port 2238 2256 2259 2262 2265 2310 2406

I 2283 2286 2286 2289 2292 2292 2295

2295 2319 2322 2322 2325 2328 2328

2331 2331 2334 2334 2337 2337

Inc 2265 2364 2364 2367 2367

Inc i

2322 2352

Inci

2286 2298

Incj : 2274 2373

Initial

2409

J 2259

2364

2274 2274 2277 2301 2307 2364

Maxi 2328 2340 2340

Max2 2334 2346 2346

Maxs 2313 2340 2340 2355

Maxt 2313 2346 2346 2358

Mini 2331 2343 2343

Min2 2337 2349 2349

Mins 2316 2343 2343 2355

Mint 2316 2349 2349 2358

82
Reads 2238

2301

2244

2307

Rvgl$( 2244 2280

Rvg2$( 2244 2280

Rvgavl

(

2238 2301

Rvgav2 2238 2307

Rvgtest 2301 2307

Secline

2364

Start

2247 2394

Stopj 2253 2262

Swtch

2376 2304

Tempi

(

2244 2292

Temp2 2244 2295

Test

2301 2289

Typ_fla g 2238 2256

Varl 2355 2364

Var2 2358 2364

Var: 2355 2325

2244 2244 2244 2280 2289

2325 2364

2292

2295

2376 2379

2277

2310

2301 2328 2328 2331 2331

2307 2334 2334 2337 2337

2259 2262 2265 2406

83
2421

2424

2427

2430

2433

2436

2439

2442

2445

2448

2451

2454

2457

2460

2463

2466

2469

2472

2475

2478

2481

2484

2487

2490

SUB Dvms (Reads, Vl$ (*) ,V2$(*>)

OPTION BASE 1

Dvml-717

Dvm2-718

ON INT #7,2 GOSUB Srq

CONTROL MASK 7; 128

CARD ENABLE 7 OUTPUT Dvml , Dvm2

1-1

Re ads 1—Reads+1

Idle: ! GOTO Idle

Srq: ENTER Dvml BINT NOFORMAT ;V1$( I)

IF I-Reads 1 THEN Dvm2

OUTPUT Dvml; "(a"

Dvm2: ENTER Dvm2 BINT NOFORMAT ;V2$( I)

IF I-Readsl THEN Exit

OUTPUT Dvm2

I-I+l

RETURN

Exit: OUTPUT Dvml , Dvm2 ; " %

SUBEND

! *•**•*******•*•*•**•*•*• READ POWER *********************'**'**'*'*''*

! FILE NAME: PREADS ! 810608 - 1110- - -BCY

S Dvms (

Dvml 2427 2442 2457 2463 2481

Dvm2 2430 2442 2466 2472 2481

Dvm2

2466 2460

Exit 2481 2469

I 2445 2457 2460 2466 2469

Idle: 2451 2454

Reads 2421 2448

Readsl 2448 2460 2469

Srq: 2457 2433

Vl$( 2421 2457

V2$( 2421 2466

84
2493

2496

2499

2502

2505

2508

2511

2514

2517

2520

2523

2526

2529

2532

2535

2538

2541

2544

2547

2550

2553

2556

2559

2562

2565

2568

2571

2574

2577

2580

2583

2586

2589

2592

2595

2598

2601

2604

2607

2610

2613

2616

2619

2622

2625

SUB Preads (Reads ,Hi_lo_port .Repeat .Volts (*) ,Vinc(*)

)

OPTION BASE 1

DIM Decade$ [4] ,V1$ (Reads+1) , V2$ (Reads+1) .Tempi (Reads)

,

Temp2 (Reads

)

! IF Repeat-1 THEN OUTPUT 717,718 USING Initial

Mnt-1

Incr-1

Incp$-"00"

Port$-"3" ! port #1

! IF NOT Hi_lo_port THEN OUTPUT 710; "5556"

Incmnt : Mnt-Mnt+1

IF Mnt>9 THEN Exit

Mnt$-VAL$ (Incr)

OUTPUT 709 ; Incp$&Port$&Mnt$

IF Mnt>5 THEN Mnt789

CALL Dvms (Reads, Vl$ (*) ,V2$(*))

FOR 1-1 TO Reads

Tempi (I)=VAL(V1$ (1+1) )

! Mntl

Temp2(I)-VAL(V2$(I+l) )! Mnt234

NEXT I GOSUB Ave

GOTO Incr

Mnt789 : CALL Dvms (Reads ,V1$ (*) ,V2$ (*)

)

FOR 1-1 TO Reads

Tempi (I )-VAL(V2$ (1+1) ) ! Mntl

Temp2 (I)—VAL(V1$ (1+1) )! Mnt789

NEXT I GOSUB Ave

Incr: Incr-Incr+1

IF (Mnt<4) OR (Mnt>6) THEN GOTO Incmnt

Mnt-Mnt+2

Port$«="2"

Incp$="10"

Incr-1

OUTPUT 709 ; "C"

GOTO Incmnt

Exit: OUTPUT 709 ;"C"

! IF NOT Hi_lo_port THEN OUTPUT 710 ; "5 , 5254"

SUBEXIT

Ave : Vinc(Repeat ,Mnt) -SUM (Tempi) /Re ads

Volts (Repeat ,Mnt)-SUM(Temp2)/Reads

RETURN

Initial: IMAGE "F3VR1S4T0 ,

SUBEND

i *************** SUBPROGRAM PCALC ************************

! FILE NAME: PCALC ! 810807-1800- - -BCY

S Preads

(

Ave

Decade$

Exit

2607 2550 2571

2499

2598 2523

85
Hi_lo_port 2493

I 2538 2541

2562 2562

Incmnt

2520 2577

Incp$ 2511 2529

Incr 2508 2526

Incr2574 2553

Initial2616

Mnt 2505 2520

2580 2580

Mnt$ 2526 2529

Mnt789: 2556 2532

Port$ 2514 2529

Reads 2493 2499

2556 2559

Repeat 2493 2607

Tempi

(

2499 2541

Temp2

(

2499 2544

vi$( 2499 2535

V2$( 2499 2535

Vinc( 2493 2607

7olts

(

2493 2610

2541

2565

2544

2565

2544

2568

2547 2559

2595

2586

2574 2574 2589

2520

2607

2523

2610

2532 2577 2577

2583

2499

2607

2499

2610

2499 2535 2538

2610

2562 2607

2565 2610

2541 2556 2565

2544 2556 2562

86
2628

2631

2634

2637

2640

2643

2646

2649

2652

2655

2658

2661

2664

2667

2670

2673

2676

2679

2682

2685

2688

2691

2694

2697

2700

2703

2706

2709

2712

2715

2718

2721

2724

2727

2730

2733

2736

2739

2742

2745

2748

2751

2754

2757

2760

2763

2766

2769

2772

2775

2778

2781

2784

SUB Pcalc (Type$ , Typ$ , Hi_lo_port , Repeats , Count , Freqs , Rvgl (*)

,

Rvg2 (*) ,Voffl(*) ,Voff2(*) , Von(*) ,Vinc(*) ,P_out(*)

,

Map (*) , Pine (*) ,Vioffl(*) ,Vioff2(*)>

OPTION BASE 1

DIM Off_sum(l , 10) , Voff_ave (1 , 10)

DIM Off_sumi(l , 10) ,Voff_avei(l , 10)

DIM On(Repeats , 10) ,Trvgl(2) ,Trvg2(2)

TyP“POS (Typ$ , "P")

MAT Off_sum=Voff1+Voff2

MAT Off_sumi-Vioff1+Vioff2

MAT Voff_ave-Off_sum/(2)

MAT Voff_avei-Off_sumi/(2)

MAT On=Von

GOTO Skprtl

PRINTER IS 7,1 ! FOR PRINTOUT OF

MAT PRINT Voff 1 ! VOFFS AND VONS

MAT PRINT Vioffl

MAT PRINT Voff

MAT PRINT Vioff

MAT PRINT Von

MAT PRINT Vine

PRINTER IS 16

Skprtl: ! MAT Trvgl-Rvgl* ( 2

)

MAT Trvg2-Rvg2*(2)

F-Freqs

Rep : Rep=Rep+l

IF Rep>Repeats THEN SUBEXIT

Mnt-1

Mnt : Mnt~Mnt+l

IF Mnt>4 THEN Rep

Inc-NOT Hi_lo_port OR (Typ-4)

Suml-On(Rep ,Mnt)+Voff_ave (1 , Mnt )+Trvg2 (1+Inc)

Sumli=Vinc (Rep ,Mnt)+Voff_avei (1 , Mnt )+Trvgl( 1+Inc)

Sum2-=0n(Rep , Mnt+5 ) +Voff_ave ( 1 , Mnt+5 ) +Trvgl ( 1+Inc

)

Sum2 i=V inc ( Rep , Mnt+5 ) +Vo f f_ave i ( 1 , Mnt+5 ) +Trvg2 (1+Inc

)

Dell=Voff_ave (1 ,Mnt) -On(Rep ,Mnt)

Delli-Voff_avei(l ,Mnt) -Vinc(Rep ,Mnt)

Del2-Voff_ave (1 , Mnt+5) -On(Rep , Mnt+5)

Del2i=Voff_avei(l , Mnt+5) -Vine (Rep , Mnt+5)

IF Type $-" AIRLINE" THEN A_line

IF Mnt>2 THEN Skip

Pine (F, 1 , Rep , Count )~5*Sumli*Delli ! for display

P_out(F,Rep , Count , 2)=5*Suml*Dell/(5*Sumli*Delli)

Pinc(F, 2 ,Rep ,Count)-=5*Sum2i*Del2i ! for display

P_out (F,Rep , Count , 7)=»5*Sum2*Del2/(5*Suin2i*Del2i)

P_out ( F , Rep , Count , 1

) -P_out ( F , Rep , Count , 6

) -1

GOTO Mnt

Skip: Pincl-5*Sumli*Delli

P_out(F,Rep , Count , Mnt) «5*Suml*De 11/P inc

Pinc2«5*Sum2i*Del2i

P_out(F,Rep , Count ,Mnt+5)*=5*Sum2*Del2/Pinc2

GOTO Mnt

A_1 ine : IF Mnt>2 THEN Skp

Pinc(Map(F) , 1 ,Rep , Count)-5*Sumli*Delli

87
2787 Pine (Map (F) , 2 ,Rep , Count)-5*Sum2i*Del2i

2790 P_out(Map(F) ,Rep,Count,l)-P_out(Map(F) ,Rep , Count , 6)«*1

2793 P_out(Map(F) , Rep, Count, 2)-5*Suml*Dell/(5*Sumli*Delli)

2796 P_out(Map(F) , Rep , Count , 7)-5*Sum2*Del2/(5*Sum2i*Del2i)

2799 GOTO Mnt

2802 Skp : Pincl«5*Sumli*Delli

2805 Pinc2-5*Sum2i*Del2i

2808 P_out(Map(F) , Rep, Count , Mnt )-5*Suml*Dell/Pincl

2811 P_out(Map(F) , Rep, Count, Mnt+5)-5*Sum2*De 12/P inc

2814 GOTO Mnt

2817 SUBEND

2820 » *********** SUBROUTINE SYNTHESIZER *****************

2823 ! FILE NAME: SYNTH

S Pcalc(

A_line

2781 2742

Count 2628 2748

2769 2775

2796 2808

Dell 2730 2751

Delli 2733 2748

Del2 2736 2757

Del2i 2739 2754

F 2697 2748

2769 2775

2796 2808

Freqs 2628 2697

Hi_lo_port 2628 2715

Inc 2715 2718

Map( 2628 2784

2808 2811

Mnt 2706 2709

2721 2724

2733 2733

2769 2775

Mnt

2709 2763

Off_sum( 2634 2646

Off_sumi( 2637 2649

! 811208-1700- --DHR & BCY

2751

2784

2811

2754

2787

2757

2790

2760

2790

2760

2793

2769 2793 2808

2751 2766 2784 2793 2802

2775 2796 2811

2757 2772 2787 2796 2805

2751

2784

2754

2787

2757

2790

2760

2790

2760

2793

2811

2721 2724 2727

2787 2790 2790 2793 2796

2709 2712 2718 2718 2721

2724 2727 2727 2730 2730

2736 2736 2739 2739 2745

2781 2808 2811

2778 2799 2814

2652

2655

88
On( 2640 2658 2718 2724 2730 2736

P out( 2628 2751 2757 2760 2760 2769 2775

2790 2790 2793 2796 2808 2811

Pine ( 2628 2748 2754 2784 2787

Pincl 2766 2769 2802 2808

Pinc2 2772 2775 2805 2811

Rep 2700 2700 2703 2718 2721 2724 2727

2730 2733 2736 2739 2748 2751 2754

2757 2760 2760 2769 2775 2784 2787

2790 2790 2793 2796 2808 2811

Rep

2700 2712

Repeats 2628 2640 2703

Rvgl( 2628 2691

Rvg2( 2628 2694

Skip

2766 2745

Skp2802 2781

Skprtl2688 2661

Suml 2718 2751 2769 2793 2808

Sumli 2721 2748 2751 2766 2784 2793 2802

Sum2 2724 2757 2775 2796 2811

Sum2i 2727 2754 2757 2772 2787 2796 2805

Trvgl

(

2640 2691 2721 2724

Trvg2( 2640 2694 2718 2727

Typ 2643 2715

Typ$ 2628 2643

Type$ 2628 2742

Vine ( 2628 2682 2721 2727 2733 2739

Vioffl( 2628 2649 2670

Vioff2

(

2628 2649 2676

Voffl( 2628 2646 2667

89
Voff2( 2628 2646 2673

Voff_ave( 2634 2652 2718 2724 2730 2736

Voff_avei( 2637 2655 2721 2727 2733 2739

Von( 2628 2658 2679

90
2826 SUB Synth(Mode,Freq,Last_freq, Level)

2827 ! INSERTED GO TO AND CALL STATEMENT AT 2830 AND 2928

RESP. 850724 1443 GJC

2829 Addr-728

2832 IF Level>6 THEN DISP "TOO MUCH SYNTHESIZER LEVEL CONTROL -- PROGRAM HALT"

2835 IF Level>6 THEN STOP

2838 Lvl-Level

2841 Freq_mhz-Freq*lE6

2844 IF (Freq>—2) AND (Last_freq<2) OR (Freq<2) AND (Last_freq>

2847

2850

2853

2856

2859

2862

2865

2868

2871

2874

2877

2880

2883

2886

2889

2892

2895

2898

2901

2904

2907

2910

2913

2916

2919

2922

2925

2928

2933

-2) THEN Attn_flag-1

IF Attn_flag THEN Attn-6

IF Attn_flag THEN Lo_lvl

Attn-INT (ABS (Lvl/10) )+2

Lo_lvl : Lo_lvl-350

OUTPUT Addr USING Lvlout ; Attn, Lo_lvl

OUTPUT Addr USING Mode; Mode

OUTPUT Addr USING Freq ; Freq_mhz

IF Attn_flag THEN Attn-INT(ABS (Lvl/10) )+2

Lvlout—ABS (Lvl*10- 240) - (Attn- 1) *100- (Lvl>0)

OUTPUT Addr USING Lvlout ; Attn , Lvlout

Status$—VAL$ (4)

Status: ENTER Addr;Status$

Temp-VAL( Status $

)

IF NOT Temp THEN SUBEXIT

Cnt-Cnt+1

IF Cnt<101 THEN Status

IF Temp-1 THEN PRINT "UNLOCKED" ; CHR$ ( 7

)

IF Temp-2 THEN PRINT "UNLEVELED" ; CHR$ (7)

IF Temp-3 THEN PRINT "UNLOCKED & UNLEVELED" ; CHR$ (7)

Countr=Countr+l

IF Countr<51 THEN Status

DISP "DO YOU WANT TO CONTINUE ? -- (Y/N) " ; CHR$ (7)

Cnt-Countr-0

IF FNYorn THEN Status

STOP

Mode

Freq

Lvlout

SUBEND

IMAGE "O'

IMAGE "H’ IMAGE

,D

,8Z

"N" , D , 3Z

2934 ! *********** SUBPROGRAM FILTER *************************

2937 ! FILE NAME: FILTER ! 810522-1630- - -BCY

S Synth

(

Addr 2829 2859

Attn 2847 2853

Attn_flag 2844 2847

Cnt 2889 2889

Countr 2904 2904

2862 2865 2874 2880

2859 2868 2871 2874

2850 2868

2892 2913

2907 2913

91
Freq 2826 2841 2844 2844

Freq: 2925

Freq_mhz 2841 2865

Last_freq 2826 2844 2844

Level 2826 2832 2835 2838

Lo_lvl 2856 2859

Lo_lvl2856 2850

Lvl 2838 2853 2868 2871

Lvlout 2871 2874

Lvlout2928

Mode 2826 2862

Mode2922

Status$ 2877 2880 2883

Status

2880 2892 2907 2916

Temp 2883 2886 2895 2898

2871

2901

92
2940 SUB Filter (Path)

2943 DIM Table$ (12 , 2) [ 6 ]

, Data$ [ 6 ]

, Pos$ [ 2

]

2946 Scanner-710

2949 Table$(l,l)-" 606162"

2952 Table$ (1 , 2)-Null$

2955 Table$ (2 , 1)-"6061"

2958 Table$(2 , 2)*="62"

2961 Table$(3 , l)-"6063"

2964 Table$(3 , 2)-"61"

2967 Table$(4,l)-"60"

2970 Table$ (4,2)-"6163"

2973 Table$(5 , l)-"64"

2976 Table$(5 , 2)-"60"

2979 Table$(6 , 1)-Null$

2982 Table$ (6,2)-" 6064"

2985 Table$(7,l)“"656667"

2988 Table$ (7 , 2)-Null$

2991 Table$ (8,1)-" 6566"

2994 Table$(8,2)-"67"

2997 Table $(9,1)-" 6568"

3000 Table$ (9 , 2)-"66"

3003 Table$(10,l)—"65"

3006 Table$ (10 ,2)-" 6668"

3009 Table$(ll,l)-"69"

3012 Table$(ll,2)“"65"

3015 Table$ (12 , 1)-Null$

3018 Table $(12, 2)-" 6569"

3021 Pos$-VAL$ (40+(Path>6)

)

3024 OUTPUT Scanner USING "4(K/) "

; "70" ; Pos$ ; "4" ; "7"

3027 Pos: Pos-Pos+1

3030 IF Pos>2 THEN SUBEXIT

3033 Data$-Table$ (Path , Pos)

3036 IF Data$-Null$ THEN Pos

3039 Pos$—VAL$ (40+(Pos-2)

)

3042 OUTPUT Scanner USING "4(K/) " ;Data$ ; Pos$ ; "4" ; "6"

3045 GOTO Pos

3048 SUBEND

3051 ! ************** SUBPROGRAM FASE SHFT *********************

3054 ! FILE NAME: FASE ”

! 810522-1810- - -BCY

S Filter

(

Data$ 2943 3033 3036 3042

Null$ 2952 2979 2988 3015 3036

Path 2940 3021 3033

Pos 3027 3027 3030 3033 3039

Pos$ 2943 3021 3024 3039 3042

Pos

3027 3036 3045

93
Scanner 2946 3024 3042

Table$

(

2943 2949 2952 2955 2958 2961 2964

2967 2970 2973 2976 2979 2982 2985

2988 2991 2994 2997 3000 3003 3006

3009 3012 3015 3018 3033

94
3057 SUB Fase_shft(I ,Hi_lo_port)

3060 DIM In$ [ 2 ], Out $ [ 2 ]

, Pos_in$ [ 2 ]

, Pos_out$ [ 2 ], Off_in$ [ 4 ]

, Off_out$ [ 4

]

3063 Temp-4*Hi_lo_port

3066 In$-VAL$ (43+Temp)

3069 Out$-VAL$ (44+Temp)

3072 Pos_in$-VAL$(40+((I«1) OR (1-2)))

3075 Pos_out$-VAL$ (40+ ( (I-l) OR (1-4)))

3078 Off_in$-"4 , "&In$

3081 0ff_out$-"4, "&Out$

3084 OUTPUT 710 USING "8 (K/) " ; In$ ; Pos_in$ ; Off_in$

n 4" ; Out$ ; Pos_out$ ; Off_out$ ; "4

If3087 SUBEND

3090 ! **************** SUBPROGRAM DAC **********************

3093 ! FILE NAME: DAC ! 810203-1830- - -BCY

S Fase_shft(

Hi_lo_port 3057 3063

I 3057 3072 3072 3075

In$ 3060 3066 3078 3084

Off_in$ 3060 3078 3084

Off out$ 3060 3081 3084

Out$ 3060 3069 3081 3084

Pos in$ 3060 3072 3084

Pos out$ 3060 3075 3084

Temp 3063 3066 3069

95
3096 SUB Dac(Volts ,Dac_err)

3099 Dac-706

3102 Dac_err«0

3105 IF (VoltsCO) OR NOT (Volts<l) THEN Dac_err-1

3108 IF Dac_err THEN SUBEXIT

3111 Data$—VAL$ (1000+INT (Volts/ . 001+ . 5)

)

3114 OUTPUT Dac USING "# , K" ; Data$

3117 SENDBUS Dac; 191

3120 SUBEND

3123 ! ************* FUNCTION DTG-DATE TIME GROUP **************

3126 ! FILE NAME: FNDTG$ ! 80513-17300- - -BCY

S Dac(

Dac 3099 3114 3117

Dac_err 3096 3102 3105 3108

Data$ 3111 3114

Volts 3096 3105 3105 3111

96
3129 DEF FNDtg$

3130 ! ! ! ! ! ! CHANGED DATE FROM 84 TO 85 850724:GJC

3132 OUTPUT 9; "Read"

3135 ENTER 9;A$

3138 Dtg$— "85"&A$ [ 1 , 2 ] &A$ [4 , 5 ] &" . "&A$ [ 7 , 8 ] &A$ [ 10 , 11 ] &A$ [ 13 , 14

]

3141 RETURN Dtg$

3144 FNEND

3147 ! **************** FUNCTION FNYORN ********************

3150 ! FILE NAME: FNYORN ! 810101-1600- - -BCY

FNDtg$

A$ 3135 3138 3138 3138 3138 3138

Dtg$ 3138 3141

97
3153 DEF FNYorn

3156 Key: Key-READBIN ( 0

)

3159 N-Answer-NOT ((Key-78) OR (Key-110))

3162 Y-Answer-(Key«89) OR (Key-121)

3165 IF NOT Y AND N THEN Key

3168 DISP

3171 RETURN Answer

3174 FNEND

3177 ******************* FUNCTION FNNUMI ********************

3180 ! FILE NAME: FNNUMI ! 810101-1600- - -BCY

FNYorn

Answer 3159

Key 3156

Key: 3156

N 3159

Y 3162

3162 3171

3159 3159 3162 3162

3165

3165

3165

98
3183 DEF FNNumi (Linput$)

3186 Length-LEN (TRIM$ (Linput$ )

)

3189 IF NOT Length THEN RETURN 0

3192 Inci: I-I+l

3195 IF I>Length THEN RETURN 1

3198 Num=NUM(Linput$[I]

)

3201 IF (Num<—47 ) OR (Num>=58) THEN RETURN 0

3204 GOTO Inci

3207 FNEND

3210 ! ***************** FUNCTION FNNUMD *******************•***•* 3213 ! FILE NAME: FNNUMD ! 820302-1700- - -BCY

FNNumi

(

I 3192 3192 3195

Inci

3192 3204

Length 3186 3189 3195

Linput$ 3183 3186 3198

Num 3198 3201 3201

3198

99
3216

3219

3222

3225

3228

3231

3234

3237

3240

3243

3246

3249

3252

3255

3258

3261

DEF FNNumd(Linput$)

Dec-0

Len-LEN (TRIM$ (Linput$ )

)

IF NOT Len-0 THEN RETURN 0

Inci: I-I+l

IF I>Len THEN RETURN 1

Num-NUM ( Linput$ [ I ]

)

IF Num-46 THEN Test

IF (Num<—47) OR (Num>-58) THEN

! length

! non-ASCII

! passes ok

! decimal value

! test decimal point

RETURN 0 ! not a number

GOTO Inci

Test: IF Num-46 THEN Dec-Dec+1 ! a period

IF (Dec>l) OR ( LEN ( Linput$)=1) THEN RETURN 0 ! none or too many or GOTO Inci ! no number following

SUBEND

» *************** SUBPROGRAM ORDER **************************

! FILE NAME: ORDER ! 820107 - 1530- - -BCY

FNNumd(

Dec 3219

I 3228

Inci

3228

Len 3222

Linput$ 3216

Num 3234

Test

3246

3246 3246 3249

3228 3231 3234

3243 3252

3225 3231

3222 3234 3249

3237 3240 3240 3246

3237

100
3264 SUB Order(F(*) .Nfreqs)

3267 OPTION BASE 1

3270 IF Nfreqs-1 THEN SUBEXIT

3273 Stop_i-INT(Nfreqs/2)

3276 Inc_i : I-J-I+l

3279 IF I>Stop_i THEN SUBEXIT

3282 Min-Max-F(I)

3285 L-K-0

3288 Stop_j -Nfreqs -1+1

3291 Inc_j : J-J+l

3294 IF J>Stop_j THEN Swtch

3297 Compare-F(J)

3300 IF Compare>Min THEN Max

3303 K-J

3306 Min-Compare

3309 Max: IF Compare<Max THEN Inc_J

3312 L-J

3315 Max-Compare

3318 GOTO Inc_J

3321 Swtch: IF F(I)-Min THEN Skip

3324 F(K)-F(I)

3327 F(I)-Min

3330 Skip: IF F(Stop_j )=Max THEN Inc_i

3333 IF NOT L THEN L=K

3336 F(L)-F(Stop_j)

3339 F ( S t op_j ) -Max

3342 GOTO Inc_i

3345 SUBEND

3348 ! ****************,*******'**********'*'**)fc**' '** *•!^r'*'**, '*'*

S Order(

Compare 3297 3300 3306 3309 3315

F( 3264

3330

3282

3336

3297

3336

3321

3339

3324 3324 3327

I 3276

3327

3276 3279 3282 3288 3321 3324

Inc_i

3276 3330 3342

Inc_j : 3291 3309 3318

J 3276 3291 3291 3294 3297 3303 3312

K 3285 3303 3324 3333

L 3285 3312 3333 3333 3336

Max 3282 3309 3315 3330 3339

Max: 3309 3300

101
Min 3282 3300 3306 3321 3327

Nfreqs 3264 3270 3273 3288

Skip

3330 3321

Stop_i 3273 3279

Stop_j 3288 3294 3330 3336 3339

Swtch

3321 3294
3351 SUB Avg(Ave(*) ,Var(*) ,X(*) ,N) ! 811108-0900 BCY

3354 OPTION BASE 1

3357 MAT Var-Var* (N- 2

)

3360 MAT X-X-Ave

3363 MAT X«X/(N)

3366 MAT Ave-X+Ave

3369 MAT X-X.X

3372 MAT X-X*( (N-1)*N)

3375 MAT Var-Var+X

3378 MAT Var-Var/(N-1)

3381 SUBEND

3384 ! ***************** SUBPROGRAM RFOUT **********************

3387 ! FILE NAME: RFOUT ! 820130-1300- - -BCY

S Avg(

Ave ( 3351 3360 3366 3366

N 3351 3357 3363 3372 3372 3378

Var ( 3351 3357 3357 3375 3375 3378 3378

X( 3351 3360 3360 3363 3363 3366 3369

103
3390 SUB Rfout(Kind$ , Path(*) , Freq(*) , Freqs , Start , Hilo)

3393 OPTION BASE 1

3396 Mode-0

3399 IF Kind$-"NEXT" THEN Next

3402 IF Kind$-" FIRST" THEN First

3405 N_freq-L_freq-Freq(l)

3408 Path-Path(l)

3411 GOTO Call

3414 First :N_freq-Freq (Start)

3417 L_freq-Freq( Freqs)

3420 Path-Path(Start)

3423 GOTO Call

3426 Next :N_freq-Freq(Freqs+l)

3429 L_freq-Freq( Freqs)

3432 Path-Path (Freqs+1)

3435 Call: CALL Filter (Path)

3438 CALL Pset (N_freq, Hilo, Dac_volt, Level)

3441 CALL Dac (Dac_volt , Err)

3444 CALL Synth (Mode ,N_freq , L_freq , Level)

3447 SUBEND

3450 ! **************** SUBPROGRAM PSET ***********************

3453 ! FILE NAME: PSET ! 820000-0000- - -BCY

3454 ! ******** RENAMED SUB PSET TO PSETDEL 850724 : 1446 : GJC

S Rfout(

Call: 3435 3411 3423

Dac_volt 3438 3441

Err 3441

First: 3414 3402

Freq( 3390 3405 3414 3417 3426

Freqs 3390 3417 3426 3429 3432

Hilo 3390 3438

Kind$ 3390 3399 3402

L_freq 3405 3417 3429 3444

Level 3438 3444

Mode 3396 3444

N_freq 3405 3414 3426 3438 3444

Next

3426 3399

Path 3408 3420 3432 3435

Path( 3390 3408 3420 3432

Start 3390 3414 3420

104
q , Hi_lo , Dac_volt , Level)

(Frq<—1) AND NOT Hi_lo THEN RangeOO

(Frq<—2) AND NOT Hi_lo THEN RangeO

Frq<—4 THEN Flag-1

(Frq>4) AND (Frq<-7.5) THEN Flag-2

(Frq>7 . 5) AND (Frq<-7.8) THEN Flag-3

(Frq>7 . 8) AND (Frq<8) THEN Flag-4

(Frq>—8) AND (Frq<-10.5) THEN Flag=5

(Frq>10 . 5) AND (Frq<-10.9) THEN Flag-6

(Frq>10 . 9) AND (Frq<12) THEN Flag-7

(Frq>—12) AND (Frq<14.0) THEN Flag-8

(Frq>—14 . 0) AND (Frq<-15.9) THEN Flag-9

(Frq>15 . 9) AND (Frq<-16.9) THEN Flag-10

Frq>16 . 9 THEN Flag-11

Flag GOTO Rangel ,Range2 ,Range3 , Range4 , Range5

,

Range6 , Range7 , Range8 , Range9 , RangelO

,

Range 11

3498 RangeOO: Dac_volt«.60

3501 Level--

3504 SUBEXIT

3507 RangeO: Dac_volt- . 55

3510 Level--

3513 SUBEXIT

3516 Rangel: Dac_volt-.63

3519 Level--5

3522 SUBEXIT

3525 Range2: Dac_volt=.59

3528 Level--

3531 SUBEXIT

3534 Range 3: Dac_volt=.59

3537 Level-3

3540 SUBEXIT

3543 Range4 : Dac_volt=.59

3546 Level-- 18

3549 SUBEXIT

3552 Range5: Dac_volt-.59

3555 Level-- 18

3558 SUBEXIT

3561 Range6: Dac_volt-.59

3564 Level-- 19

3567 SUBEXIT

3570 Range7 : Dac_volt=.63

3573 Level-- 15

3576 SUBEXIT

3579 Range8: Dac_volt-.63

3582 Level-- 11

3585 SUBEXIT

3588 Range 9 : Dac_volt-.63

3591 Level-0

3594 SUBEXIT

3597 RangelO: Dac_volt-.63

3598 Level-0

3600 SUBEXIT

3601 Rangell: Dac_volt— .63

3602 Level-6

3456 SUB Pset (F:

3459 IF

3462 IF

3465 IF

3468 IF

3471 IF

3472 IF

3477 IF

3480 IF

3483 IF

3486 IF

3489 IF

3492 IF

3493 IF

3495 ON

105
3603 SUBEND

3606 ! ***************** OVERLAY CALRES **********************

3609 ! FILE NAME:: CALRES j 810923 -1330-

-BCY

S Pset(

Dac_volt 3456 3498 3507 3516 3525 3534 3543

3552 3561 3570 3579 3588 3597 3601

Flag 3465 3468 3471 3472 3477 3480 3483

3486 3489 3492 3493 3495

Frq 3456 3459 3462 3465 3468 3468 3471

3471 3472 3472 3477 3477 3480 3480

3483 3483 3486 3486 3489 3489 3492

3492 3493

Hi_lo 3456 3459 3462

Level 3456 3501 3510 3519 3528 3537 3546

3555 3564 3573 3582 3591 3598 3602

Range00

3498 3459

Range0

3507 3462

Range 10

3597 3495

Range 11

3601 3495

Rangel

3516 3495

Range 2 3525 3495

Range 3

3534 3495

Range4

3543 3495

Range 5

3552 3495

Range6

3561 3495

Range 7 3570 3495

Range 8

3579 3495

Range 9 3588 3495

106
3612 SUB Calres (Max_pts .Nfreqs .Repeats ,Dim,Typ$ ,Sp,Std,Hi_lo_port,

Prt$ , Cal ,G1 , Ca$)

3615 OPTION BASE 1

3618 DIM Date$ [ 6 ]

, Time$ [ 6 ]

, D(16 , 8) , Id_cont$ [ 80

]

3621 DIM Freqs(Nfreqs) , Power (Nfreqs , Repeats, Dim, 10) ,File$[ll]

,

Dsk_nam$ [ 11]

3624 DIM Result (Nfreqs ,60) .Omitf (Nfreqs) , Aver (87) ,Var(87)

,

Rd(Nfreqs ,2,12)

3625 Ca$-VAL$ ( Cal

)

3626 Freq-0

3627 DISP " " 3628 From_f ile$-"PWR"&"D"&Ca$

3629 F_oh_file$-"PWR"&"H"&Ca$

3630 PRINTER IS 16

3632 Typ-POS (Typ$ ,"P")

3633 FI $—VAL$ ( Typ+1

)

3636 IF Ca$-"3" THEN From_file$="PWRD2"

3637 IF Ca$-"3" THEN F_oh_file$="PWRH2"

3638 GOTO 3641

3639 ! From_file$="PWR"&"D"&Ca$

3640 ! F_oh_file$—" PWR"&"H"6tCa$

3641 CALL Redhed(F_oh_f ile$ F8 , 1" , Date$ ,Time$ ,Typ$ .Nfreqs

,

Freqs (*) .Repeats , Sp , Std, Id_cont$ , Cnnct$)

3642 FREAD From_file$&" : F8 , 1" , Power (*)

3643 IF GlOl THEN GOTO 3659

3644 Fr_file$-"CRST"&VAL$ (VAL(Ca$) -2)

3645 PRINT Fr_file$

3646 CALL Redhed(Fr_file$ F8 , 1" , Date$ , Time$ , Typ$ , Nfreqs

,

Freqs (*) .Repeats , Sp , Std, Id_cont$ , Cnnct$)

3647 CALL Redwrt (Fr_file$ , " : F8 , 1" , " " ,Result(*) .Nfreqs)

3648 FOR Fr-1 TO Nfreqs

3649 FOR Sp-1 TO 2 3650 FOR P-1 TO 5 3652 ON Sp GOTO 3653,3655

3653 Rd(Fr , Sp , P)-Result (Fr , P)

3654 GOTO 3656

3655 Rd(Fr , Sp , P)-Result (Fr , P+12)

3656 NEXT P

3657 NEXT Sp

3658 NEXT Fr

3659 Dsk_nam$-" SCRATCH"

3660 To_file$-"CRST"&Ca$

3661 ON ERROR GOSUB Xerr

3662 ASSIGN #9 TO n T_RSLT: F8 , 1" , Check

3663 ASSIGN * TO #9

3666 IF Check THEN CALL T_disc( "T_RSLT : F8 , 1" ,4 , 696)

3669 OFF ERROR

3672 DISP "CALCULATING SYSTEM PARAMETERS"

3675 PRINT LIN(l) ; "SCRATCH DATA FILE NAME: " ; From_file$

3678 PRINT LIN(l) ; "POWER DATA TAKEN: " ; Date$&" . "6cTime$

3681 PRINT LIN(l) ; "FILE IDENTIFIER: " ; Id_cont$ ; LIN(l)

3684 Incfrq: Freq-Freq+1

3687 IF Freq>Nfreqs THEN Done

3690 Repeat-0

3693 Incr: Repeat-Repeat+1

107
3696

3699

3702

3705

3708

3711

3714

3717

3720

3723

3727

3729

3732

3735

3738

3740

3741

3742

3744

3747

3750

3753

3756

3759

3762

3763

3764

3765

3766

3767

3768

3769

3770

3771

3772

3773

3774

3775

3777

3778

3779

3780

3781

3782

3783

3784

3785

3786

IF Repeat>Repeats THEN Incfrq

1-0

Inci: I-I+l

IF I>16 THEN Subr

Mnt-0

Incm : Mnt-Mnt+1

IF Mnt>8 THEN Inci

D(I ,Mnt) -Power (Freq .Repeat , I ,Mnt)

GOTO Incm

Subr: Fghz-Freqs (Freq)

CALL Coeff (Freq , Fghz .Repeat .Repeats ,Date$ ,Time$ ,Typ , Sp

,

From_file$ , Dsk_nam$ , Hi_lo_port , Prt$ , Cnnct$

,

Errcnt ,Error_flag,D(*) ,Result(*) ,Aver(*) ,Var(*)

,

Gl,Rd(*))

GOTO Incr

!Done: DISP " " IF NOT Error_flag THEN 3740

IF Gl-1 THEN To_file$-"ADP" &Ca$

IF Gl-1 THEN GOTO Record

IF Errcnt-Nfreqs THEN Exit_flag=l

IF Exit_flag THEN PRINT LIN ( 2 )

; CHR$ ( 7 )

; "NO RESULTS SAVED

--- PAUSE IN EFFECT"

IF Exit_flag THEN PAUSE

IF Exit_flag THEN Exit

! Inck: K-K+l

! IF K>Nfreqs THEN Record

! IF Omitf(K) THEN PRINT Omitf(K)

! GOTO Inck

Record: IF Gl-1 THEN To_file$-"CRST3"

CALL Wrthed( (To_file$) , " : F8 , 1" ,Max_pts , Date$

,

Time$ ,Typ$ .Nfreqs , Freqs (*) .Repeats

,

Sp , Std , Id_cont$ , Cnnct$

)

CALL Redwrt (To_f ile$ , " F8 , 1" ,Result(*) .Nfreqs)

IF Cal-3 THEN Gl-0

IF Cal-2 THEN Gl-0

IF Cal-1 THEN Gl-0

IF Cal-3 THEN GOTO 3777

DISP "DO YOU WISH TO RECALIBRATE THIS SET- -Y/N" ; CHR$ (7)

IF FNYorn THEN GOTO 3772

GOTO 3777

IF Cal-3 THEN Gl-1

Cal—

SUBEXIT

IF Cal-2 THEN Gl-1

IF Cal-2 THEN Cal-3

IF (Cal-3) AND (Gl-1) THEN GOTO 3612

PRINTER IS 16

Exit: PRINT LIN(l)

PRINTER IS 16

DISP " " DISP "THROUGH CALCULATING --- "; SUBEXIT

SUBEND

108
3789 ! ****************** SUBPROGRAM COEFF *********************

3792 ! FILE NAME: COEFF ! 810923-1330- - -BCY

S Calres(

Aver ( 3624 3727

Ca$ 3612

3660

3625

3740

3628 3629 3636 3637 3644

Cal 3612

3774

3625

3777

3766

3778

3767

3778

3768

3779

3769 3773

Check 3662 3666

Cnnct$ 3641 3646 3727 3764

D( 3618 3717 3727

Date$ 3618 3641 3646 3678 3727 3764

Dim 3612 3621

Done

3735 3687

Dsk nam$ 3621 3659 3727

Errcnt 3727 3742

Error_flag 3727 3738

Exit

3781 3750

Exit_flag 3742 3744 3747 3750

Fl$ 3633

F_oh_file$ 3629 3637 3641

F_oh_file$

0 3637

Fghz 3723 3727

File$ 3621

Fr 3648 3653 3653 3655 3655 3658

Fr_file$ 3644 3645 3646 3647

Freq 3626 3684 3684 3687 3717 3723 3727

Freqs

(

3621 3641 3646 3723 3764

From_file$ 3628 3636 3642 3675 3727

109
From_file$: 0 3636

G1 3612

3767

3643

3768

3727

3773

3740

3777

3741

3779

3763 3766

Hi_lo_port 3612 3727

I 3699 3702 3702 3705 3717 3717

Id_cont$ 3618 3641 3646 3681 3764

Incfrq3684 3696

Inci

3702 3714

Incm: 3711 3720

Incr3693 3729

Max_pts 3612 3764

Mnt 3708 3711 3711 3714 3717 3717

Nfreqs 3612

3646

3621

3647

3621

3648

3624

3687

3624

3742

3624

3764

3641

3765

Omitf

(

3624

P 3650 3653 3653 3655 3655 3656

Power

(

3621 3642 3717

Prt$ 3612 3727

Rd( 3624 3653 3655 3727

Record: 3763 3741

Repeat 3690 3693 3693 3696 3717 3727

Repeats 3612 3621 3641 3646 3696 3727 3764

Result( 3624 3647 3653 3655 3727 3765

Sp 3612

3657

3641

3727

3646

3764

3649 3652 3653 3655

Std 3612 3641 3646 3764

Subr

3723 3705

Time$ 3618 3641 3646 3678 3727 3764

To_file$ 3660 3740 3740 3763 3764 3765

110
To f ile$

0 3763

Typ 3632 3633 3727

Typ$ 3612 3632 3641 3646

Var ( 3624 3727

Xerr: 0 3661

3764

111
3795

3798

3801

3804

3807

3810

3813

3816

3819

3822

3825

3828

3831

3834

3835

3837

3840

3843

3846

3849

3852

3855

3858

3861

3864

3867

3870

3873

3876

3879

3882

3885

3888

3891

3894

3897

3900

3903

3906

3909

3912

3915

3918

3921

3924

3927

3930

3933

3936

3939

SUB Coeff (Freq , Fghz .Repeat .Repeats ,Date$ ,Time$ ,Typ , Sp

,

From_file$ ,Dsk_nam$ .Hiloport , P$ , Cnnct$ , Errcnt

,

Error_flag,D(*) ,Result(*) ,Aver(*) ,Var(*) ,G1 ,Rd(*)

)

OPTION BASE 1

DIM Wrspt(2,12) ,Stds(14,2) ,Rs(2,12) , A(87) , Sdev(87) , S (6)

,

C3 (4 , 2) , Pthru(4 , 8)

DIM Pline (4,8) , Ppad(4 , 8)

ASSIGN #9 TO "T_RSLT : F8 , 1"

IF Repeat-1 THEN MAT Aver-ZER

IF Repeat-1 THEN MAT Var-ZER

MAT Rs-ZER

Date-VAL(Date$)

T ime-VAL ( T ime $

)

Opt$-VAL$ (POS (Cnnct$ , "N" )

)

IF 0pt$O"2" THEN Calib

Opt$-Opt$&Cnnct$ [ 5

]

iCalib: IF Gl-1 THEN Cal-1

CALL Calib (D(*) ,Wrspt(*) , Stds(*) , Opt$,Error_flag,Rs(*)

,

Hiloport ,G1 ,Rd(*) ,Freq)

IF Error_flag THEN PRINT CHR$ ( 7 )

; " FATAL ERROR FOR "

Freqs (Freq) ; " GHz" ;LIN(1)

IF Error_flag THEN Errcnt-Errcnt+1

IF Error_flag THEN Omitf (Freq)-Fghz

IF Error_flag THEN SUBEXIT

FOR 1*1 TO 4

FOR J-l TO 8

P thru (I , J)-D(I+4 , J)

Pline (I , J)-D(I+8 , J)

Ppad(I , J)-D(I+12 , J)

NEXT J

NEXT I CALL Rhothu(Wrspt (*) , Pthru(*) ,C3(*))

FOR 1-1 TO 3

FOR J-l TO 2

S(2*I+J-2)-Stds(I+7,J)

NEXT J

NEXT I CALL Rho2pt(S (*) ,C3(*) ,Wrspt(*) ,Ppad(*))

Stds(9 , 2)-S(4)

MAT S-ZER

S(3)-Stds(3 , 1)

S(4)-Stds(3 ,2)

CALL Rho2pt (S (*) ,C3(*) ,Wrspt(*) ,Pline(*))

Stds ( 3 , 2)-S (4)

Stds(3 , l)--20*LGT(Stds(3 , 1)

)

Stds (9 , l)--20*LGT(Stds(9 , 1)

)

Stds (11 , 1)-Sp

Stds (11 , 2) -Pine id

Stds (12 , 1)-Pstd

Stds(12 , 2)-Pnet

Stds (13 , 1)-Xmnt

Stds (13 , 2)-Ymnt

Many-(Repeats>l)*Repeat

IF POS(P$,",") THEN PRINTER IS 7,1

112
3942 IF POS(P$,"0") THEN PRINTER IS 0

3945 CALL Print (Fghz , Date$ , Time$ , From_file$ , Dsk_nam$ , Stds (*)

,

Wrspt(*) ,Rs(*) .Many .Repeats)

3948 READ #9, Repeat

3951 PRINT #9;Wrspt(*) ,C3(*) ,Stds(*) ,Rs(*) , Fghz, Date, Time

3954 ! 3957 READ #9, Repeat

3960 READ #9;A(*)

3963 IF Repeat-1 THEN MAT Aver=A

3966 IF Repeats-1 THEN Prnt

3969 IF RepeatOl THEN CALL Avg(Aver (*) ,Var(*) ,A(*) , Repeat)

3972 IF RepeatORepeats THEN SUBEXIT

3975 MAT Sdev-SQR(Var)

3978 PRINT #9 , Repeats+1 ; Aver (*)

3981 READ #9, Repeats+1

3984 READ #9 ;Wrspt(*) , C3 (*) , Stds (*) , Rs (*) , Fghz , Date , Time

3987 CALL Print (Fghz , Date$ , Time$ , From_file$ , Dsk_nam$ , Stds (*)

,

Wrspt(*) , Rs (*) , -1 .Repeats)

3990 CALL Prnt_sdev(Fghz , Date$ ,Time$ , From_file$ , Dsk_nam$

,

Sdev(*) , Sp)

3993 Prnt: PRINTER IS 16

3996 J-0

3999 Incj : J-J+l

4002 IF J>60 THEN SUBEXIT

4005 Result (Freq .J)-Aver(J)

4008 GOTO Incj

4011 SUBEND

4014 ! **************** SUBPROGRAM PRINT ***********************

4017 ! 820103-1000- --BCY&DHR

S Coeff

(

A( 3801 3960 3963 3969

Aver( 3795 3810 3963 3969 3978 4005

C3( 3801 3873 3891 3906 3951 3984

Cal 3835

Calib: 3835 3828

Cnnct$ 3795 3825 3831

D( 3795 3837 3858 3861 3864

Date 3819 3951 3984

Date$ 3795 3819 3945 3987 3990

Dsk_nam$ 3795 3945 3987 3990

Errcnt 3795 3843 3843

113
Error_flag 3795 3837 3840 3843 3846 3849

Fghz 3795 3846 3945 3951 3984 3987 3990

Freq 3795 3837 3840 3846 4005

Freqs( 3840

From_file$ 3795 3945 3987 3990

G1 3795 3835 3837

Hiloport 3795 3837

I 3852 3858 3858 3861 3861 3864 3864

3870 3876 3882 3882 3888 3999 4008

J 3855 3858 3858 3861 3861 3864 3864

3867 3879 3882 3882 3885 3996 3999

3999 4002 4005 4005

Many 3936 3945

Omitf

(

3846

Opt$ 3825 3828 3831 3831 3837

P$ 3795 3939 3942

Pincid 3921

Pline

(

3804 3861 3906

Pnet 3927

Ppad( 3804 3864 3891

Prnt

3993 3966

Pstd 3924

Pthru( 3801 3858 3873

Rd( 3795 3837

Repeat 3795 3810 3813 3936 3948 3957 3963

3969 3969 3972

Repeats 3795 3936 3945 3966 3972 3978 3981

3987

Result

(

3795 4005

Rs ( 3801 3816 3837 3945 3951 3984 3987

114
S( 3801 3882 3891 3894 3897 3900 3903

3906 3909

Sdev( 3801 3975 3990

Sp 3795 3918 3990

Stds ( 3801 3837 3882 3894 3900 3903 3909

3912 3912 3915 3915 3918 3921 3924

3927 3930 3933 3945 3951 3984 3987

Time 3822 3951 3984

Time$ 3795 3822 3945 3987 3990

Typ 3795

Var ( 3795 3813 3969 3975

Wrspt

(

3801 3837 3873 3891 3906 3945 3951

3984 3987

Xmnt 3930

Ymnt 3933

115
4020 SUB Print(Fghz ,Date$ ,Time$ ,File$ ,Dsk_nam$ , Stds(*) ,Wrspt(*)

,

Rs(*) ,Rpt_no .Repeat)

4023 OPTION BASE 1

4026 DIM Qpts (2 , 12)

4029 IF Rpt_no-0 THEN PRINT " SIX- PORT

PARAMETER RESULTS " 4032 IF Rpt_no>0 THEN PRINT " SIX- PORT PARAMETER

RESULTS REPEAT # ";Rpt_no;

" OF " ; Repeat

4035 IF Rpt_no<0 THEN PRINT " SIX- PORT PARAMETER

RESULTS AVERAGE OF " ; Repeat;

" REPEATS"

4038 PRINT LIN(l)

4041 PRINT "YEAR MONTH DAY TIME FILE NAME DISK

IDENT FREQ. IN GHz"

4044 PRINT USING Head20 ; Date$ [ 1 , 2 ]

, Date$ [ 3 , 4] , Date$ [ 5 , 6 ]

,

Time$ , File$ , Dsk_nam$ , Fghz

4047 Head20 : IMAGE X, 2A.4X, 2A, 5X, 2A, 7X, 6A, 6X, 6A, 7X, 7A, 7X.DZ. 6D

4050 PRINT LIN ( 1)

, " SCATTERING PARAMETERS OF

STANDARDS"

4053 PRINT

4056 PRINT " MAG--S11--ANG dB--S12--ANG

MAG--S22--ANG " 4059 Head51: IMAGE 11A, 4X, Z . 6D , 2X.4D . 3D ,X, 3D . 6D , 5D . 3D , 4X, Z . 6D , 2X,

4D. 3D

4062 PRINT USING Head51; "2 -PORT " , Stds(8 . 1) , Stds(8 , 2)

,

Stds (9 , 1) , Stds (9 , 2) .Stds(lO.l)

,

Stds (10 , 2)

IMAGE 11A.25X.Z.6D.5D.3D

PRINT USING Head52 ; "LINE " , Stds (3 , 1) , Stds (3 , 2)

4065 Head52

4068

4071 Head60 : IMAGE 11A, 4X, Z . 6D , 6D . 3D

4074

4077

PRINT USING Head60; "SHORT #1

PRINT USING Head60; "SHORT #2

" ;Stds(4,l) , Stds(4 , 2)

" ;Stds(5,l) ,Stds(5, 2)

4080 Head70 : IMAGE 14A,X,Z.6D,6D. 3D

4083 PRINT USING Head70;"0PEN 6-PORT #1" , Stds (6 , 1) , Stds (6 , 2)

4086 PRINT USING Head70;"OPEN 6-PORT #2" , Stds (7 , 1) , Stds (7 , 2)

4089 Head75 : IMAGE 11A, 2X, 3D . 6D , 5D . 3D , 18A, D , 2A

4092 IF Stds (1 , 1)00 THEN PRINT USING Head75;"STD MOUNT" , Stds (13 , 1) , Stds (13 , 2)

, " ( ON 6-PORT #" , Stds (11 , 1), " )"

4095 Head76 : IMAGE /26A , 2X , 2D . 4D , 2X, 11A

4098 Head77: IMAGE 26A, 2X, 2D.4D, 2X, 39A

4101 IF Stds (11,1)00 THEN PRINT USING Head76;"STD MOUNT POWER:

", Stds (12,1)," MILLIWATTS"

4104 IF Stds (11 ,1)00 THEN PRINT USING Head77;"STD MOUNT INCIDENT

POWER: " , Stds (11 , 2)

, " MILLIWATTS"

4107 Head78 : IMAGE /46A,X,Z.4D, 20A,X,Z.4D

4110 IF Stds (11 , 1)—0 THEN PRINT USING Head78 ; "POWER RATIO CONSTANTS:

6-PORT #1: (Kl)— " ,Wrspt (1 ,12) , " 6-PORT #2: (K2)-",

Wrspt (2 , 12)

4113 IF Stds (11,1)00 THEN PRINT USING Head78 ; "POWER STANDARD CONSTANTS:

#1: (Kl)-" ,Wrspt(l,12) , " 6-PORT #2: (K2)-" ,Wrspt(2 ,12)

4116 PRINT

4119 GOSUB Qprint

4122 PRINT " "

6 - PORT

116
4125 PRINT "RMS PARABOLOID RES*1E6 | *** CIRCLE RESIDUALS*1E6

*** | 2 -PORT RES*1E6"

4128 PRINT " INITIAL FINAL | SHORT OPEN THRU LINE 2-

PORT AVG | THRU LINE 2 -PORT”

4131 MAT Rs—Rs*(lE6)

4134 Head_res: IMAGE 9A,X, 2(6D) ,X,A,4(5D,X) , 2X, 2(5D) , 2A, 3(5D,X)

4137 Head_resl : IMAGE 9A, X, 2 (6D) ,X, A, 4(5D ,X) , 2X, 2 (5D) , 2A

4140 PRINT USING Head_res ; "6-PORT #1" ,Rs (1 , l)*(Rs (1 , 2)/lE6 ) ,Rs (1 , 1)

,

"

| " ,Rs(l,3) ,Rs(l,4) ,Rs(l,5) ,Rs(l,6) ,Rs(l,7) , Rs ( 1 , 8 )

, " |",

Rs (1 , 9) , Rs(l , 10) ,Rs (1 , 11)

4143 PRINT USING Head_resl ; "6-PORT #2" ,Rs(2 , l)*(Rs(2 , 2)/lE6) ,Rs(2 , 1)

,

"

I " .Rs(2,3) ,Rs(2,4) ,Rs(2,5) ,Rs(2,6) ,Rs(2,7) ,Rs(2,8) , " |"

4146 PRINT "

4149 MAT Rs-Rs/(1E6)

4152 SUBEND

4155 Qprint: ! 4158 CALL Wq(Wrspt(*) ,Qpts(*) ) ! Calculate Q points

4161 PRINT " Q-POINT DESCRIPTION OF SIX-PORTS"

4164 PRINT

4167 PRINT USING Qptsl;" MAG-1/Q1-ANG"

4170 Qptsl: IMAGE 25A," MAG--Q2--ANG MAG- -Q3- -ANG

MAG--Q4--ANG"

4173 PRINT USING Qpts2 ; 1 , Qpts (1 , 1) ,Qpts ( 1 , 2 ) , Qpts ( 1 , 3) , Qpts ( 1 , 4)

,

Qpts (1 , 5) , Qpts (1,6) , Qpts (1,7) ,Qpts(l,8)

4176 PRINT USING Qpts2 ; 2 , Qpts (2 , 1) ,Qpts (2 , 2) , Qpts (2 , 3) ,Qpts (2 , 4)

,

Qpts (2, 5) , Qpts (2, 6) ,Qpts(2,7) , Qpts (2, 8)

4179 Qpts2 : IMAGE "6-PORT #"D,X,4(2X,Z.4D,X,4D. 3D)

4182 PRINT

4185 RETURN

4188 ! ********** SUBROUTINE PRINT STD DEVIATIONS ****************

4191 ! 820103-0900- --BCY&DHR

S Print

(

Date$ 4020 4044 4044

Dsk_nam$ 4020 4044

Fghz 4020 4044

File$ 4020 4044

Head20

4047

Head51

4059

Head52 4065

Head60 4071

Head70

4080

Head75

4089

4044

117
Head76

4095

Head77 4098

Head78

4107

Head_resl

4137

Head_res4134

Qprint4155 4119

Qpts( 4026 4158 4173 4173 4173 4173 4173

4173 4173 4173 4176 4176 4176 4176

4176 4176 4176 4176

Qptsl4170

Qpts2

4179

Repeat 4020 4032 4035

Rpt_no 4020 4029 4032 4032 4035

Rs ( 4020 4131 4131 4140 4140 4140 4140

4140 4140 4140 4140 4140 4140 4140

4140 4143 4143 4143 4143 4143 4143

4143 4143 4143 4149 4149

Stds ( 4020 4062 4062 4062 4062 4062 4062

4068 4068 4074 4074 4077 4077 4083

4083 4086 4086 4092 4092 4092 4092

4101 4101 4104 4104 4110 4113

Time$ 4020 4044

Wrspt

(

4020 4110 4110 4113 4113 4158

118
4194 SUB Prnt_sdev(Fghz , Date$ , Time$ , File$ ,Dsk_nam$ , Sdev(*) , Sp)

4197 OPTION BASE 1

4200 PRINT LIN(2) ; " STANDARD DEVIATIONS OF SELECTED PARAMETER

RESULTS”

4203 PRINT LIN ( 1 )

; "

4206

4209

4212

4215

4218

4221

4224

4227

4230

4233

4236

4239

4242

4245

4248

4251

4254

4257

4260

4263

4266

4269

4272

4275

4278

4281

4284

PRINT "YEAR MONTH DAY TIME FILE NAME DISK

I DENT FREQ. IN GHz”

PRINT USING Head2 ; Date$ [1,2], Date$ [3,4], Date$ [5,6],

Time$ , File$ , Dsk_nam$ , Fghz

Head2 : IMAGE X, 2A, 4X, 2A, 5X, 2A, 7X, 6A, 6X, 6A, 7X, 7A, 7X, DZ . 6D

PRINT LIN(l) , " SCATTERING PARAMETERS OF

STANDARDS"

PRINT

PRINT " MAG - - S 1 1 dB- -S12

MAG - - S 2 2

Head3: IMAGE 11A, 7X, Z . 6D , 12X, Z . 6D , 14X, Z . 6D

PRINT USING Head3; "2-PORT " , Sdev(37) , Sdev(39)

,

Sdev(41)

Head4 : IMAGE 11A,27X,Z.6D

PRINT USING Head4 ; "LINE ",Sdev(29)

Head5 : IMAGE 15A,3X,Z.6D

PRINT USING Head5; "SHORT " ,Sdev(31)

PRINT USING Head5 ; "OPEN 6-PORT #1 ",Sdev(33)

PRINT USING Head5 ; "OPEN 6 -PORT #2 " ,Sdev(35)

Head7 : IMAGE 11A, 8X, . 6D , 8X, 17A, D , 2A

IF SpOO THEN PRINT USING Head7;"STD MOUNT ",Sdev(49),

"

( on 6 -PORT #" ,Sp, "

)

Head8 : IMAGE /26A,4X, .4D, 2X, 11A

Head9 : IMAGE 26A , 4X , . 4D , 2X , 39A

IF SpOO THEN PRINT USING Head8;"STD MOUNT POWER:

Sdev(37) , " MILLIWATTS"

IF SpOO THEN PRINT USING Head9;"STD MOUNT INCIDENT POWER: " Sdev(36) , " MILIWATTS"

HeadlO : IMAGE /46A,X,Z.4D,19A,X,Z.4D

IF Sp-0 THEN PRINT USING HeadlO ; "POWER RATIO CONSTANTS:

6-PORT #1: (Kl)=" , Sdev(12) ,

6-PORT #2: (K2)=" , Sdev(24)

IF SpOO THEN PRINT USING HeadlO ; "POWER CALIBRATION

CONSTANTS: 6-PORT #1: (Kl)«" , Sdev(12) ,

6-PORT #2: (K2)«" , Sdev(24)

PRINT CHR$(12)

SUBEND

I ************* SUBROUTINE RHOTHU ************************

! FILE NAME: RHOTHU ! 830310- 1100- - -BCY

S Prnt sdev(

Date$ 4194 4209 4209 4209

Dsk_nam$ 4194 4209

Fghz 4194 4209

119
File$ 4194 4209

HeadlO

4266

Head2

4212

Head3 4224

Head4

4230

HeadS 4236

Head7

4248

Head8

4254

Head9

4257

Sdev( 4194 4227

4245

4272

4251

Sp 4194 4251

Time$ 4194 4209

4227 4227 4233 4239 4242

4260 4263 4269 4269 4272

4251 4260 4263 4269 4272

120
4287 SUB Rhothu(Wrspt (*) , Pthru(*) , C3 (*)

)

4290 OPTION BASE 1

4293 DIM W(4, 8) ,Rthru(4,4)

4296 DEG

4299 FOR 1-1 TO 4

4302 CALL W(Pthru(*) ,1,4,0, l,Wrspt(*),W(*))

4305 CALL Wg(Wrspt(*) , 1 , 0 , W(I , 1) ,W(I , 2) ,Rthru(I , 1) ,Rthru(I , 2)

)

4308 C3(I,2)-Argth«ATN(Rthru(I,2)/(Rthru(I,l)+lE-20))+180*

(Rthru(I , l)<0)*SGN(Rthru(I , 2)+lE-20)

4311 C 3 ( 1 , 1

) -Magth-SQR (Rthru ( 1 , 1

)

A 2+Rthru (1 , 2) "2)

4314 NEXT I 4317 SUBEND

4320 ! *********** SUBROUTINE RH02PT ***************************

4323 ! FILE NAME: RH02PT ! 830311-1130- - -BCY

S Rhothu(

Argth 4308

C3( 4287 4308 4311

I 4299

4308

4305

4308

4305

4308

4305

4311

4305

4311

4308

4311

4308

4314

Magth 4311

Pthru( 4287 4302

Rthru( 4293

4311

4305

4311

4305 4308 4308 4308 4308

W( 4293 4302 4305 4305

Wrspt

(

4287 4302 4305

121
4326 SUB Rho2pt(S(*) ,C3(*) ,Wrspt(*) ,P2pt(*))

4329 OPTION BASE 1

4332 DIM G(4,4) ,W(4,8)

4335 DEG

4338 1-1

4341 Argth«C3(I,2)

4344 CALL W(P2pt (*) , 1 , 4 , 0 , 1 , Wrspt (*) ,W(*)

)

4347 CALL Wg(Wrspt(*) ,1,0,W(I , 1) ,W(I , 2) ,G(I , 1) ,G(I . 2)

)

4350 CALL Rect(S(l) ,S(2) ,X1,Y1)

4353 CALL Csub(G(I , 1) ,G(I , 2) ,X1 ,Y1 ,X,Y)

4356 Arg2p-ATN(Y/(X+lE-20) )+180*(X<0)*SGN(Y+lE-20)

4359 Argl2-Arg2p-Argth

4362 Test: IF ABS (Argl2)<180 THEN Skp

4365 Argl2-Argl2-SGN(Argl2)*360

4368 GOTO Test

4371 Skp: Args4-S(4)

4374 Sgnl2-SGN (Argl2 ) *1

4377 Sgns4-SGN(Args4)*l

4380 IF Sgnl2«Sgns4 THEN Subt

4383 Args4=Args4-SGN(Args4)*180

4386 IF ABS (Argl2 -Args4)<90 THEN Switch

4389 Subt: IF ABS(Argl2-Args4)<90 THEN Exit

4392 Switch: S (4)«S (4) -SGN(S (4) )*180

4395 Exit: SUBEND

4398 ! ********* SUBPROGRAM DISC COPY *****************

4401 ! FILE NAME: DCOPY ! 820116-0110- - -BCY

S Rho2pt(

Argl2 4359

4389

4362 4365 4365 4365 4374 4386

Arg2p 4356 4359

Args4 4371 4377 4383 4383 4383 4386 4389

Argth 4341 4359

C3( 4326 4341

Exit: 4395 4389

G( 4332 4347 4347 4353 4353

I 4338

4353

4341 4347 4347 4347 4347 4353

P2pt ( 4326 4344

S( 4326 4350 4350 4371 4392 4392 4392

Sgnl2 4374 4380

Sgns4 4377 4380

122
Skp

4371 4362

Subt

4389 4380

Switch

4392 4386

Test4362 4368

W( 4332 4344 4347

Wrspt

(

4326 4344 4347

X 4353 4356 4356

XI 4350 4353

Y 4353 4356 4356

Y1 4350 4353

123

4347
4404 SUB Disc copy(Fil nam$ .Nfreqs ,Typ$ ,Ca$)

4407 OPTION BASE 1

4410 DIM Date$ [ 6 ], Time$ [ 6

]

4413 DIM Freqs(Nfreqs) , Id content$[80] ,Result(Nfreqs , 52)

4416 Fl$-VAL$(POS(Typ$ , "P")+l)

4419 CALL Redhed("CRST"&Ca$,":F8,l , ',Date$,Time$,Typ$, Nfreqs,

Freqs (*) .Repeats , Sp , Std, Id content$ , Cnnct$)

4422 CALL Redwrt( "CRST"&Ca$ , " : F8 , 1" , "

" ,Result(*) .Nfreqs)

4425 CALL Wrthed(Fil nam$ F8 , 0" .Nfreqs , Date$ ,Time$ , Typ$

,

Nfreqs , Freqs (*) .Repeats , Sp , Std, Id content$

,

Cnnct$)

4428 CALL Redwrt(Fil nam$ , " F8 , 0" .Result (*) .Nfreqs)

4431 SUBEND

4434 t *************** SUBPROGRAM DISC TRANS *****************

4437 ! FILE NAME: DTRANS ! 820116-0120- - -BCY

S Disc_copy(

Ca$ 4404 4419 4422

Cnnct$ 4419 4425

Date$ 4410 4419 4425

Fl$ 4416

Fil_nam$ 4404 4425 4428

Freqs

(

4413 4419 4425

Id_content$ 4413 4419 4425

Nfreqs 4404

4428

4413 4413 4419 4422 4425 4425

Repeats 4419 4425

Result

(

4413 4422 4428

Sp 4419 4425

Std 4419 4425

Time$ 4410 4419 4425

Typ$ 4404 4416 4419 4425

124
4440 SUB Disc_trans (Fil_nam$ .Records .Nfreqs)

4443 OPTION BASE 1

4446 DIM Date$[6] ,Time$[6] ,Typ$[6]

4449 DIM Freqs (Nfreqs) , Id_content$ [ 80 ] .Result (Nfreqs , 52)

4452 CALL Redhed(Fil_nam$ F8 , 0" , Date$ , Time$ , Typ$ .Nfreqs

,

Freqs (*) .Repeats , Sp , Std, Id_content$ , Cnnct$)

4455 CALL Redwrt (Fil_nam$ , " : F8 , 0"

" ,Result(*) .Nfreqs)

4458 F1$-VAL$ (POS (Typ$ , "P" )+l)

4461 CALL Wrthed( "CRST"&Ca$ , " :F8 , 1" .Records , Date$ , Time$ , Typ$

,

Nfreqs , Freqs(*) .Repeats , Sp , Std, Id_content$

,

Cnnct$)

4464 CALL Redwrt ("CRST"&Ca$, " F8 , 1" ,Result(*) .Nfreqs)

4467 PRINT LIN( 5 )

; Fil_nam$ ; - CALIBRATION DATA TAKEN ON " ;Date$

4470 PRINT LIN(2) ; "FREQUENCIES AT (GHZ)"

4473 PRINT

4476 FOR 1-1 TO Nfreqs

4479 PRINT Freqs (I)

4482 NEXT I 4485 SUBEND

4488 ! ************ SUBPROGRAM WRTHED *************************

4491 ! FILE NAME: WRTHED ! 820106-0800- - -BCY

S Disc trans(

Ca$ 4461 4464

Cnnct$ 4452 4461

Date$ 4446 4452

Fl$ 4458

Fil nam$ 4440 4452

Freqs

(

4449 4452

I 4476 4479

Id_content$ 4449 4452

Nfreqs 4440 4449

4476

Records 4440 4461

Repeats 4452 4461

Result

(

4449 4455

Sp 4452 4461

Std 4452 4461

Time$ 4446 4452

Typ$ 4446 4452

4461 4467

4455 4467

4461 4479

4482

4461

4449 4452 4455 4461 4464

4464

4461

4458 4461

125
4494 SUB Wrthed(File$ ,Msu$ .Records ,Date$ ,Time$ ,Typ$ .Nfreqs

,

Freq_o(*) .Repeats , Sp , Std_mnt , Id_content$

,

Cnnct$)

4497 OPTION BASE 1

4500 DIM Id$[19] ,Overhead$[80]

4503 MASS STORAGE IS Msu$

4504 PRINT File$

4505 WAIT 2500

4506 Overhead$-"R2 : 9 strings. R3 : 4 strings, 4 real. R4:

2 strings[80]. R5&R6: array (Nfreqs)

4509 I d$-" IDENTIFIER STRING: " 4512 Retry: DISP " " 4515 PRINT CHR$ (12)

4518 ! ON ERROR GOTO Trap

4521 ASSIGN #1 TO File$ , Check

4524 ASSIGN * TO #1

4527 IF Check THEN CREATE File$ , 6+2*Records

4530 ASSIGN #1 TO File$

4533 PRINT #1 , 1 ; Overhead$

4536 PRINT #1,2; "DATE$" , "TIME$" , "TYP$" , "CNNCT" , "NFREQS"

,

"REPEATS" , "6-PORT" , "STD MNT" , "FREQUENCIES"

4539 PRINT #1 , 3 ; Date$ , Time$ , Typ$ , Cnnct$ .Nfreqs .Repeats

,

Sp , Std_mnt

4542 PRINT #1 , 4 ; Id$ , Id_content$

4545 READ #1,5

4548 PRINT #l;Freq_o(*)

4551 ASSIGN * TO #1

4554 OFF ERROR

4557 SUBEXIT

4560 Trap: OFF ERROR

4563 IF FNDerr (ERRM$) THEN Retry

4566 SUBEND

4569 ! ************ SUBPROGRAM REDHED **************************

4572 ! FILE NAME: REDHED ! 820106 -0730- - -BCY

S Wrthed(

Check 4521 4527

Cnnct$ 4494 4539

Date$ 4494 4539

File$ 4494 4504 4521 4527 4530

Freq_o( 4494 4548

Id$ 4500 4509 4542

Id_content$ 4494 4542

Msu$ 4494 4503

Nfreqs 4494 4539

126
Overhead$ 4500 4506 4533

Records 4494 4527

Repeats 4494 4539

Retry: 4512 4563

Sp 4494 4539

Std_mnt 4494 4539

Time$ 4494 4539

Trap4560

Typ$ 4494 4539

127
4575 SUB Redhed(File$,Msu$,Date$,Time$,Typ$,Nfreqs,Freq_o(*)

,

Repeats , Sp , Std_mnt , Id_content$ , Cnnct$)

4578 OPTION BASE 1

4581 DIM Id$ [ 19 ]

, Overhead$ [ 80 ]

, Form$ ( 8 )

[ 11

]

4584 MASS STORAGE IS Msu$

4585 PRINT File$

4586 WAIT 2500

4587 Retry: DISP " " 4590 PRINT CHR$ (12)

4593 ! ON ERROR GOTO Trap

4596 ASSIGN #1 TO File$

4599 READ #1 , 1 ; Overhead$

4602 READ #1 , 2 ; Form$ (*)

4605 READ #1 , 3 ; Date$ , Time$ , Typ$ , Cnnct$ .Nfreqs , Repeats

,

Sp , Std_mnt

4608 READ #1 , 4 ; Id$ , Id_content$

4611 READ #1,5

4614 READ #l;Freq_o(*)

4617 ASSIGN * TO #1

4620 OFF ERROR

4623 SUBEXIT

4626 Trap: OFF ERROR

4627 PRINT Files$

4629 IF FNDerr ( ERRM$ ) THEN Retry

4632 SUBEND

4635 ! ************ SUBPROGRAM WRTBIN ******************

4638 ! FILE NAME: WRTBIN ! 811217-1500- - -BCY

S Redhed(

Cnnct$ 4575 4605

Date$ 4575 4605

File$ 4575 4585 4596

Files$ 4627

Form$

(

4581 4602

Freq_o( 4575 4614

Id$ 4581 4608

Id_content$ 4575 4608

Msu$ 4575 4584

Nfreqs 4575 4605

Overhead$ 4581 4599

Repeats 4575 4605

128
Retry: 4587 4629

Sp 4575 4605

Std mnt 4575 4605

Time$ 4575 4605

Trap4626

Typ$ 4575 4605

129
4641

4644

4647

4650

4653

4656

4659

4662

4665

4668

4671

4674

4677

4680

4683

4686

SUB Wrtbin(File$ ,Msu$ ,File(*) .Records)

OPTION BASE 1

MASS STORAGE IS Msu$

Retry: DISP " " PRINT CHR$ (12)

ON ERROR GOTO Trap

FCREATE File$ .Records

Fprint : FPRINT File$ , File(*)

OFF ERROR

SUBEXIT

Trap : OFF ERROR

IF ERRN-54 THEN Fprint

IF FNDerr ( ERRM$ ) THEN Retry

SUBEND

j ***************** SUBPROGRAM REDWRT ***********************

! FILE NAME: REDWRT ! 820116-1230- - -BCY

S Wrtbin(

File$ 4641 4659

File ( 4641 4662

Fprint4662 4674

Msu$ 4641 4647

Records 4641 4659

Retry: 4650 4677

Trap: 4671 4656

4662

130
4689 SUB Redwrt (File$ , From$ , To$ , Data(*) , Nfreqs

)

4692 OPTION BASE 1

4695 Start: PRINT CHR$(12)

4698 DISP " ” 4701 ! ON ERROR GOTO Trap

4704 ASSIGN #1 TO File$

4707 IF To$-=" ” THEN Read

4710 MASS STORAGE IS To$

4713 Inci: I-I+l

4716 IF I>Nfreqs THEN Exit

4719 READ #1 , 5+2*1

4722 J-0

4725 Incj : J-J+l

4728 IF J>52 THEN Inci

4731 PRINT #1 ; Data(I , J)

4734 GOTO Incj

4737 Read: MASS STORAGE IS From$

4740 Inc_i : I-I+l

4743 IF I>Nfreqs THEN Exit

4746 READ #1 , 5+2*1

4749 J-0

4752 Inc_j : J-J+l

4755 IF J>52 THEN Inc_i

4758 READ #l;Data(I,J)

4761 GOTO Inc_j

4764 Exit: ASSIGN * TO #1

4767 OFF ERROR

4770 SUBEXIT

4773 Trap: OFF ERROR

4776 IF FNDerr (ERRM$) THEN Start

4779 SUBEND

4782 ! *********** FUNCTION FNDERR ****************

4785 ! FILE NAME: FNDERR ! 820127-1745 -- -BCY

S Redwrt(

Data( 4689 4731

Exit: 4764 4716

File$ 4689 4704

From$ 4689 4737

I 4713 4713

4743 4746

Inc_i

4740 4755

Inc_j : 4752 4761

Inci

4713 4728

Incj : 4725 4734

4758

4743

4716 4719 4731 4740

4758

4740

131
J 4722 4725

4752 4755

Nfreqs 4689 4716

Read: 4737 4707

Start: 4695 4776

To$ 4689 4707

Trap4773

4725 4728 4731 4749 4752

4758

4743

4710

132
4788 DEF FNDerr (Errm$)

4791 PRINT LIN (10) ; ERRM$

4794 DISP "DO YOU WANT TO RETRY ? -- (Y/N) " ; CHR$ (7 )

4797 IF FNYorn THEN RETURN 1

4800 PRINT CHR$(12) ; LIN (15) ;CHR$(7) ; "FATAL ERROR --- PROGRAM

HALT"

4803 DISP " " 4806 STOP

4809 RETURN 0

4812 FNEND

4815 ! **************** SUBROUTINE T DISC *********************

4818 ! FILE NAME: T_DISC ~ ! 810818-1600- - -BCY

FNDerr(

Errtn$ 4788

133
4821 SUB T_disc(File$ .Records .Length)

4824 ON ERROR GOTO Errml

4827 CREATE File$ .Records .Length

4830 SUBEXIT

4833 Errml: PRINT ERRM$

4836 PRINT "PAUSE IN EFFECT"

4839 PAUSE

4842 BEEP

4845 SUBEND

4848 ! *****************************************************'**'*

S T_disc(

Errml4833 4824

File$ 4821 4827

Length 4821 4827

Records 4821 4827

134
4851 SUB Wrp(Wr(*) ,Wp(*) ) ! Converts Wrspt to polar form

4854 MAT Wp-Wr

4857 FOR 1-1 TO 2 4860 FOR J—4 TO 10 STEP 2 4863 CALL Polar(Wr(I , J) ,Wr(I , J+l) ,Wp(I , J) ,Wp(I , J+l)

)

4866 NEXT J

4869 NEXT I 4872 SUBEND

4875 ! **************** CALIB ***********************************

S Wrp(

Calib: 4878

I 4857 4863 4863 4863 4863 4869

J 4860 4863 4863 4863 4863 4866

Wp( 4851 4854 4863 4863

Wr ( 4851 4854 4863 4863

135
4878 Calib: SUB Calib(Pwr(*) ,Wrspt(*) ,Stds(*) ,Opt$,Error_flag,

Resid(*) ,Hi_lo_port ,G1 ,Rd(*) ,Freq)

! (81/07/31) GFE-GEC

4881 OPTION BASE 1

4884 DIM V(l:5),W(l:16,l:8),Res(2,12)

4887 MAT Resid-ZER ! Cres is NIOSH CR record 7 p. 5-10

4890 MAT Res-ZER ! Cres is NIOSH p. 6-24

4893 Error_flag-0 ! Nonzero if calculation error, >0 if fatal error 4896 IF Gl-1 THEN GOTO 4912

4897 FOR Sp-1 TO 2

4899 CALL Iparab(Pwr (*) , Sp ,V(*) , Error_flag)

4902 IF Error_flag>0 THEN GOTO Calib_exit

4905 CALL Fparab(Pwr (*) ,Sp,V(*) ,Wrspt(*) ,Res(*) , Error_flag,Hi_lo_port)

4908 IF Error_flag>0 THEN GOTO Calib_exit

4910 NEXT Sp

4911 GOTO 4921

4912 ! CONT

4916 FOR P-1 TO 5 4917 FOR Sp-1 TO 2

4918 Wrspt (Sp , P)=Rd(Freq , Sp , P)

4919 NEXT Sp

4920 NEXT P

4921 ! 4923 ! PRINT Wrspt (1 , 1) , Wrspt (1 , 2) .Wrspt (1 , 3) .Wrspt (1 , 4)

,

Wrspt (1 , 5)

4924 CALL W(Pwr (*) , 1 , 16 , 16 , 1 , Wrspt (*) , W(*)

)

4925 FOR 1-1 TO 2

4926 Res (I , 3)-W(3 ,4*1)

4927 Res (I , 4)-W(4 , 4*1)

4928 FOR J-5 TO 7 4929 FOR K—4*J - 15 TO 4*J-12

4932 Res (I , J )-Res (I , J )+W(K , 4*1 ) /4

4935 NEXT K

4938 NEXT J

4941 NEXT I 4944 CALL Trl5(W(*) ,Wrspt(*) ,Opt$ , Stds(*) ,Res(*)

)

4947 CALL Stds2 (W(*) , Wrspt(*) , Stds (*) ,Res (*)

)

4950 CALL Pratio(W(*) , 5 , Wrspt (*) ,Wrspt(2 , 12)

)

4953 Wrspt (1 , 12)-1

4956 Res(l,8)— (Res(l, 3)+Res ( 1 , 4)+4*Res ( 1 , 5 )+4*Res ( 1,6)

+4*Res(l,7))/14

4959 Res (2 , 8) -(Res (2 , 3)+Res (2 ,4)+4*Res (2 , 5)+4*Res (2 , 6)

+4*Res(2,7))/14

4962 MAT Resid-Res

4965 Calib_exit : SUBEND

4968 ! ***************************************

S Calib(

Calib_exit

4965 4902 4908

Error_flag 4878 4893 4899 4902 4905 4908

Freq 4878 4918

136
G1 4878 4896

Hi lo_port 4878 4905

I 4925 4926 4926 4927 4927 4932 4932

4932 4941

J 4928 4929 4929 4932 4932 4938

K 4929 4932 4935

Opt$ 4878 4944

P 4916 4918 4918 4920

Pwr ( 4878 4899 4905 4924

Rd( 4878 4918

Res ( 4884 4890 4905 4926 4927 4932 4932

4944 4947 4956 4956 4956 4956 4956

4956

4962

4959 4959 4959 4959 4959 4959

Resid( 4878 4887 4962

Sp 4897 4899 4905 4910 4917 4918 4918

4919

Stds ( 4878 4944 4947

V( 4884 4899 4905

W( 4884

4950

4924 4926 4927 4932 4944 4947

Wrspt

(

4878 4905 4918 4924 4944 4947 4950

4950 4953

137
4971

4974

4977

4980

4983

4986

4989

4992

4995

4998

5001

5004

5007

5010

5013

5016

5019

5022

5025

5028

5031

5034

5037

5040

5043

5046

5049

5052

5055

5058

5061

5064

5067

5070

5073

SUB Iparab(P(*) , Sp ,V(*) , Error_flag) !-- (81/07/30) -GFE-GECON ERROR GOTO Error

DIM B(1:16,1:9),X(1:9),Y(1:16)

MAT Y-(-l)

K—4*Sp-4 ! Adds 4 to column index when Sp-2

N-0

FOR J-l TO 16 ! Iterate over rows in "P" matrix

I-J-N ! Index for "B" matrix

P-P(J,K+1)

IF P>0 THEN B ! P-0 Indicates no data in this row:

skip to next one N-N+l ! & adjust row index for MAT "B" to lag

"P" by one unit

GOTO Nextj

B: B(I,7)-A-P(J,K+2)/P

B ( I , 8

) «B=P ( J , K+3 ) /P

B(I,9)-C-P(J,K+4)/P

B ( I , 1

) —A*A

B(I , 2)—B*B

B(I , 3)-C*C

B ( I , 4

) —A*B

B ( I , 5

) -A*C

B(I , 6)—B*C

Nextj : NEXT J

REDIM B(1 : I , 1 : 9) ,Y(1 : I) ! Drop last N rows in "B" and "Y"

,

(no data here)

CALL Msoln(B(*) ,Y(*) ,X(*))

B-(2*X(4) -X(7)*X(8) )/(2*X(l)*X(8) -X(4)*X(7))

C-(2*X(5)-X(7)*X(9))/(2*X(1)*X(9)-X(5)*X(7))

A-B+C+X ( 7 ) /X ( 1

)

V ( 1

) —Rl-SQR (X ( 2

) *A*C

)

V ( 2

) -R2-SQR (X ( 3

) *A*B

)

V ( 3

) -Wl—SQR ( C

)

V(4)-W2— (B+C-A) /2/W1

V(5)-W3-B-W2*W2

SUBEXIT

Error: BEEP

IF ERRN-30 THEN PRINT "Failure in Iparab , Poor set of power

data indicated.

Sp- " ; Sp

5076 IF ERRNO30 THEN PRINT ERRM$

5079 Error_flag-10

5082 SUBEND

5085 ! *********************************************************

S Iparab

(

A 5007

5055

5016

5061

5016 5025 5028 5049 5052

B 5010

5055

5019

5061

5019

5064

5025 5031 5043 5049

B( 4977 5007 5010 5013 5016 5019 5022

138
5025 5028 5031 5037 5040

B: 5007 4998

C 5013 5022 5022 5028 5031 5046 5049

5052 5058 5061

Error

5070 4974

Error_flag 4971 5079

Fparab

5088

I 4992 5007 5010 5013 5016 5019 5022

5025 5028 5031 5037 5037 4989 4992

4995 5007 5010 5013 5034 4983 4995

5007 5010 5013

N 4986 4992 5001 5001

Nextj : 5034 5004

P 4995 4998 5007 5010 5013

P( 4971 4995 5007 5010 5013

R1 5052

R2 5055

Sp 4971 4983 5073

V( 4971 5052 5055 5058 5061 5064

W1 5058 5061

W2 5061 5064 5064

W3 5064

X( 4977 5040 5043 5043 5043 5043 5043

5043 5043 5046 5046 5046 5046 5046

5046 5046 5049 5049 5052 5055

Y( 4977 4980 5037 5040

139
5088

5091

5094

5097

5100

5103

5106

5109

5112

5115

5118

5121

5124

5127

5130

5133

5136

5139

5142

5145

5148

5151

5154

5157

5160

5163

5166

5169

5172

5175

5178

5181

5184

5187

5190

5193

5196

5199

5202

5205

5208

5211

5214

5217

5220

5223

5226

5229

5232

Fparab: SUB Fparab(P(*) ,Sp,V(*) ,W(*) ,Res(*) , Error_flag,Hi_lo

_port)

- - (81/07/30) GFE-GEC

! V(l) . . .V(5)-R1,R2,W1,W2,W3

DIM B(1:16,1:5),X(1:5),Y(1:16)

K-4*Sp-4 ! Adds 4 to column index when Sp=2

Ab-(V(4)*V(4)+V(5))*((V(4)-V(3)) A 2+V(5)) ! Normalize by ab

FOR H-l TO 10 ! 10 - upper limit to number of iterations

N: N-0

FOR J-l TO 16 ! Iterates over rows in "P" matrix

I-J-N ! Index for "B" matrix

P—P(J ,K+1)

IF P>0 THEN P ! P-=0 indicates no data in this row:

skip to next one N-N+l ! & adjust row index in MAT "B" to lag "P"

by one unit

GOTO Nextj

P: P3«P(J,K+2)/P

P5-P(J,K+3)/P

P6—P(J ,K+4)/P

A— (V(1)*P5-P3)/V(3) -V(3)

B-P3+V(4)*(V(4)+A)+V(5) -V(2)*P6

C-A*A-4*P3

P-2*(B*V(4)+A*V(5))

Y ( I

) — - B*B - C*V ( 5

)

! Parab_res(Sp, J)=Y(I)/Ab IPlace normalized residual in

approprate column

B ( I , 1

) -P*P5/V ( 3

)

B(I , 2)--2*B*P6

B(I , 3)—P*( -A/V (3) -2)

B(I ,4)«2*B*(2*V(4)+A)

B(I,5)-2*B+C

Nextj : NEXT J

REDIM B(1 : I , 1 : 5) ,Y(1:I) ! Q-DOT(Y.Y)

IF H>1 THEN Qa

Qi-Q ! GOTO T ! Qa: IF Q<T*1.001 THEN Qb

L-2*L

IF L>70 THEN Error_flag*2

IF L>70 THEN Error

MAT X—X/(L)

MAT V-V-X

GOTO N

Qb: IF (Q>T* . 99) OR (Q<1E-16) THEN Res

! "Normal" exit from "Fparab"

T: T-Q

L—

CALL Msoln(B(*) ,Y(*) ,X(*))

MA.T V-V+X

Drop bottom N rows (no data here)

Save initial residual

Initialize T

NEXT H

PRINT "Ten iterations performed by Fparab"

Error_flag-l

Error: BEEP

140
5235 PRINT "Abnormal exit from Fparab routine. Poor initial

estimate implied"

5238 Res: Ab-(V(4)*V(4)+V(5) )*( (V(4) -V(3)

)

A 2+V(5)

)

! Normalize by ab

5241 Res (Sp , 1)-SQR(Q/(I- 5) )/Ab

5244 Res (Sp , 2)-SQR(Qi/Q)

5247 IF V ( 5 ) >0 THEN Ex

5250 PRINT "Error in Fparab, (Im(W2)) A 2« ";V(5)

5253 V5-SQR(ABS (V ( 5 ) )

)

5256 Error_flag-Error_flag+2

5259 GOTO Err

5262 Ex: V(5)-SQR(V(5) ) ! A plus or minus sign may be required

depending upon

5265 IF NOT Hi_lo_port THEN V(5)—V(5)

5268 IF ABS (V(5)/V(4))>.05 THEN Exit

! how detector "numbers" are assigned

5271 BEEP

5274 PRINT "Poor initial parabolid estimate indicated"

5277 PRINT

5280 Err: BEEP

5283 PRINT "Six-port-" ; Sp

5286 PRINT "Zeta- ";V(1)

5289 PRINT "Rho- ";V(2)

5292 PRINT "Wl- ";V(3)

5295 PRINT "Re(W2)« ";V(4)

5298 PRINT "Im(W2)= " ;V(5)

5301 PAUSE

5304 Exit: FOR 1-1 TO 5 5307 W(Sp,I)-V(I)

5310 NEXT I 5313 SUBEND

5316 ! ***************************

S Fparab

(

A 5136 5139 5142 5142 5145 5160 5163

Ab 5100 5238 5241

B 5139 5145 5148 5148 5157 5163 5166

B( 5094

5217

5154 5157 5160 5163 5166 5172

C 5142 5148 5166

Err: 5280 5259

Error: 5232 5196

Error_flag 5088 5193 5229 5256 5256

Ex: 5262 5247

Exit: 5304 5268

141
H 5103 5178 5223

Hi_lo_port 5088 5265

I 5112 5148 5154 5157 5160 5163 5166

5172 5172 5241 5304 5307 5307 5310

J 5109 5112 5115 5127 5130 5133 5169

K 5097 5115 5127 5130 5133

L 5190 5190 5193 5196 5199 5214

N 5106 5112 5121 5121

N: 5106 5205

Nextj : 5169 5124

P 5115 5118 5127 5130 5133 5145 5154

5160

P( 5088 5115 5127 5130 5133

P3 5127 5136 5139 5142

P5 5130 5136 5154

P6 5133 5139 5157

P: 5127 5118

Q 5175

5244

5181 5187 5208 5208 5211 5241

Qa: 5187 5178

Qb: 5208 5187

Qi 5181 5244

Res ( 5088 5241 5244

Res

5238 5208

Sp 5088 5097 5241 5244 5283 5307

T 5187 5208 5211

T: 5211 5184

V( 5088 5100 5100 5100 5100 5100 5100

5136 5136 5136 5139 5139 5139 5139

5145 5145 5148 5154 5160 5163 5202

142
5202 5220 5220 5238 5238 5238 5238

5238 5238 5247 5250 5253 5262 5262

5265 5265 5268 5268 5286 5289 5292

5295 5298 5307

V5 5253

W( 5088 5307

X( 5094 5199 5199 5202 5217 5220

Y 5175

Y( 5094 5148 5172 5175 5217

143
5319 SUB Pratio(W(*) ,Row,Wr(*) ,R) ! - (81/05/06) -GFE-

5322 DIM A(1 : 8)

5325 FOR 1-1 TO 4

5328 J—Row+I -

5331 CALL Cmpy(Wr(l ,10) ,Wr(l,ll) ,W(J,1) ,W(J,2) ,Ax,Ay)

5334 CALL Csub(Wr(l , 6) ,Wr(l , 7) , Ax, Ay ,Ax,Ay)

5337 CALL Csub(W(J , 5) ,W(J , 6) ,Wr (2 , 8) , Wr (2 , 9) , Bx , By)

5340 CALL Csub(W(J ,1) ,W(J,2) ,Wr(l,8) ,Wr(l,9) ,Cx,Cy)

5343 CALL Cmpy (Wr (2 , 10) , Wr (2 , 11) , W(J , 5) , W( J , 6) , Dx, Dy)

5346 CALL Csub(Wr(2 , 6) ,Wr(2 , 7) ,Dx,Dy ,Dx,Dy)

5349 A(2*I-l)-(Ax*Ax+Ay*Ay)/(Bx*Bx+By*By)*W(J , 3)/W(J , 7)

5352 A(2*I)-(Cx*Cx+Cy*Cy)/(Dx*Dx+Dy*Dy)*W(J , 3)/W(J ,7)

5355 NEXT I 5358 R—SUM(A)/8

5361 MAT A-A-(R)

5364 Res—SQR(DOT (A , A) /7 ) /R ! (Std dev)/(mean)

5367 SUBEND

| ***********************************************************

S Pratio(

A 5364

A( 5322 5349 5352 5358 5361 5361 5364

Ax 5331 5334 5334 5349 5349

Ay 5331 5334 5334 5349 5349

Bx 5337 5349 5349

By 5337 5349 5349

Cx

Cy

5340

5340

5352

5352

5352

5352

Dx 5343 5346 5346 5352 5352

Dy 5343 5346 5346 5352 5352

I 5325 5328 5349 5352 5355

J 5328

5343

5331

5343

5331

5349

5337

5349

5337

5352

5340

5352

5340

R 5319 5358 5361 5364

Res 5364

Row 5319 5328

W( 5319

5343

5331

5343

5331

5349

5337

5349

5337

5352

5340

5352

5340

Wr ( 5319

5340

5331

5340

5331

5343

5334

5343

5334

5346

5337

5346

5337

144
5373 SUB Stds2(W(*) ,Wr(*) ,S(*),Res(*)) !- (81/12/18) -GFE

5376 ! Modification of "Stds" for use with Type N

connector & "Trl3"

5379 DIM G(1 : 4 , 1 : 4) ,T(1:6)

5382 CALL Wg(Wr (*) , 1 , 1 ,W(3 , 1) ,W(3,2) ,S(4,1) , S (4 , 2)

)

5385 CALL Wg(Wr (*) , 2 , 1 , W(3 , 5) , W(3 , 6) , S (5 , 1) , S (5 , 2)

)

5388 CALL Wg(Wr (*) , 1 , 1 , W(4 , 1) ,W(4,2) , S (6 , 1) ,S(6,2))

5391 CALL Wg(Wr (*) , 2 , 1 , W(4 , 5) ,W(4,6) ,S(7 ,1) ,S(7 ,2))

5394 FOR 1-1 TO 4

5397 FOR Sp-1 TO 2 5400 J-(Sp«l)+3*(Sp«2)

5403 K-J+2*(Sp-2)

5406 CALL Wg(Wr (*) , Sp , 0,W(I+12 ,K) ,W(I+12 ,K+1) ,G(I , J) ,G(I , J+l)

)

5409 NEXT Sp

5412 NEXT I 5415 CALL Rtpt(G(*) ,1,T(*) ,Res(l,ll))

5418 CALL Polar(T(2) ,T(5) , S (8 , 1) , S (8 , 2)

)

5421 CALL Cmpy(T(2) ,T(5) ,T(3) ,T(6) ,X,Y)

5424 CALL Csub(T(l) ,T(4) .X.Y.X.Y)

5427 CALL Polar(X, Y,R,T)

5430 S ( 9 , l)-SQR(R)

5433 S ( 9 , 2 )-T/2 - 180*(T>0) ! Default value between -180 & 0

5436 CALL Polar ( -T( 3) , -T(6) , S (10 , 1) , S (10 , 2)

)

5439 SUBEND

5442 ! t********************************************

S Stds2

(

G( 5379 5406 5406 5415

I 5394 5406 5406 5406 5406 5412

J 5400 5403 5406 5406

K 5403 5406 5406

R 5427 5430

Res ( 5373 5415

S( 5373 5382 5382 5385 5385 5388 5388

5391 5391 5418 5418 5430 5433 5436

5436

Sp 5397 5400 5400 5403 5406 5409

T 5427 5433 5433

T( 5379 5415 5418 5418 5421 5421 5421

5421 5424 5424 5436 5436

Wr( 5373 5382 5385 5388 5391 5406

X 5421 5424 5424 5427

Y 5421 5424 5424 5427

145
5445

5448

5451

5454

5457

5463

5466

5469

5472

5475

5478

5481

5484

5487

5493

5496

5499

5502

5505

5508

5511

5514

5517

5520

5523

5526

5529

5532

5535

5538

5541

5544

5547

5550

5553

5556

5559

5562

5565

5568

5571

5574

5577

SUB Trl5(W(*) ,Wr(*) ,Opt$,Stds(*) ,Res(*)) !- (82/04/14) -GFEModification of "Trl" routine. Gives three options

Opt$-l

Opt$-2L,(2R)

! Option-3

Standard TRL routine

For Type N connector, assumes equal mag

gamma for "opens"

& assigns phase of 180 to termination or "short" on either Six-port#l (left) , or if

0pt$-2R to Six-port#2 (right)

Assumes equal mag gamma on "opens", equal

phase on "shorts"

Obtains Mag Gamma from opens , phase from

shorts

IF (0pt$-"l") OR (0pt$-"2L") OR (0pt$="2R") OR (0pt$="3")

THEN 5478

PRINT "IMPROPER FORMAT FOR Option$"

GOTO 5703

DIM S(1 : 6)

DEG

CALL Rtpt (W(*) , 5 , S (*) ,Res(l,9))

CALL I dent (Tax , S (1) ,Tbx,S(2) ,Tcx,S(3) ,Tay,S(4) ,Tby,S(5)

,

Tcy , S(6) ) ! "Thru"5490 CALL Rtpt(W(*) ,9,S(*)

,

Res (1,10))

CALL I dent ( Lax , S ( 1 ) , Lbx , S ( 2 ) ,Lcx,S(3) ,Lay,S(4) ,Lby,S(5)

,

Lcy,S(6)) ! "Line"

CALL Cmpy(Lbx,Lby , Tex, Tcy ,Ax,Ay)

CALL Csub(Lax,Lay ,Ax,Ay , Max, May)

CALL Cmpy ( Tax , Tay , Lbx , Lby , Ax , Ay

)

CALL Cmpy ( Lax , Lay , Tbx , Tby , Bx , By

)

CALL Csub(Ax,Ay,Bx,By ,Mbx,Mby)

CALL Csub (Lex , Ley , Tex , Tcy , Mcx , Mcy

)

CALL Cmpy ( Tbx, Tby , Lex, Ley , Ax, Ay)

CALL Csub (Tax, Tay ,Ax,Ay ,Mdx,Mdy)

CALL Csub (Mdx/2 , Mdy/2 , Max/2 , May/2 , Bx , By

)

CALL Cdiv(Mcx,Mcy,Bx,By,Ax,Ay)

CALL Cdiv(-Mbx, -Mby ,Bx,By ,Cx,Cy)

CALL Cmpy(Ax,Ay,Cx,Cy ,Dx,Dy)

CALL Csub(l,0,Dx,Dy ,Dx,Dy)

R-SQR ( SQR ( Dx*Dx+Dy*Dy )

)

T— (ATN(Dy/(Dx+lE- 20) )+180*(Dx<0)*SGN(Dy+lE- 20) )/2 ! Root

choice made here

CALL Cadd(l , 0 ,R*COS(T) ,R*SIN(T) ,Dx,Dy)

CALL Cdiv(-Cx, -Cy,Dx,Dy ,Abx,Aby)

CALL Cdiv(-Ax, -Ay ,Dx,Dy,Acx,Acy)

CALL Cmpy (Mbx, Mby ,Acx,Acy ,Ax,Ay) ! Compute Exp (

- gammal)

for line

CALL Cadd(Ax,Ay , Max, May ,Ax,Ay)

CALL Cmpy(Mcx,Mcy,Abx,Aby,Bx,By)

CALL Cadd(Bx, By ,Mdx,Mdy , Bx, By)

CALL Cdiv(Ax,Ay ,Bx,By,X,Y)

CALL Polar(X, Y,R,T)

Stds(3 , l)-SQR(R)

Stds(3,2)-T/2-180*(T>0) ! Default value of line length

between -180 & 0

CALL Cmpy ( Acx, Acy, Tbx, Tby ,Dx,Dy)

CALL Csub(l,0,Dx,Dy,Dx,Dy)

146
5580 CALL Cmpy(Acx,Acy ,Tax,Tay ,Ax,Ay) ! Compute elements

of Mat B

5583 CALL Csub(Tcx,Tcy ,Ax,Ay ,Ax,Ay)

5586 CALL Cdiv ( Ax , Ay , Dx , Dy , Bex , Bey

)

5589 CALL Cmpy(Abx,Aby ,Tcx,Tcy ,Ax,Ay)

5592 CALL Csub(Tax,Tay , Ax, Ay ,Ax, Ay)

5595 CALL Cdiv(Ax , Ay , Dx , Dy , Px , Py)

5598 CALL Csub (Tbx , Tby , Abx , Aby , Bx , By)

5601 CALL Cdiv ( Bx , By , Ax , Ay , Bbx , Bby

)

5604 FOR K-3 TO 4

5607 IF (0pt$-"2R" ) AND (K-3) THEN 5628

5610 CALL Cmpy ( Acx , Acy ,W(K,1) ,W(K,2) ,Ax,Ay)

5613 CALL Csub(l , 0 , Ax, Ay , Ax, Ay)

5616 CALL Csub (W(K,1) ,W(K,2) , Abx , Aby , Bx , By)

5619 CALL Cdiv(Bx,By,Ax,Ay,Ax,Ay)

5622 IF K-3 THEN CALL Polar ( -Ax , -Ay , R , T)

5625 IF (Opt$-"2L" ) AND (K-3) THEN 5679

5628 CALL Cadd(W(K, 5) ,W(K, 6) , Bex , Bey , Bx , By)

5631 CALL Cmpy (W(K, 5) , W(K, 6) , Bbx , Bby , Cx , Cy)

5634 CALL Cadd(l , 0 , Cx , Cy , Cx , Cy

)

5637 CALL Cdiv(Cx , Cy , Bx , By , Bx , By

)

5640 IF (0pt$O"2R") OR (K-4) THEN 5652

5643 CALL Cmpy (Px , Py , Bx , By , Cx , Cy)

5646 CALL Polar( -Cx, -Cy ,R,T)

5649 GOTO 5679

5652 CALL Cmpy(Ax,Ay ,Bx,By ,Qx,Qy)

5655 CALL Cmpy(Px, Py ,Qx,Qy ,Ax, Ay)

5658 IF K-4 THEN 5682

5661 H-T

5664 T-(ATN(Ay/(Ax+lE-20) )+180*(Ax<0)*SGN(Ay+lE-20) )/2

5667 Q-T-H ! This assumes calibration with nominal short

5670 IF ABS (Q)>180 THEN Q=Q-360*SGN(Q)

5673 IF ABS (Q)>90 THEN T-T+180

5676 IF Opt$-"l" THEN 5682

5679 NEXT K

5682 R-SQR ( S QR ( Ax*Ax+Ay*Ay)

)

5685 CALL Rect(R,T,Aax,Aay)

5688 CALL Cdiv(Px,Py ,Aax,Aay , Bax, Bay)

5691 CALL Cmpy (Acx, Acy ,Aax,Aay , Acx, Acy)

5694 CALL Cmpy (Bbx , Bby , Bax , Bay , Bbx , Bby)

5697 CALL Ident(Wr (1 , 6) ,Aax,Wr(l,7) ,Aay,Wr(l,8) ,Abx,Wr(l,9) ,Aby,

Wr (1 , 10) , Acx ,Wr (1 , 11) ,Acy)

5700 CALL Ident (Wr (2 , 6) , Bax , Wr (2 , 7) ,Bay,Wr(2,8) , -Bcx,Wr(2,9) , -Bey,

Wr (2 , 10) , -Bbx , Wr (2 , 11) , -Bby)

5703 SUBEND

5706 ! ******************************************

S Trl5

(

Aax 5685 5688 5691 5697

Aay 5685 5688 5691 5697

Abx 5544 5556 5589 5598 5616 5697

147
Aby 5544 5556 5589 5598 5616 5697

Acx 5547 5550 5574 5580 5610 5691 5691

5697

acy 5547 5550 5574 5580 5610 5691 5691

5697

Ax 5496 5499 5502 5508 5514 5517 5523

5529 5547 5550 5553 5553 5562 5580

5583 5583 5586 5589 5592 5592 5595

5601 5610 5613 5613 5619 5619 5622

5652 5655 5664 5664 5682 5682

Ay 5496 5499 5502 5508 5514 5517 5523

5529 5547 5550 5553 5553 5562 5580

5583 5583 5586 5589 5592 5592 5595

5601 5610 5613 5613 5619 5619 5622

5652 5655 5664 5664 5682 5682

Bax 5688 5694 5700

Bay 5688 5694 5700

Bbx 5601 5631 5694 5694 5700

Bby 5601 5631 5694 5694 5700

Bex 5586 5628 5700

Bey 5586 5628 5700

Bx 5505 5508 5520 5523 5526 5556 5559

5559 5562 5598 5601 5616 5619 5628

5637 5637 5643 5652 5505 5508 5520

5523 5526 5556 5559 5559 5562 5598

5601 5616 5619 5628 5637 5637 5643

5652

Cx 5526 5529 5544 5631 5634 5634 5637

5643 5646

Cy 5526 5529 5544 5631 5634 5634 5637

5643 5646

Dx 5529 5532 5532 5535 5535 5538 5538

5541 5544 5547 5574 5577 5577 5586

5595

Dy 5529 5532 5532 5535 5535 5538 5538

5541 5544 5547 5574 5577 5577 5586

5595

H 5661 5667

148
K 5604 5607 5610 5610 5616 5616 5622

5625 5628 5628 5631 5631 5640 5658

5679

Lax 5493 5499 5505

Lay 5493 5499 5505

Lbx 5493 5496 5502

Lby 5493 5496 5502

Lex 5493 5511 5514

Ley 5493 5511 5514

Max 5499 5520 5553

May 5499 5520 5553

Mbx 5508 5526 5550

Mby 5508 5526 5550

Mex 5511 5523 5556

Mey 5511 5523 5556

Mdx 5517 5520 5559

Mdy 5517 5520 5559

Opt$ 5445 5469 5469 5469 5469 5607 5625

5640 5676

Px 5595 5643 5655 5688

Py 5595 5643 5655 5688

Q 5667 5670 5670 5670 5670 5673

Qx 5652 5655

Qy 5652 5655

R 5535 5541 5541 5565 5568 5622 5646

5682 5685

Res ( 5445 5484 5490

S( 5478 5484 5487 5487 5487 5487 5487

5487 5490 5493 5493 5493 5493 5493

5493

149
Stds ( 5445 5568 5571

T 5538

5646

5541

5661

5541

5664

5565

5667

5571

5673

5571

5673

5622

5685

Tax 5487 5502 5517 5580 5592

Tay 5487 5502 5517 5580 5592

Tbx 5487 5505 5514 5574 5598

Tby 5487 5505 5514 5574 5598

Tex 5487 5496 5511 5583 5589

Tcy 5487 5496 5511 5583 5589

W( 5445

5628

5484

5628

5490

5631

5610

5631

5610 5616 5616

Wr ( 5445

5700

5697

5700

5697

5700

5697

5700

5697

5700

5697

5700

5697

X 5562 5565

Y 5562 5565

150
5709 SUB W(P(*) ,Row,Nl , N2 , Stp ,Wr(*) ,W(*)) !--- 81/07/16- -GFE5712 FOR Sp-l+(Nl-0) TO 1+(N2>0)

5715 CALL Ident (R1 ,Wr (Sp , 1) ,R2 , Wr (Sp , 2) , W1 , Wr (Sp , 3) ,W2,Wr(Sp,4)

,

W3,Wr(Sp,5),L,L)

5718 FOR 1-1 TO Nl*(Sp-l)+N2*(Sp-2) ! Iterate over either

N1 or N2

5721 Rw—Row+ ( I - 1

) *S tp

5724 L«4*(Sp-l)*(COL(P)=8) ! Add 4 to column index as required

5727 P4-P(Rw,L+l) ! Read in Pwr values

5730 IF P4-0 THEN Nexti ! If P4-0 no data here, skip to next row

5733 P3-P(Rw, L+2)

5736 Pl-Rl*P(Rw,L+3)

5739 P2=R2*P(Rw,L+4)

5742 S-(P3+P4+P1/R1+P2/R2)/10 ! Calc weighting factors

5745 S3«(P3+S) A 2 5748 S4-(P4+S) A 2 5751 S1-(P1+S*R1) A 2 5754 S2-(P2+S*R2) A 2 5757 P-P1*P1/S1+P2*P2/S2+P3*P3/S3+P4*P4/S4

5760 Q-P1/S1+P2/S2+P3/S3

5763 Wx-(Wl+(P3-Pl)/P4/Wl)/2 ! Initial values

5766 Wy-((W2*W2+W3*W3+(P3-P2)/P4)/2-Wx*W2)/W3 ! 5769 GOSUB F ! Calc initial value of "F"

5772 R-l

5775 FOR K«1 TO 30 ! Begin Iteration

5778 Fa: Fa-Fb

5781 L-l

5784 Fs-El/Sl+E2/S2+E3/S3 ! Begin computation of derivatives

5787 Fx«Wx*Fs-Wl*El/Sl-W2*E2/S2 ! -Fx/4

5790 Fy-Wy*Fs -W3*E2/S2 ! -Fy/4

5793 D—Wx*Q-Wl*Pl/Sl -W2*P2/S2

5796 E-Wy*Q-W3*P2/S2

5799 Ci-Fs+2*(Wx*Wx/S3+(Wx-Wl) A 2/Sl+(Wx-W2) A 2/S2-D*D/P)

! -Fxx/4

5802 Di-2*(Wx*Wy/S3+(Wx-Wl)*Wy/Sl+(Wx-W2)*(Wy-W3) /S2-D*E/P) !

! -Fxy/4

5805 Ei«Fs+2*(Wy*(Wy/S3+Wy/Sl)+(Wy-W3) A 2/S2-E*E/P)

! -Fyy/4

5808 Zi«Ci*Ei-Di*Di

5811 IF (Zi<0) OR (Ei<0) THEN Bkup

5814 X-(Fx*Ei-Fy*Di)/Zi ! X,Y-= correction as per Newton

me thod

5817 Y=(Fy*Ci-Fx*Di)/Zi

5820 CALL Csub(Wx,Wy ,X,Y,Wx,Wy)

5823 GOSUB F

5826 IF Fb<Fa+lE-10 THEN ON 1+(L~1)*(X*X+Y*Y<1E-12)

GOTO Nextk.Exit

5829 L-2*L ! Routine to reduce step size

5832 IF L-128 THEN Bkup2 ! Go to "backup routine"

5835 CALL Cadd(Wx,Wy ,X/L,Y/L,Wx,Wy) ! Restore a fraction of step

5838 GOTO 5823

5841 Nextk: NEXT K

5844 Error: PRINT "Abnormal exit from circle routine ";"SpSp,"Row= ";Rw

5847 PRINT "Circle residual- " ; Pi*SQR(Fb)/2

151
5850 Exit: I^-4*(Sp-2)*(COL(W)-8)

5853 W(I,l+L)-Wx

5856 W(I,2+L)-Wy

5859 W(I,3+L)-Pi

5862 W(I ,4+L)-Pi*SQR(Fb)/2

5865 Next! : NEXT I 5868 NEXT Sp

5871 SUBEXIT

5874 ! 5877 Bkup2 : CALL Cadd(Wx,Wy,X/64,Y/64,Wx,Wy)

5880 ! Backup algorithm based on Goldfeld, etal, Econometrica

,

July 1966, pg 541

5883 Bkup : Eg-(Ci+Ei-SQR( (Ci-Ei) "2+4*Di*Di) )/2 ! (Smallest

eigenvalue )/4

5886 IF Fx*Fx+Fy*Fy>lE-12 THEN Ka

5889 Ri-.l*SQR(P3*(P3<Pl)*(P3<P2)+Pl*(Pl<P3)*(Pl<P2)+P2*(P2<Pl)

*(P2<P3)

)

5892 X--Ri*Di/SQR(Di*Di+(Ci-Eg) A 2)

5895 Y-Ri*(Ci-Eg)/SQR(Di*Di+(Ci-Eg) A 2)

5898 CALL Csub(Wx,Wy ,X,Y,Wx,Wy)

5901 GOSUB F

5904 GOTO Fa

5907 Ka: FOR Ka-1 TO 20

5910 Al-Eg-R*SQR(Fx*Fx+Fy*Fy) ! Correction to Fxx & Fyy

5913 CALL Csub(Ci , Ei , Al , A1 , Ca, Ea)

5916 Za-Ca*Ea-Di*Di

5919 X«(Fx*Ea-Fy*Di)/Za

5922 Y-(Fy*Ca-Fx*Di)/Za

5925 CALL Csub(Wx,Wy .X.Y.Wx.Wy)

5928 GOSUB F

5931 Zc-(Fb-Fa)/(2*(Ci*X*X+2 *D i *X*Y+Ei *Y*Y) - 4* ( Fx*X+Fy*Y)

) -

5934 IF Fb>Fa+lE-10 THEN Zc--2 ! This insures a reduced step size

5937 R-R*( . 4+3 . 6*(ABS (Zc)>. 3)*(1- (ABS (Zc)<l)*(l-ABS (Zc))/.7))

5940 IF Zc>-1 THEN 5841

5943 CALL Cadd(Wx,Wy ,X,Y,Wx,Wy) ! Returns to original position and

5946 NEXT Ka ! repeats with smaller step size

5949 GOTO Error

5952 F: Wm-Wx*Wx+Wy*Wy ! Compute value of "F" («Fb)

5955 Wlm-Wm+Wl* (W1 - 2*Wx)

5958 W2m=Wm+W2* (W2 - 2*Wx)+W3*(W3 - 2*Wy

)

5961 Pi“P/(Wm*P3/S3+P4/S4+Wlm*Pl/Sl+W2m*P2/S2)

5964 E3-Wm-P3/Pi

5967 El-Wlm-Pl/Pi

5970 E2-W2m-P2/Pi

5973 Fb—E1*E1/Sl+E2*E2/S2+E3*E3/S3+(1-P4/Pi) A 2/S4

5976 RETURN

5979 SUBEND

5982 ! *****************************************

S W(

Al 5910 5913 5913

Bkup2 : 5877 5832

152
Bkup : 5883 5811

Ca 5913 5916 5922

Ci 5799 5808 5817 5883 5883 5892 5895

5895 5913 5931

D 5793 5799 5799 5802

Di 5802 5808 5808 5814 5817 5883 5883

5892 5892 5892 5895 5895 5916 5916

5919 5922 5931 5796 5802 5805 5805

El 5784 5787 5967 5973 5973

E2 5784 5787 5790 5970 5973 5973

E3 5784 5964 5973 5973

Ea 5913 5916 5919

Eg 5883 5892 5895 5895 5910

Ei 5805 5808 5811 5814 5883 5883 5913

5931

Error

5844 5949

Exit: 5850 5826

F: 5952 5769 5823 5901 5928

Fa 5778 5826 5931 5934

Fa: 5778 5904

Fb 5778 5826 5847 5862 5931 5934 5973

Fs 5784 5787 5790 5799 5805

Fx 5787 5814 5817 5886 5886 5910 5910

5919 5922 5931

Fy 5790 5814 5817 5886 5886 5910 5910

5919 5922 5931

I 5718 5721 5853 5856 5859 5862 5865

K 5775 5841

Ka 5907 5946

Ka: 5907 5886

153
L 5715 5715 5724 5727 5733 5736 5739

5781 5826 5829 5829 5832 5835 5835

5850 5853 5856 5859 5862

N1 5709 5712 5718

N2 5709 5712 5718

Nexti5865 5730

Nextk: 5841 5826

P 5757 5799 5802 5805 5961

P( 5709 5724 5727 5733 5736 5739

PI 5736 5742 5751 5757 5757 5760 5763

5793 5889 5889 5889 5889 5889 5961

5967

P2 5739 5742 5754 5757 5757 5760 5766

5793 5796 5889 5889 5889 5889 5889

5961 5970

P3 5733 5742 5745 5757 5757 5760 5763

5766

5964

5889 5889 5889 5889 5889 5961

P4 5727 5730 5742 5748 5757 5757 5763

5766 5961 5973

Pi 5847 5859 5862 5961 5964 5967 5970

5973

Q 5760 5793 5796

R 5772 5910 5937 5937

R1 5715 5736 5742 5751

R2 5715 5739 5742 5754

Ri 5889 5892 5895

Row 5709 5721

Rw 5721 5727 5733 5736 5739 5844

S 5742 5745 5748 5751 5754

SI 5751 5757 5760 5784 5787 5793 5799

5802 5805 5961 5973

S2 5754 5757 5760 5784 5787 5790 5793

5796 5799 5802 5805 5961 5973

154
S3 5745 5757 5760 5784 5799 5802 5805

5961 5973

S4 5748 5757 5961 5973

Sp 5712 5715 5715 5715 5715 5715 5718

5718 5724 5844 5850 5868

Stp 5709 5721

W( 5709 5850 5853 5856 5859 5862

W1 5715 5763 5763 5787 5793 5799 5802

5955 5955

Wlm 5955 5961 5967

W2 5715 5766 5766 5766 5787 5793 5799

5802 5958 5958

W2m 5958 5961 5970

W3 5715 5766 5766 5766 5790 5796 5802

5805 5958 5958

Wm 5952 5955 5958 5961 5964

Wr ( 5709 5715 5715 5715 5715 5715

Wx 5763 5766 5787 5793 5799 5799 5799

5799 5802 5802 5802 5820 5820 5835

5835 5853 5877 5877 5898 5898 5925

5925 5943 5943 5952 5952 5955 5958

Wy 5766 5790 5796 5802 5802 5802 5805

5805 5805 5805 5820 5820 5835 5835

5856 5877 5877 5898 5898 5925 5925

5943 5943 5952 5952 5958

X 5814 5820 5826 5826 5835 5877 5892

5898 5919 5925 5931 5931 5931 5931

5943

Y 5817 5820 5826 5826 5835 5877 5895

5898 5922 5925 5931 5931 5931 5931

5943

Za 5916 5919 5922

Zc 5931 5934 5937 5937 5937 5940

Zi 5808 5811 5814 5817

155
5985 SUB Rtpt (G(*) .Row, S (*) ,R) !- (81/05/11) -GFE- -

5988 ! Compute two-port cascading parameters (Ax,Bx,Cx,& Ay,By,Cy

)“S(1) S ( 6

)

5991 DIM B(1:8,1:6),X(1:8),Y(1:8)

5994 L-2*(COL(G)>4) ! Adjustment for two different formats for "G"

5997 FOR 1-1 TO 4

6000 J-I+4

6003 K-I+Row-1

6006 B(I,1)-B(J,4)-1

6009 B(I , 2)—B(J , 5)-C—G(K, 3+L)

6012 B(I,3)-B(J,6)-A— G(K,1)

6015 B(I ,4)—B(J , 1)—

6018 B(I , 5)“D— -G(K,4+L)

6021 B(I , 6)“B“G(K, 2)

6024 B(J , 2)--D

6027 B(J , 3)— -B

6030 CALL Cmpy ( -A,B,C, -D,Y(I) , Y( J )

)

6033 NEXT I 6036 CALL Msoln(B(*) , Y(*) , S (*)

)

6039 MAT X«B*S

6042 MAT X-Y-X

6045 R-SQR(DOT(X,X)/DOT(S,S))

6048 SUBEND

6051 ! **********************************

S Rtpt(

A 6012 6030

B 6021 6027 6030

B( 5991 6006 6006 6009 6009 6012 6012

6015 6015 6018 6021 6024 6027 6036

6039

C 6009 6030

D 6018 6024 6030

G( 5985 5994 6009 6012 6018 6021

I 5997 6000 6003 6006 6009 6012 6015

6018 6021 6030 6033

J 6000

6030

6006 6009 6012 6015 6024 6027

K 6003 6009 6012 6018 6021

L 5994 6009 6018

R 5985 6045

Row 5985 6003

156
s 6045

S( 5985 6036 6039 6045

X 6045

X( 5991 6039 6042 6042 6045

Y( 5991 6030 6030 6036 6042

157
6054 SUB Msoln(B(*) ,Y(*) ,X(*)) !- (80/1/16) GFE

6057 OPTION BASE 1

6060 DIM A(9,9) ,C(9,16) ,U(9)

6063 M-ROW(B)

6066 N-COL(B)

6069 REDIM A(N,N) ,C(N,M) ,U(N)

6072 MAT C-TRN(B)

6075 MAT A«C*B

6078 MAT A-INV(A)

6081 MAT U-C*Y

6084 MAT X«A*U

6087 SUBEND

6090 ! **********************'*'*•*****'*•'**''*'

S Msoln(

A( 6060 6069 6075 6078 6078 6084

B( 6054 6063 6066 6072 6075

C( 6060 6069 6072 6075 6081

M 6063 6069

N 6066 6069 6069 6069 6069

U( 6060 6069 6081 6084

X( 6054 6084

Y( 6054 6081

158
6093 SUB Wg(Wr(*) , I ,F,Wx,Wy ,X,Y) !- (80/1/9) -GFE

6096 CALL Csub(Wx,Wy ,Wr(I , 8) ,Wr(I , 9) ,Nx,Ny)

6099 CALL Cmpy(Wr(I , 10) ,Wr(I , 11) ,Wx,Wy ,X,Y)

6102 CALL Csub(Wr (I ,6) ,Wr(I,7) ,X,Y,Dx, Dy)

6105 CALL Cdiv(Nx,Ny ,Dx,Dy ,X,Y)

6108 IF F-l THEN CALL Polar(X, Y,X,Y)

6111 SUBEND

6114 ! *********************************

S Wg(

Dx 6102 6105

Dy 6102 6105

F 6093 6108

I 6093 6096 6096 6099 6099 6102

Nx 6096 6105

Ny 6096 6105

Wr ( 6093 6096 6096 6099 6099 6102

Wx 6093 6096 6099

Wy 6093 6096 6099

X 6093 6099 6102 6105 6108 6108

Y 6093 6099 6102 6105 6108 6108

6102

6102

159
6117 SUB Wq(W(*) ,Q(*)) !- -80/04/03- - -GFE

6120 FOR 1-1 TO ROW(W)

6123 CALL Ident (A , W(I ,1) ,B,W(I,2) ,C,W(I,3) ,D,W(I,4) ,E,W(I,5) ,F,

W(I,6))

6126 CALL Ident (G ,W(I,7) ,H,W(I,8) ,P,W(I,9) ,Q , W(I , 10) ,R,W(I,11)

,

Q(I » 12) , W(I , 12)

)

6129 CALL Polar ( -Q, -R,Q(I,1) ,Q(I , 2)

)

6132 Q(I,9)-S«SQR(F*F+G*G)

6135 CALL Polar ( ( -F*H-G*P)/S/S , (G*H-F*P)/S/S ,Q(I , 3) ,Q(I ,4)

)

6138 CALL Wg(W(*) ,I,1,C,0,Q(I,5) ,Q(I , 6)

)

6141 CALL Wg(W(*) ,I,1,D,E,Q(I,7) , Q( I , 8)

)

6144 Q(I,10)-SQR(((F-C*Q) a 2+(G-C*R)"2)/A)

6147 Q(I , 11)-SQR( ( (F-D*Q+E*R) a 2+(G-D*R-E*Q) a 2)/B)

6150 NEXT I 6153 SUBEND

6156 ! **•****************'*'**•*'*'*•*'*'*'*•

S Wq ( A 6123 6144

B 6123 6147

C 6123 6138 6144 6144

D 6123 6141 6147 6147

E 6123 6141 6147 6147

F 6123 6132 6132 6135 6135 6144 6147

G 6126 6132 6132 6135 6135 6144 6147

H 6126 6135 6135

I 6120 6123 6123 6123 6123 6123 6123

6126 6126 6126 6126 6126 6126 6126

6129 6129 6132 6135 6135 6138 6138

6138 6141 6141 6141 6144 6147 6150

P 6126 6135 6135

Q 6126 6129 6144 6147 6147

Q( 6117 6126 6129 6129 6132 6135 6135

6138 6138 6141 6141 6144 6147

R 6126 6129 6144 6147 6147

S 6132 6135 6135 6135 6135

W( 6117 6120 6123 6123 6123 6123 6123

6123 6126 6126 6126 6126 6126 6126

6138 6141

160
6159 SUB Mg(P(*) , Row, Sp , Wr (*) , F$ ,X, Y,Res) !- (81/07/16) -GFE-

6162 DIM W(l: 1,1:4)

6165 CALL W(P(*) , Row , Sp-1 , Sp-2 , 1 , Wr (*) ,W(*))

6168 CALL Wg(Wr (*) ,Sp,P,W(l,l) ,W(1,2) ,X,Y)

6171 IF F$-"P" THEN CALL Polar (X,Y,X,Y)

6174 Res-W (1,4)

6177 SUBEND

6180 ! Vr****************

s Mg(

F$ 6159

P 6168

P( 6159

Res 6159

Row 6159

Sp 6159

W( 6162

Wr ( 6159

X 6159

Y 6159

6171

6165

6174

6165

6165 6165 6168

6165 6168 6168 6174

6165 6168

6168 6171 6171

6168 6171 6171

161
6183 SUB Cadd(Ax , Ay , Bx , By , Cx , Cy ) !- (80/1/16) - -GFE-

6186 Cx-Ax+Bx

6189 Cy-Ay+By

6192 SUBEND

6195 ! *************************************

S Cadd(

Ax 6183 6186

Ay 6183 6189

Bx 6183 6186

By 6183 6189

Cx 6183 6186

Cy 6183 6189

162
6198 SUB Csub(Ax,Ay,Bx,By ,Cx,Cy) ! -(80/1/16) GFE6201 Cx-Ax-Bx

6204 Cy-Ay-By

6207 SUBEND

6210 ! ********************************

S Csub(

Ax 6198 6201

Ay 6198 6204

Bx 6198 6201

By 6198 6204

Cx 6198 6201

cy 6198 6204

163
6213 SUB Cmpy ( Ax , Ay , Bx , By , Cx , Cy) !- (80/1/16) -GFE-

6216 CALL I dent (X , Ax , Y , Ay , U , Bx , V , By , A , 0 , B , 0

)

6219 Cx«X*U-Y*V

6222 Cy-X*V+Y*U

6225 SUBEND

6228 ! *********************************

S Cmpy

(

A 6216

Ax 6213 6216

Ay 6213 6216

B 6216

Bx 6213 6216

By 6213 6216

Cx 6213 6219

cy 6213 6222

u 6216 6219 6222

V 6216 6219 6222

X 6216 6219 6222

Y 6216 6219 6222

164
6231 SUB Cdiv( Ax , Ay , Bx , By , Cx , Cy ) !- (80/1/16) - -GFE

6234 CALL Ident (X , Ax , Y, Ay ,U , Bx , V , By , A, Bx*Bx+By*By , B , 0)

6237 Cx-(X*U+Y*V)/A

6240 Cy— (Y*U-X*V) /A

6243 SUBEND

6246 ! ************'****'*'****'*****

S Cdiv(

A 6234 6237 6240

Ax 6231 6234

Ay 6231 6234

B 6234

Bx 6231 6234 6234 6234

By 6231 6234 6234 6234

Cx 6231 6237

Cy 6231 6240

U 6234 6237 6240

V 6234 6237 6240

X 6234 6237 6240

Y 6234 6237 6240

165
6249 SUB I dent (A,B,C,D,E,F,G,H,I,J,K,L) !-- (80/1/16) -- -GFE

6252 A-B

6255 C-D

6258 E-F

6261 G-H

6264 I-J

6267 K-L

6270 SUBEND

6273 ! *************************************

S I dent

(

A 6249 6252

B 6249 6252

C 6249 6255

D 6249 6255

E 6249 6258

F 6249 6258

G 6249 6261

H 6249 6261

I 6249 6264

J 6249 6264

K 6249 6267

L 6249 6267

166
6276 SUB Polar(Xo,Y,R,T) !-- (80/1/16) - -GFE

6279 DEG

6282 X-Xo

6285 R-SQR(X*X+Y*Y)

6288 T-ATN (Y/(X+1E- 20) )+180*(X<0)*SGN (Y+1E- 20)

! Range -180 to +180

6291 SUBEND

6294 ! *********************

S Polar(

R 6276 6285

T 6276 6288

X 6282 6285 6285 6288 6288

Xo 6276 6282

Y 6276 6285 6285 6288 6288

167
6297 SUB Rect (Ro , T ,X, Y) ! --(80/1/16) GFE

6300 DEG

6303 R-Ro

6306 X—R*C0S (T)

6309 Y-R*SIN(T)

6312 SUBEND

6315 ! *********'***'***'***'**'**

S Rect(

R 6303 6306 6309

Ro 6297 6303

T 6297 6306 6309

X 6297 6306

Y 6297 6309

168
6318 SUB Cpwr(Pstd, Pwr(*) ,Row, Sp ,Wr(*) ,Res) !-- (81/05/06) -GFE-

6321 CALL Mpwr (Pwr (*) , Row, Sp , Wr (*) , "N" ,X, Y, "Net" , Pnet ,Res)

6324 Wr(l,12)-Pstd/Pnet

6327 Wr (2

,

12)-Wr (2 , 12)*Wr(l , 12)

6330 SUBEND

6333 ! ******************************

S Cpwr(

Pnet 6321 6324

Pstd 6318 6324

Pwr ( 6318 6321

Res 6318 6321

Row 6318 6321

Sp 6318 6321

Wr ( 6318 6321

X 6321

Y 6321

6324 6327 6327 6327

169
6336 SUB Mpwr(P(*) ,Row, Sp ,Wr(*) ,G$,X,Y,P$,P,Res) ! -81/07/16) - -GFE

6339 DIM W(l:l,l:4)

6342 CALL W(P(*) ,Row, Sp-1 , Sp-2 , 1 ,Wr (*) ,W(*)

)

6345 CALL Cmpy (Wr (Sp , 10) ,Wr(Sp,H) ,W(1,1) ,W(1,2) ,Ax,Ay)

6348 CALL Csub(Wr(Sp , 6) ,Wr(Sp,7) , Ax, Ay , Ax, Ay)

6351 P-Pinc-W(l,3)*Wr(Sp,12)*(Ax*Ax+Ay*Ay)

6354 IF (G$="R" )+(G$-"P" )+(P$="Net" )«0 THEN Exit

6357 CALL Wg(Wr (*) , Sp , 0 , W(1 , 1) , W(1 , 2) ,X, Y)

6360 IF P$«="Net" THEN P-P*(1-X*X-Y*Y)

6363 IF G$—"P" THEN CALL Polar(X,Y,X,Y)

6366 Exit: Res-W(l,4)

6369 SUBEND

S Mpwr(

Ax 6345 6348 6348 6351 6351

Ay 6345 6348 6348 6351 6351

Exit6366 6354

o</> 6336 6354 6354 6363

P 6336 6351 6360 6360

P$ 6336 6354 6360

P( 6336 6342

Pine 6351

Res 6336 6366

Row 6336 6342

Sp 6336

6351

6342

6357

6342 6345 6345 6348 6348

W( 6339

6366

6342 6345 6345 6351 6357 6357

Wr( 6336

6357

6342 6345 6345 6348 6348 6351

X 6336 6357 6360 6360 6363 6363

Y 6336 6357 6360 6360 6363 6363

170
6372 SUB Mtpt (P(*) ,Row , Stp , Wr (*) , F$ , S (*) ,R(*)) !- (81/07/16) - -GFE

6375 MAT R-ZER

6378 DIM W(1 : 4 , 1 : 8) , C(1 : 6) ,G(1:4,1:4)

6381 CALL W(P(*) , Row , 4 , 4 , Stp , Wr (*) ,W(*))

6384 FOR 1-1 TO 4

6387 FOR Sp«l TO 2 6390 J-(Sp-l)+5*(Sp-2)

6393 CALL Wg(Wr(*) ,Sp,0,W(I,J) ,W(I,J+1) ,G(I,2*Sp-l) ,G(I,2*Sp))

6396 R(Sp)»R(Sp)+W(I,4*Sp)

6399 NEXT Sp

6402 NEXT I 6405 MAT R-R/(4)

6408 CALL Rtpt (G(*) , 1 , C (*) , R(3)

)

6411 CALL Cmpy(C(2) ,C(5) ,C(3) ,C(6) ,Ax,Ay)

6414 CALL Csub(C(l) , C(4) , Ax, Ay, Ax, Ay)

6417 CALL Polar (Ax, Ay ,R,T)

6420 T-T/2-180*(T>0) ! -180<(Default value)<0

6423 IF F$«"P" THEN P

6426 CALL Rect(SQR(R) ,T,X,Y)

6429 CALL Ident (S (1) ,C(2) ,S(2) ,C(5) ,S(5) ,-C(3) ,S(6) ,-C(6),S(3),X,

S (4) , Y)

6432 GOTO Exit

6435 P: CALL Polar (C(2) , C(5) , S (1) , S (2)

)

6438 CALL Polar ( -C ( 3) , -C (6) , S ( 5) , S ( 6 )

)

6441 S(3)«SQR(R)

6444 S(4)-T

6447 SUBEND

6450 Pset: ! PSET AT 3450

6460 RE-SAVE "ADPll" , 6460 , 11000 1850730

CODED TO UTILIZE DUAL SIX- PORT

S Mtpt(

Ax 6411 6414 6414 6417

Ay 6411 6414 6414 6417

C( 6378 6408 6411 6411 6411 6411 6414

6414 6429 6429 6429 6429 6435 6435

6438 6438

Exit: 0 6432

F$ 6372 6423

G( 6378 6393 6393 6408

I 6384 6393 6393 6393 6393 6396 6402

J 6390 6393 6393

P( 6372 6381

P: 6435 6423

171
Pset

6450

R 6417 6426 6441

R( 6372 6375 6396 6396 6405 6405 6408

Row 6372 6381

S( 6372

6435

6429

6435

6429

6438

6429

6438

6429

6441

6429

6444

6429

Sp 6387

6396

6390

6396

6390

6399

6393 6393 6393 6396

Stp 6372 6381

T 6417 6420 6420 6420 6426 6444

W( 6378 6381 6393 393 6396

Wr( 6372 6381 6393

X 6426 6429

Y 6426 6429

172
6470 DEF FNAdp(Nfreqs, Repeats, Ml, PI, M2, P2,Ca$)

6480 ! CALC PARAMETERS FOR ADAPTOR FROM 6 PORT MEAS

JULY-AUG 1985

6490 OPTION BASE 1

6500 Msu$-":F8,1"

6510 DIM Result (Nfreqs , 60) , Freqs (Nfreqs) , Id_content$ [ 80 ]

,

S (Nfreqs , 34)

6521 K-0

6570 ! LINPUT "ENTER FILE NAME FOR DATA

WITHOUT ADAPTER" ,N1$

6580 FIXED 0

6590 ! LINPUT "ENTER FILE NAME FOR DATA WITH ADAPTER ",N2$

6620 N1$-"CRST1"

6630 N2$-"CRST3"

6640 CALL Redhed(Nl$ ,Msu$ ,Date$ ,Time$ ,Typ$ .Nfreqs , Freqs(*)

,

Repeats , Sp , Std_mnt , Id_content$ , Cnnct$)

6650 MASS STORAGE IS ":F8,1"

6660 PRINTER IS 16

6670 PRINT "START OF FNADPT"

6680 Nfreq-N-Nfreqs

6690 PRINT

6700 PRINT

6710 Sport-1

6720 PRINTER IS 0

6721 PRINT

6724 PRINT "ADAPTER EVALUATION"

6725 PRINT " " 6727 PRINT

6730 PRINT "FILES PROCESSED -" ;N1$;" AND ";N2$

6740 PRINT

6750 Nl-INT(Nl)

6760 N2-INT(N2)

6770 PRINTER IS 16

6780 FOR P—1 TO Nfreqs

6790 FOR Prt-1 TO 2

6800 PRINTER IS 16

6810 ON Prt GOTO 6820,6850

6820 CALL Redwrt (Nl$ , " : F8 , 1" , "

" ,Result(*) .Nfreqs)

6830 Nfreq=l

6840 GOTO 6870

6850 CALL Redwrt (N2$, " :F8,1" , "

" .Result (*) .Nfreqs)

6860 NORMAL

6870 ON Sport GOTO 6880,6900

6880 Mc-0

6890 GOTO 6910

6900 Me—12

6910 A8-Result (P , 6+Mc)

6920 A9-Result(P , 7+Mc)

6930 B8-Result(P, 8+Mc)

6940 B 9-Re suit (P , 9+Mc)

6950 C8-Result(P, 10+Mc)

6960 C9-Result(P , 11+Mc)

6980 GOTO 6990

6990 All(Prt)-A8

7000 A22(Prt)«A9

173
7010

7020

7030

7040

7050

7060

7061

7070

7080

7090

7100

7110

7120

7130

7140

7150

7160

7170

7180

7190

7200

7210

7220

7230

7240

7250

7260

7270

7280

7290

7300

7310

7320

7330

7340

7350

7360

7370

7380

7390

7400

7410

7420

7430

7440

7450

7460

7470

7480

7490

7500

7510

7520

Bll(Prt)-B8

B22 (Prt)-B9

Cll(Prt)-C8

C22 (Prt)-C9

ON Prt GOTO 7060,7140

FIXED 4

PRINTER IS 16

PRINT "FREQUENCY- ";Freqs(P);" GHZPRINT

PRINT "ADAPTOR LOSS AT 6 PORT NUMBER "; Sport

PRINT

PRINT "SYSTEM CONSTANTS"

PRINT

GOTO 7180

PRINT

PRINTER IS 16

PRINT "ADAPTER CONSTANTS"

PRINT

FIXED 4

PRINT "A8,A9,B8,B9,C8,C9"

PRINT A8,A9,B8,B9,C8,C9

PRINT

PRINT "A1,A2,B1,B2,C1,C2" ; All (Prt) ,A22(Prt) ,Bll(Prt)

,

B22(Prt) ,Cll(Prt) ,C22(Prt)

PRINT

NEXT Prt

i

! Sll-(b' -b)/(a-b'c)

Zl—Bll(2)

Z2-B22 (2)

Z3-B11(1)

Z4-B22(l)

CALL Csua(Zl,Z2,Z3,Z4,Z9,Z0)

Nr-Z9

Ni-ZO

Z3-C11(1)

Z4-C22 (1)

CALL Cmua ( Zl , Z2 , Z3 , Z4 , Z9 , ZO

)

Z3-Z9

Z4-Z0

Zl-All(l)

Z2-A22 (1)

CALL Csua(Zl,Z2,Z3,Z4,Z9,Z0)

Zl-Nr

Z2-Ni

Z3-Z9

Z4-Z0

CALL Cdia(Zl,Z2,Z3,Z4,Z9,Z0)

Sllr-Z9

Slli-ZO

X-Z9

Y-ZO

174
7530

7540

7550

7560

7570

7580

7590

7600

7610

7620

7630

7640

7650

7660

7670

7680

7690

7700

7710

7720

7730

7740

7750

7760

7770

7780

7790

7800

7810

7820

7830

7840

7850

7860

7870

7880

7890

7900

7910

7920

7930

7940

7950

7960

7970

7980

7990

8000

8010

8020

8030

8040

8050

8060

8070

CALL Crpa(X,Y,R,T)

PRINT

Sllm-R

Slla-T

iS22-(a'c-ac')/(a-b'c)

Zl-All ( 2

)

Z2-A22(2)

Z3-C11(1)

Z4-C22 (1)

CALL Cmua ( Z1 , Z2 , Z3 , Z4 , Z9 , Z0

)

Mr-Z9

Mi-ZO

Zl-All (1)

Z2-A22 (1)

Z3-C11(2)

Z4-C22 (2)

CALL Cmua(Zl , Z2 , Z3 , Z4 , Z9 , ZO)

Zl-Mr

Z2-Mi

Z3-Z9

Z4-Z0

CALL Csua(Zl , Z2 , Z3 , Z4 , Z9 , ZO)

Mr-Z9

Mi-ZO

Z1-B11(2)

Z2-B22 (2)

Z3-C11(1)

Z4-C22 (1)

CALL Cmua(Zl , Z2 , Z3 , Z4 , Z9 , ZO)

Z3-Z9

Z4-Z0

Zl-All (1)

Z2-A22(l)

CALL Csua(Zl , Z2 , Z3 , Z4 , Z9 , ZO)

Z3-Z9

Z4-Z0

Zl-Mr

Z2-Mi

CALL Cdia(Zl , Z2 , Z3 , Z4 , Z9 , ZO)

S22r-Z9

S22i-Z0

X-Z9

Y-ZO

CALL Crpa(X, Y,R,T)

S22m-R

S22a-T

j

! S12 A 2-(a' -be ' )/(a-b ' c)+Sll*S22

Z3-C11(2)

Z4-C22 (2)

175
8080

8090

8100

8110

8120

8130

8140

8150

8160

8170

8180

8190

8200

8210

8220

8230

8240

8250

8260

8270

8280

8290

8300

8310

8320

8330

8340

8350

8360

8370

8380

8390

8400

8410

8420

8430

8440

8450

8460

8470

8480

8490

8500

8510

8520

8530

8540

8550

8560

8570

8580

8590

8600

8610

8620

Zl-Bll(l)

Z2-B22 (1)

CALL Cmua ( Zl , Z2 , Z3 , Z4 , Z9 , Z0

)

Zl-All (2)

Z2—A22(2)

Z3-Z9

Z4-Z0

CALL Csua(Zl , Z2 , Z3 , Z4 , Z9 , ZO)

Mr-Z9

Mi-ZO

Zl-Bll(2)

Z2-B22 (2)

Z3-C11(1)

Z4-C22 (1)

CALL Cmua ( Zl , Z2 , Z3 , Z4 , Z9 , ZO

)

Zl-All (1)

Z2-A22 (1)

Z3-Z9

Z4-Z0

CALL Csua(Zl , Z2 , Z3 , Z4 , Z9 , ZO)

Zl-Mr

Z2-Mi

Z3-Z9

Z4-Z0

CALL Cdia(Zl , Z2 , Z3 , Z4 , Z9 , ZO)

Mr-Z9

Mi-ZO

Zl-Sllr

Z2-S1H

Z3-S22r

Z4-S22i

CALL Cmua ( Zl , Z2 , Z3 , Z4 , Z9 , ZO

)

Z1-Z9

Z2-Z0

Z3-Mr

Z4-Mi

CALL Cada(Zl , Z2 , Z3 , Z4 , Z9 , ZO)

Z1-Z9

Z2-Z0

CALL Csqra(Zl , Z2 , Z9 , ZO)

S12r-Z9

S121-Z0

S 1 2m-SQR ( Z9

A 2+ZO A 2

)

S12a—ATN(S12i/Sl2r)*180/PI

PRINT "S12m,S12a,S12r,S12i"

PRINT S12m,Sl2a,S12r,Sl2i

! *******************************•***•**•***** Alpha 210-|S21| A 2/(l- |S22| A 2)

Alpha 120- 1 S 2 1

A 2/ ( 1

-

1 S 11

A 2

)

Al20-S12mA 2/(l-SllmA 2)

A210-S12mA 2/(l-S22mA 2)

Dbl20-10*LGT (A120)

Db210-10*LGT(A210)

176
8630

8640

8650

8660

8670

8680

8690

8691

8700

8701

8702

8710

8720

8730

8740

8750

8760

8770

8780

8790

8791

8800

8810

8820

8830

8840

8850

8860

8870

8880

8900

8920

8921

8930

8940

8950

8960

8970

8980

8990

9000

9010

9020

9030

9040

9050

9060

9070

PRINTER IS 16

PRINT

! PRINT "S12m, Sl2a, S12r, Sl2i"

PRINTER IS 0

FIXED 0

PRINT

PRINT "REFLECTION COEFFICIENTS FOR ADAPTER ON 6 -PORT

#"; Sport

FIXED 2 PRINT

PRINT "FREQUENCY: Freqs (P) ; "GHZ"

PRINT

PRINT "Sll MAGNITUDE Sll ANGLE Sll

REAL Sll IMAGINARY"

PRINT "

FIXED 4

PRINT Sllm.Slla.Sllr.Slli

PRINT

PRINT "S22 MAGNITUDE S22 ANGLE S22 REAL

S22 IMAGINARY"

PRINT "

PRINT S22m,S22a,S22r,S22i

PRINT

PRINT

FIXED 0

PRINT "LOSS DATA FOR ADAPTOR AN SIX- PORT" ; Sport

PRINT "Alpha 12 LOSS DB Alpha21

10SS DB"

PRINT "

FIXED 4

! PRINT S12m,S12a,S12r,S12i

PRINT A120 , ABS (Dbl20) , A210 , ABS (Db210)

K-0

PRINT

NORMAL

IF Sport-2 THEN K-17

IF Sport-1 THEN K-0

S (P , K+l)—Slim

S (P ,K+2)—Slla

S(P,K+3)-Sllr

S(P,K+4)-Slli

S (P ,K+5)—A120

S(P,K+6)-S22m

S(P,K+7)-S22a

S(P,K+8)-S22r

S(P,K+9)-S22i

S(P,K+10)—A210

S (P ,K+ll)-S12m

S(P,K+12)-S21m

i ***********-*r*r^*********************-

PRINTER IS 16

! THE FOLLOWING CODE EXISTS TO CALCULATE EFFICIENCY OF

177
9080

9090

9100

9110

9111

9120

9130

9131

9132

9133

9140

9150

9160

9210

9220

9230

9240

9250

9260

9270

9280

9290

9300

9310

9320

9330

9340

9350

9360

9370

9380

9390

9400

9410

9420

9430

9440

9450

9460

9470

9480

9490

9500

9510

9520

9530

9540

9550

9560

9570

9580

9590

9600

9610

ADAPTER AND DUT

!

!

! Gl-Sll+(S12*S21*Gx)/(l-S22*Gx)

!ON Sport GOTO 9120,9132

R—Gxm( Sport) -Ml

T-Gxa( Sport) -PI

GOTO 9140

R—Gxm( Sport) -M2

T-Gxa( Sport )-P2

CALL Cpra(R,T,X,Y)

Gxr(Sport)-X

Gxi(Sport)-Y

Zl-Z3-S12r

Z2-Z4-S12i

CALL Cmua(Zl,Z2 I Z3,Z4,Z9,Z0)

Z1-Z9

Z2-Z0

Z3-Gxrl

Z4-Gxil

CALL Cmua ( Z1 , Z2 , Z3 , Z4 , Z9 , ZO

)

Nur-Z9

Nui-ZO

PRINT Nur ,Nui , Z9 , ZO

Zl«S22r

Z2-S22i

Z3-Gxm( Sport)

Z4-0

CALL Cmua ( Z1 , Z2 , Z3 , Z4 , Z9 , ZO

)

PRINT "S22GX"

PRINT Z9 , ZO

Zl-1

Z2-0

Z3-Z9

Z4-Z0

CALL Csua(Zl , Z2 , Z3 , Z4 , Z9 , ZO)

PRINT " 1-S22GX" ,Z9 ,Z0

Zl-Nur

Z2—Nui

Z3-Z9

Z4-Z0

Magl-SQR ( Z9 A 2+ZO A 2

)

A 2

CALL Cdia(Zl , Z2 , Z3 , Z4 , Z9 , ZO)

Zl-Sllr

Z2-S1H

PRINT "S11R, SHI" ,Sllr,Slli

PRINT Sllr.Slli

Z3-Z9

Z4-Z0

CALL Cada(Zl , Z2 , Z3 , Z4 , Z9 , ZO)

Glr-Z9

Gli-ZO

j

178
9620 ! 9630 ! Alphal2- [(l-|Gx| A 2)*|S12| A 2]/[(l-|Gl| A 2*| l-S22Gx

|

A 2

]

9631 ! l-Gxm(l) A 2*S12mA 2/(l-GlmA 2 9640 ! 9660 Magn- (1-Gxm( Sport) A 2)*S12mA 2 9670 Glm-SQR(Glr A 2+Gli A 2)

A 2 9680 X-Glr

9690 Y-Gli

9700 CALL Crpa(X, Y,R,T)

9710 Gla-T

9720 Magd- ( 1 - Glm) *Magl

9730 Alphal2-Magn/Magd

9740 Al2-Alphal2

9750 PRINTER IS 16

9760 PRINT "Glm.Gla, Glr.Gli"

9770 PRINT SQR(Glm) ,Gla, Glr.Gli

9780 PRINT "Gxm , Gxa, Gxr, Gxi"

9790 PRINT Gxm(Sport) .Gxa(Sport) .Gxr(Sport) .Gxi(Sport)

9801 PRINTER IS 0

9805 PRINT "EFFICIENCY OF ADAPTER AND DEVICE COMBINATION ;A12

9806 PRINT

9807 PRINT

9808 PRINTER IS 16

9810 IF Sport-1 THEN GOTO 9830

9820 GOTO 9900

9830 S (P , K+13)-Gxm(Sport)

9840 S (P ,K+14)-Gxa( Sport)

9850 S (P , K+l 5) -Gxi (Sport)

9860 S (P.K+16)—Gxr (Sport)

9861 S(P,K+17)-A12

9890 GOTO 9940

9900 S (P , K+l 3) -Gxm (Sport)

9910 S(P,K+14)-Gxa(Sport)

9920 S(P,K+15)-Gxi(Sport)

9930 S(P,K+16)-Gxr (Sport)

9931 S(P,K+17)-A12

9940 Sport-Sport+1

9950 IF Sport-2 THEN GOTO 6790

9951 PRINT PAGE

9952 Sport-1

9955 NEXT P

9960 GOTO 9980

9970 PRINTER IS 16

9980 MASS STORAGE IS ":F8,1"

9990 FOR 1-1 TO 20

10000 NORMAL

10010 FIXED 0

10020 ASSIGN #1 TO "AD- "6cVAL$ (I) , Check

10021 ASSIGN #1 TO * 10030 IF Check THEN Q$-VAL$(I)

10040 IF Check THEN 10060

10050 NEXT I 10060 CREATE "AD- "&Q$ , 2*Nfreqs

10070 ASSIGN #1 TO "AD-"&Q$

10080 PRINT #1 ; S (*)

179
10090

10110

ASSIGN #1 TO * RETURN 0

FNAdp(

All ( 6990

8230

7220 7410 7610 7680 7870 8110

A12 9740 9805 9861 9931

A120 8590 8610 8860 8970

A210 8600 8620 8860 9020

A22 ( 7000

8240

7220 7420 7620 7690 7880 8120

A8 6910 6990 7200

A9 6920 7000 7200

Alphal2 9730 9740

Bll ( 7010 7220 7290 7310 7800 8080 8180

B22 ( 7020 7220 7300 7320 7810 8090 8190

B8 6930 7010 7200

B9 6940 7020 7200

Cll( 7030

8200

7220 7360 7630 7700 7820 8060

C22 ( 040

8210

7220 7370 7640 7710 7830 8070

C8 6950 7030 7200

C9 6960 7040 7200

Ca$ 6470

Check 10020 10030 10040

Cnnct$ 6640

Date$ 6640

Dbl20 8610 8860

Db210 8620 8860

Freqs

(

6510 6640 7070 8701

180
Gla 9710 9770

Gli 9590 9670 9690 9770

Glm 9670 9720 9770

Glr 9580 9670 9680 9770

Gxa( 9130 9133 9790 9840 9910

Gxi ( 9160 9790 9850 9920

Gxil 9270

Gxm( 9120 9132 9340 9660 9790 9830 9900

Gxr ( 9150 9790 9860 9930

Gxrl 9260

I 9990 10020 10030 10050

Id_content$ 6510 6640

K 6521 8870 8920 8921 8930 8940 8950

8960 8970 8980 8990 9000 9010 9020

9030 9040 9830 9840 9850 9860 9861

9900 9910 9920 9930 9931

Ml 6470 9120

M2 6470 9132

Magi 9490 9720

Magd 9720 9730

Magn 9660 9730

Me 6880

6960

6900 6910 6920 6930 6940 6950

Mi 7670 7740 7790 7930 8170 8290 8340

8430

Mr 7660 7730 7780 7920 8160 8280 8330

8420

Msu$ 6500 6640

N 6680

N1 6750 6750

181
Nl$ 6620 6640 6730 6820

N2 6760 6760

N2$ 6630 6730 6850

Nfreq 6680 6830

Nfreqs 6470 6510 6510 6510 6640 6680 6780

682t) 6850 10060

Ni 7350 7450

Nr 7340 7440

Nui 9300 9310 9460

Nur 9290 9310 9450

0 10110

P 6780 6910 6920 6930 6940 6950 6960

7070 8701 8930 8940 8950 8960 8970

8980 8990 9000 9010 9020 9030 9040

9830 9840 9850 9860 9861 9900 9910

9920 9930 9931 9955

PI 6470 9130

P2 6470 9133

Prt 6790 6810 6990 7000 7010 7020 7030

7040 7050 7220 7220 7220 7220 7220

7220 7240

</> O' 0 10030 10030 10060 10070

R 7530 7550 7990 8000 9120 9132 9140

9700

Repeats 6470 6640

Result

(

6510 6820 6850 6910 6920 6930 6940

6950 6960

S( 6510 8930 8940 8950 8960 8970 8980

8990 9000 9010 9020 9030 9040 9830

9840 9850 9860 9861 9900 9910 9920

9930 9931 10080

Slla 7560 8740 8940

Slli 7500 8360 8740 8960 9520 9530 9540

Slim 7550 8590 8740 8930

182
Sllr 7490 8350 8740 8950 9510 9530 9540

S12a 8510 8530

S12i 8490 8510 8530 9220

S12m 8500 8530 8590 8600 9030 9660

Sl2r 8480 8510 8530 9210

S21m 9040

S22a 8010 8780 8990

S22i 7960 8380 8780 9010 9330

S22m 8000 8600 8780 8980

S22r 7950 8370 8780 9000 9320

Sp 6640

Sport 6710 6870 7090 8690 8810 8920 8921

9111 9120 9130 9132 9133 9150 9160

9340 9660 9790 9790 9790 9790 9810

9830 9840 9850 9860 9900 9910 9920

9930 9940 9940 9950 9952

Std mnt 6640

T 7530 7560 7990 8010 9130 9133 9140

9700 9710

Time$ 6640

Typ$ 6640

X 7510 7530 7970 7990 9140 9150 9680

9700

Y 7520 7530 7980 7990 9140 9160 9690

9700

ZO 7330 7350 7380 7400 7430 7470 7480

7500 7520 7650 7670 7720 7760 7770

7790 7840 7860 7890 7910 7940 7960

7980 8100 8140 8150 8170 8220 8260

8270 8310 8320 8340 8390 8410 8440

8460 8470 8490 8500 9230 9250 9280

9300 9310 9360 9380 9420 9430 9440

9480 9490 9500 9560 9570 9590

Z1 7290 7330 7380 7410 7430 7440 7480

7610 7650 7680 7720 7730 7770 7800

183
7840 7870 7890 7920 7940 8080 8100

8110 8150 8180 8220 8230 8270 8280

8320 8350 8390 8400 8440 8450 8470

9210 9230 9240 9280 9320 9360 9390

9430 9450 9500 9510 9570

7300 7330 7380 7420 7430 7450 7480

7620 7650 7690 7720 7740 7770 7810

7840 7880 7890 7930 7940 8090 8100

8120 8150 8190 8220 8240 8270 8290

8320 8360 8390 8410 8440 8460 8470

9220 9230 9250 9280 9330 9360 9400

9430 9460 9500 9520 9570

7310 7330 7360 7380 7390 7430 7460

7480 7630 7650 7700 7720 7750 7770

7820 7840 7850 7890 7900 7940 8060

8100 8130 8150 8200 8220 8250 8270

8300 8320 8370 8390 8420 8440 9210

9230 9260 9280 9340 9360 9410 9430

9470 9500 9550 9570

7320 7330 7370 7380 7400 7430 7470

7480 7640 7650 7710 7720 7760 7770

7830 7840 7860 7890 7910 7940 8070

8100 8140 8150 8210 8220 8260 8270

8310 8320 8380 8390 8430 8440 9220

9230 9270 9280 9350 9360 9420 9430

9480 9500 9560 9570

7330 7340 7380 7390 7430 7460 7480

7490 7510 7650 7660 7720 7750 7770

7780 7840 7850 7890 7900 7940 7950

7970 8100 8130 8150 8160 8220 8250

8270 8300 8320 8330 8390 8400 8440

8450 8470 8480 8500 9230 9240 9280

9290 9310 9360 9380 9410 9430 9440

9470 9490 9500 9550 9570 9580

184
10120 SUB Cmua(Zl , Z2 , Z3 , Z4 , Z9 , Z0)

10130 Z9-Z1*Z3-Z2*Z4

10140 Z0-Z1*Z4+Z2*Z3

10150 SUBEXIT

10160 SUBEND

S Cmua(

zo 10120 10140

Zl 10120 10130 10140

Z2 10120 10130 10140

Z3 10120 10130 10140

Z4 10120 10130 10140

Z9 10120 10130

185
10170 SUB Cdia(Zl , Z2 , Z3 , Z4 , Z9 , Z0)

10180 Z6-Z3*Z3+Z4*Z4

10190 Z9-(Z1*Z3+Z2*Z4)/Z6

10200 Z0-(Z2*Z3-Z1*Z4)/Z6

10210 SUBEXIT

10220 SUBEND

S Cdia(

zo 10170 10200

Z1 10170 10190 10200

Z2 10170 10190 10200

Z3 10170 10180 10180 10190 10200

Z4 10170 10180 10180 10190 10200

Z6 10180 10190 10200

Z9 10170 10190

186
10230 SUB Cinva(Zl , Z2 , Z9 , Z0)

10240 Z6-Z1*Z1+Z2*Z2

10250 Z9-Z1/Z6

10260 Z0--Z2/Z6

10270 SUBEXIT

10280 SUBEND

S Cinva(

zo 10230 10260

Z1 10230 10240 10240 10250

Z2 10230 10240 10240 10260

Z6 10240 10250 10260

Z9 10230 10250

187
10290 SUB Csqa(Zl,Z2,Z9,Z0)

10300 Z9—Z1*Z1 - Z2*Z2

10310 Z0«2*Z1*Z2

10320 SUBEXIT

10330 SUBEND

S Csqa(

zo 10290 10310

Z1 10290 10300 10300 10310

Z2 10290 10300 10300 10310

Z9 10290 10300

188
10340 SUB Cada(Zl ,22,23,24,29,20)

10350 Z9-Z1+Z3

10360 Z0-Z2+Z4

10370 SUBEXIT

10380 SUBEND

S Cada(

zo 10340 10360

Z1 10340 10350

Z2 10340 10360

Z3 10340 10350

Z4 10340 10360

Z9 10340 10350

189
10390 SUB Csua(Zl , Z2 , Z3 , Z4 , Z9 , Z0)

10400 Z9-Z1-Z3

10410 Z0-Z2-Z4

10420 SUBEXIT

10430 SUBEND

S Csua(

ZO 10390 10410

Z1 10390 10400

Z2 10390 10410

Z3 10390 10400

Z4 10390 10410

Z9 10390 10400

190
10440 SUB Caba(Zl,Z2,Z9)

10450 Z9-SQR(Z1*Z1+Z2*Z2)

10460 SUBEXIT

10470 SUBEND

S Caba(

Z1 10440 10450 10450

Z2 10440 10450 10450

Z9 10440 10450

191
10480 SUB Csqra(Zl,Z2,Z9,ZO)

10490 X-Zl

10500 Y-Z2

10510 CALL Crpa(X,Y,R,T)

10520 R-SQR(R)

10530 T-T/2

10540 Z9—R*COS (PI*T/180)

10550 Z0-R*SIN(PI*T/180)

10560 GOTO 10570

10570 SUBEXIT

10580 SUBEND

S Csqra(

R 10510 10520 10520 10540 10550

T 10510 10530 10530 10540 10550

X 10490 10510

Y 10500 10510

ZO 10480 10550

Z1 10480 10490

Z2 10480 10500

Z9 10480 10540

192
10590 SUB Crpa(X,Y,R,T)

10600 R-SQR(X*X+Y*Y)

10610 IF X-0 THEN GOTO 10640

10620 T-ATN(Y/X)

10630 GOTO 10650

10640 T-PI*SGN(Y)/2

10650 T-T*180/PI

10660 IF X>-0 THEN 10710

10670 IF Y>—0 THEN 10700

10680 T-T-180

10690 GOTO 10710

10700 T-T+180

10710 SUBEXIT

10720 SUBEND

S Crpa(

R 10590 10600

T 10590

10700

10620

10700

10640 10650 10650 10680 10680

X 10590 10600 10600 10610 10620 10660

Y 10590 10600 10600 10620 10640 10670

193
10730 SUB Cmuada ( Z1 , Z2 , Z3 , Z4 , Z5 , Z6 , Z7 , Z8 , Z9 , Z0

)

10740 Z9-Z1*Z3-Z2*Z4+Z5*Z7-Z6*Z8

10750 Z0-Z1*Z4+Z2*Z3+Z5*Z8+Z6*Z7

10760 SUBEXIT

10770 SUBEND

S Cmuada

(

zo 10730 10750

Z1 10730 10740 10750

Z2 10730 10740 10750

Z3 10730 10740 10750

Z4 10730 10740 10750

Z5 10730 10740 10750

Z6 10730 10740 10750

Z7 10730 10740 10750

Z8 10730 10740 10750

Z9 10730 10740

t

194
10780 SUB Cpra(R, T ,X, Y)

10790 X-R*COS(PI*T/180)

10800 Y-R*SIN(PI*T/180)

10810 SUBEXIT

10820 SUBEND

S Cpra(

R 10780 10790 10800

T 10780 10790 10800

X 10780 10790

Y 10780 10800

195
10830 SUB Doc

10840 LINPUT "Today'S Date- -AS 850729" , Doda$

10850 PRINTER IS 0

10860 PRINT PAGE

10870 PRINT "CHANGES LISTED ARE AS OF ";Doda$

10880 PRINT "CHANGE 1. RENAMED TO TST1- FINAL NAME TO BE ADPTR5"

10890 PRINT "CHANGE 2. CHANGED DATE IN FNDtgs$ FROM 84 TO 85"

10900 PRINT "CHANGE 3. RENAMED SUB Pset TO SUB psetdeL (LINE 3456)"

10910 PRINT "CHANGE 4. CHANGED SUB Synth TO CALL SUB Synth_900

(LINES 2830 TO"

10920 PRINT " 2931)."

10930 PRINT "CHANGE 5. INSERTED SUB Synth_900 AT LINE 8000 AND SUB"

10940 PRINT " Pset AT 8140 AND SUB Genlevel AT 8480"

10950 PRINT "CHANGE 6. ADDED Cal=l AT LINE 31"

10960 PRINT "CHANGE 7. ENTER INPUT STATEMENT FOR Nfreqs

WHEN ADAPTR CALC ONLY IS

10970 PRINT

10980 PRINT

10990 PRINT

11000 PRINT

11010 PRINT

11020 PRINT

11030 PRINT

11040 PRINT

11050 PRINT

11060 PRINT

11070 PRINT

"CHANGE 8. CHANGED Typ LOGIC TO INCLUDE TYP>5 AT

LINE 75"

"CHANGE 9. CHANGE Typ LOGIC AT LINE 76"

"CHANGE 10. CHANGED OR ADDED LOGIC IN STATEMENTS

78-79"

"CHANGE 11. CHANGED OR ADDED Typ LOGIC IN LINES

115-116"

"CHANGE 12. CHANGED OR ADDED LOGIC LINES 119 AND

121 " "CHANGE 13. ADDED STATEMENT 164 AND 180"

"CHANGE 14. CHANGED OR ADDED STATEMENTS AT LINES 224,

225,226,235,"

" 236,237,238, AND 239"

"CHANGE 15. CHANGED FORMAT LINE 261"

"CHANGE 16. ADDED LINE 275

"CHANGE 17. ADDED VARIABLE Proc TO CALLING STATEMENT

IN LINES

11080 PRINT

11090 PRINT

11100 PRINT

11110 PRINT

11120 PRINT

11130 PRINT

11140 PRINT

11150 PRINT

11160 PRINT

"CHANGE 18.

"CHANGE 19.

"CHANGE 20.

"CHANGE 21.

"CHANGE 22.

"CHANGE 23.

"CHANGE 24.

"CHANGE 25.

CALLS "

282, 315, AND 333."

ADDED OR CHANGED LOGIC IN LINES 367-371."

CHANGED FORMAT STATEMENT IN LINE 465/"

ADDED Cal TO SUB Caldat IN LINE 1077"

DEFINED Cal$ IN LINE 1093"

ADDED OR CHANGED LOGIC IN LINES 1265-1272."

ADDED(&)Ca$ TO STRING IN LINES 1299 AND 1302"

ADDED(&)Ca$ TO STRING IN LINES 1323 AND 1326"

ADDED Cal TO SUB Calres CALL AND SUB Caldat

11170 PRINT " IN LINES 168, 171, 1077, AND 3612"

11180 PRINT "CHANGE 26. DIMENSIONED MATRIX Rd(Nfreqs , 2 , 12) IN LINE

11190 PRINT

11200 PRINT

11210 PRINT

11220 PRINT

11230 PRINT

11240 PRINT

" 3624"

"CHANGE 27. CHANGED VARIABLE LIST IN SUB Coeff- -ADDED

Cal AND Rd(*) "

" -DELETED Omitf(*) IN LINES 3727 AND 3795 " "CHANGE 28. ADDED LINPUT STATEMENT AT LINE 3625."

"CHANGE 29. ADDED &Ca$ TO FILE NAMES IN LINES 3639

AND 3640"

"CHANGE 30. ADDED LINES 3643 AND 3644."

196
11250 PRINT "CHANGE 31. ADDED DO LOOP FROM 3648 TO 3658."

11260 PRINT "CHANGE 32. ADDED LINES 3767 AND 3772."

11270 PRINT "CHANGE 33. ADDED ADAPTER CALC SUB PRORAM FNAdpt AT

LINE 9000."

11280 SUBEXIT

11290 SUBEND

S Doc

Doda$ 10840 10870

197
11300 SUB Gamma (Nfreqs .Repeats , Ca$)

11310 OPTION BASE 1

11320 DIM Power (Nfreqs .Repeats , 16 , 10) , Po(l , 8) ,Result(Nfreqs , 60)

,

Wrspt(2 , 12)

11330 FREAD "1PRD"&"3"&" :F8,1" .Power (*)

11331 MASS STORAGE IS F8,l"

11332 PRINTER IS 0

11333 PRINT PAGE

11340 G—

11350 PRINTER IS 16

11360 File$-"CRST"6c"2"

11370 FOR F-l TO Nfreqs

11380 CALL Redwrt(File$ , " : F8 , 1" , "

" ,Result(*) .Nfreqs)

11390 FOR J-l TO 2

11400 FOR N«1 TO 12

11410 PRINTER IS 0

11420 Wrspt(J , N) -Result (F,N+(J-1)*12)

11430 NEXT N

11440 NEXT J

11450 ! FOR 1-1 TO 2 11460 ! Incr-(I-2)*5

11470 ! Inc- (1-2) *4

11480 FOR Mnt-1 TO 8

11490 Po(l ,Mnt+Inc)-Power(F, 1 , 1 ,Mnt+Incr)

11500 NEXT Mnt

11510 ! NEXT I 11520 CALL Mg(Po(*) , 1 , 1 , Wrspt (*) , "P" ,M1 , PI ,R1)

11530 CALL Mg(Po(*) ,1,2 , Wrspt (*) , "P" ,M2 , P2 ,R2)

11540 PRINTER IS 0

11550 PRINT "FREQ #",F

11552 PRINT

11554 PRINT "DEVICE PLUS ADAPTER ON 6 -PORT 1"

11555 PRINT

11560 PRINT "GAMMA MAGNITUDE" , "GAMMA PHASE"

11561 PRINT " " 11562 PRINT USING 11585 ;M1, PI

11563 PRINT

11564 PRINT "DEVICE PLUS ADAPTER ON 6 -PORT 2"

11565 PRINT

11567 PRINT "GAMMA MAGNITUDE" , "GAMMA PHASE"

11568 PRINT " "," " 11570 PRINT USING 11585 ;M2,P2

11585 IMAGE MD . DDDDD , 12X.MDDD . DDDD

11590 NEXT F

11591 NORMAL

11592 PRINT

11593 PRINT

11594 PRINT

11595 PRINTER IS 16

11600 Q-FNAdp (Nfreqs , Repeats , Ml , PI , M2 , P2 , Ca$

)

11610 SUBEXIT

11620 SUBEND

S Gamma

(

198
Ca$ 11300 11600

F 11370 11420 11490 11550 11590

File$ 11360 11380

G 11340

Inc 11490

Incr 11490

J 11390 11420 11420 11440

Ml 11520 11562 11600

M2 11530 11570 11600

Mnt 11480 11490 11490 11500

N 11400 11420 11420 11430

Nfreqs 11300 11320 11320 11370 11380 11600

PI 11520 11562 11600

P2 11530 11570 11600

Po( 11320 11490 11520 11530

Power

(

11320 11330 11490

Q 11600

R1 11520

R2 11530

Repeats 11300 11320 11600

Result

(

11320 11380 11420

Wrspt

(

11320 11420 11520 11530

199
GLOBAL NAMES

FNAdp( 6470 274 11600

FNDerr( 4788 4563 4629 4677 4776

FNDtg$ 3129 1257

FNNumd( 3216

FNNumi( 3183 69 126 153 363 378 819

FNYorn 3153 178 219 456 696 795 852

1290 2139 2916 3771 4797

S Aline

(

480 423

S Avg( 3351 3969

S Caba( 10440

S Cada( 10340 8440 9570

S Cadd( 6183 5541 5553 5559 5628 5634 5835

5877 5943

S Caldat( 1077 168 272

S Calib( 4878 3837

S Calres( 3612 171

S Cdia( 10170 7480 7940 8320 9500

S Cdiv( 6231 5523 5526 5544 5547 5562 5586

5595 5601 5619 5637 5688 6105

S Cinva( 10230

S Cmpy( 6213 5331 5343 5421 5496 5502 5505

5514 5529 5550 5556 5574 5580 5589

5610 5631 5643 5652 5655 5691 5694

6030 6099 6345 6411

S Cmua( 10120 7380 7650 7720 7840 8100 8220

8390 9230 9280 9360

S Cmuada( 10730

S Coeff

(

3795 3727

S Cpra( 10780 9140

200
S Cpwr 6318

(

S Crpa( 10590 7530 7990 9700 10510

S Csqa( 10290

S Csqra( 10480 8470

S Csua( 10390 7330 7430 7770 7890 8150 8270

9430

S Csub( 6198 4353 5334 5337 5340 5346 5424

5499 5508 5511 5517 5520 5532 5577

5583 5592 5598 5613 5616 5820 5898

5913 5925 6096 6102 6348 6414

S Dac ( 3096 3441

S Disc copy( 4404 224

S Disc trans( 4440

S Doc 10830

S Dvms

(

2421 2280 2535 2556

S F_limt( 990 654 780

S F_step( 633 435

S F_type

(

711 444

S Fase shft( 3057 1698 1766 1896

S Fdata( 1575 1095

S Filter( 2940 3435

S Fparab( 5088 4905

S Freq

(

333 315

S Freqin( 282 83

S Gamma( 11300 80 239 273

S I dent

(

6249 5487 5493 5697 5700 5715 6123

6126 6216 6234 6429

RRS Iparab( 4971 4899

S Measre( 1632 1116 1131 1149

S Mg( 6159 11520 11530

201
S Mpwr( 6336 6321

S Msoln( 6054 5040 5217 6036

S Mtpt( 6372

S Order

(

3264 777 1590 1593

S Path( 867 426

S Pcalc( 2628 1890

S Polar( 6276 4863 5418 5427 5436 5565 5622

5646 6108 6129 6135 6171 6363 6417

6435 6438

S Pratio( 5319 4950

S Preads( 2493 1842 1854 1863

S Print

(

4020 3945 3987

S Prnt_sdev( 4194 3990

S Prtpwr( 1356 1293

S Pset( 3456 3438

S Pwrmnt

(

0 1845

S Rect( 6297 4350 5685 6426

S Redhed( 4575 3641 3646 4419 4452 6640

S Redwrt( 4689 3647 3765 4422 4428 4455 4464

6820 6850 11380

S Rfout( 3390 1722 1869 1875 1881

S Rho2pt( 4326 3891 3906

S Rhothu( 4287 3873

S Rtpt( 5985 5415 5484 5490 6408

S Rvgs

(

2238 1728 1731

S Stds2

(

5373 4947

S Synth 2826 3444

S T_disc( 4821 3666

S Trl5( 5445 4944

202
S W( 5709 4302 4344 4924 6165 6342 6381

s Wg( 6093 4305 4347 5382 5385

5406 6138 6141 6168 6357

S Wq( 6117 4158

S Wrp( 4851

S Wrtbin( 4641 1280

S Wrthed( 4494 1279 3764 4425 4461

5388

6393

5391

203
NBS-1 14A (REV. 2-8C) U.S. DEPT. OF COMM.

BIBLIOGRAPHIC DATA

1 . PUBLICATION OR

REPORT NO.

2. Performing Organ. Report No. 3. Publ ication Date

SHEET (See instructions) L NBS I R 88-3096 < July 1988 4.

TITLE AND SUBTITLE

Measurement of Adapter Loss, Mismatch, and Efficiency Using the

Dual Six-port

5. AUTHOR(S)

feorge J. Counas and Bill C. Yates

6. PERFORMING ORGANIZATION (If joint or other than NBS, see instructions) 7. Contract/Grant No. NATIONAL BUREAU OF STANDARDS

DEPARTMENT OF COMMERCE 8. Type of Report & Period Covered

WASHINGTON, D.C. 20234

9.

SPONSORING ORGANIZATION NAME AND COMPLETE ADDRESS (Street. City. Slate, ZIP)

Metrology Engineering Section

Newark Air Force Station, Ohio 43057

10.

SUPPLEMENTARY NOTES

TJ Document describes a computer program; SF-185, FIPS Software Summary, is attached.

11.

ABSTRACT (A 200-word or less factual summary of most significant information. If document includes a significant

bibliography or literature survey, mention it here)

A noise measurement system is being developed for the U.S. Air Force which uses coaxial cryogenic and ambient noise temperature standards to determine the

noise temperature of the device under test. When the device under test has

a different connector than those on the noise standards, an adapter has to

be used. Adapter loss and complex reflection coefficient must be compensated

for or noise measurement accuracy is affected. A technique has been developed

which uses a dual six-port measurement system to determine the mismatch,

loss, and ultimately the efficiency of the adapter used. This enables

correction of measurement results and allows measurements to be made with

an adapter with no degradation of accuracy.

This report describes this method of evaluating adapters and provides

instructions for its use.

12.

KEY WORDS (Six to twelve entries; alphabetical order; capitalize only proper names; and separate key words by semicolons)

adapter parameters, dual six-port measurement system, efficiency, loss,

measurement technique, mismatch

13.

AVAILABILITY

QQ Unlimited

| | For Official Distribution. Do Not Release to NTIS

| | Order From Superintendent of Documents, U.S. Government Printing Office, Washington, D.C.

20402.

[Xj Order From National Technical Information Service (NTIS). Soringfield, VA. 22161

* U. S. GOVERNMENT PRINTING OFFICE: 1988 - 576195 / 85194

14. NO. OF

PRINTED PAGES

208

15. Price

U S COMM-D C 6O43-P80