Create New Cal Kit using SCPI


When creating new cal kits programmatically, the order in which cal kit commands are sent can be important.

For example to create a kit with opens, shorts, loads, and thrus. Be sure to use the following sequence for each newly defined standard.

  1. Programmatically select the standard number

  2. Programmatically select the standard type.  

  3. Program the cal standard's values.

  4. Repeat steps 1, 2, 3 for additional new standards being defined.

 

 

10   !

20   !

30   ! This example program demonstrates how to create

40   ! new PNA calibration kits.

50   !

60   ! 1) Select a kit not previously defined

70   ! 2) Define open, short, load, and thru cal standards

80   !    Note:  Each of the newly defined standards is assigned

90   !    a default connector name.  These default connector names

100  !    will be replaced in subsequent steps.

110  ! 3) Use the delete connector command to remove default

120  !    connector names.

130  ! 4) Add connectors.  Specify:

140  !      Start and Stop Freq

150  !      Z - Impedance

160  !      sex - MALE, FEMALE, NONE

170  !      media - COAX, WAVE

180  !      cutoff - Frequency for waveguide

190  ! 5) Assign the appropriate connector to each standard

200  ! 6) Modify the class assignments for the standards defined

210  ! 7) Verify the kit values

220  !

230  ! Additional Note:  After setting each new cal kit value, it is

240  ! recommended that the program periodically perform queries to

250  ! verify the new values.

260  !

270  ! This will prevent program synchronization issues that can affect

280  ! final values stored within new cal kits.

290  !

300  !------------------------------------------------------------

310  !

320  ! Set up I/O path

330   ASSIGN @Na TO 716

340   DIM Calkname$[80],Conn$[80]

350   INTEGER Calkitnum

360  !

370   CLEAR SCREEN

380  !

390  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

400  ! Designate the kit selection to be used for performing cal's

410   OUTPUT @Na;":sens:corr:ckit:count?"

420   ENTER @Na;Calkitnum

430   Calkitnum=Calkitnum+1

440   OUTPUT @Na;":sens:corr:coll:ckit "&VAL$(Calkitnum)

450  !

460  ! Name this kit with your own name

470   OUTPUT @Na;":sens:corr:coll:ckit:name ""Special 2.4 mm Model 85056"""

480  !

490  !

500   DISP "Defining kit std 1..."

510  ! Now set up standard #1

520   OUTPUT @Na;":sens:corr:coll:ckit:stan 1"

530   OUTPUT @Na;":sens:corr:coll:ckit:stan:type SHORT"

540   Get_std

550   OUTPUT @Na;":sens:corr:coll:ckit:stan:char coax"

560   OUTPUT @Na;":sens:corr:coll:ckit:stan:label ""My Short"""

570   Get_label

580  !

590   DISP "Defining kit std 2..."

600  ! Now set up standard #2

610   OUTPUT @Na;":sens:corr:coll:ckit:stan 2"

620   OUTPUT @Na;":sens:corr:coll:ckit:stan:type OPEN"

630   Get_std

640   OUTPUT @Na;":sens:corr:coll:ckit:stan:char coax"

650   OUTPUT @Na;":sens:corr:coll:ckit:stan:label ""My Open"""

660   Get_label

670  !

680   DISP "Defining kit std 3..."

690  ! Now set up standard #3

700   OUTPUT @Na;":sens:corr:coll:ckit:stan 3"

710   OUTPUT @Na;":sens:corr:coll:ckit:stan:type LOAD"

720   Get_std

730   OUTPUT @Na;":sens:corr:coll:ckit:stan:char coax"

740   OUTPUT @Na;":sens:corr:coll:ckit:stan:label ""My Fixed Load"""

750   Get_label

760  !

770   DISP "Defining kit std 4..."

780  ! Now set up standard #4

790   OUTPUT @Na;":sens:corr:coll:ckit:stan 4"

800   OUTPUT @Na;":sens:corr:coll:ckit:stan:type THRU"

810   Get_std

820   OUTPUT @Na;":sens:corr:coll:ckit:stan:char coax"

830   OUTPUT @Na;":sens:corr:coll:ckit:stan:label ""My Thru"""

840   Get_label

850  !

860   DISP "Defining kit std 5..."

870  ! Now set up standard #5

880   OUTPUT @Na;":sens:corr:coll:ckit:stan 5"

890   OUTPUT @Na;":sens:corr:coll:ckit:stan:type SLOAD"

900   Get_std

910   OUTPUT @Na;":sens:corr:coll:ckit:stan:char coax"

920   OUTPUT @Na;":sens:corr:coll:ckit:stan:label ""Sliding Load"""

930   Get_label

940  !

950   DISP "Defining kit std 6..."

960  ! Now set up standard #6

970  !

980   OUTPUT @Na;":sens:corr:coll:ckit:stan 6"

990   OUTPUT @Na;":sens:corr:coll:ckit:stan:type SHORT"

1000  Get_std

1010  OUTPUT @Na;":sens:corr:coll:ckit:stan:char coax"

1020  OUTPUT @Na;":sens:corr:coll:ckit:stan:label ""Short"""

1030  Get_label

1040 !

1050  DISP "Defining kit std 7..."

1060 ! Now set up standard #7

1070  OUTPUT @Na;":sens:corr:coll:ckit:stan 7"

1080  OUTPUT @Na;":sens:corr:coll:ckit:stan:type SHORT"

1090  Get_std

1100  OUTPUT @Na;":sens:corr:coll:ckit:stan:char coax"

1110  OUTPUT @Na;":sens:corr:coll:ckit:stan:label ""Short"""

1120  Get_label

1130 !

1140  DISP "Defining kit std 8..."

1150 ! Now set up standard #8

1160 !

1170  OUTPUT @Na;":sens:corr:coll:ckit:stan 8"

1190  OUTPUT @Na;":sens:corr:coll:ckit:stan:type ARBI"

1200  Get_std

1210  OUTPUT @Na;":sens:corr:coll:ckit:stan:char coax"

1220  OUTPUT @Na;":sens:corr:coll:ckit:stan:TZR 15;"

1230  OUTPUT @Na;":sens:corr:coll:ckit:stan:TZI -9;"

1240  OUTPUT @Na;":sens:corr:coll:ckit:stan:label ""Z Load"""

1250  Get_label

1260 !

1270 !

1280 !

1290 ! First remove any old connector names

1300  OUTPUT @Na;":sens:corr:coll:ckit:conn:del"

1310 ! Verify that no connectors are currently installed

1320  OUTPUT @Na;":sens:corr:coll:ckit:conn:cat?"

1330  ENTER @Na;Conn$

1340  PRINT "Verify empty list: ";Conn$

1350 !

1360 ! Define your new connectors

1370  OUTPUT @Na;":sens:corr:coll:ckit:conn:add ""PSC 2.4"",0HZ,999GHZ,50.0,MALE,COAX,0.0"

1380  OUTPUT @Na;":sens:corr:coll:ckit:conn:add ""PSC 2.4"",0HZ,999GHZ,50.0,FEMALE,COAX,0.0"

1390 !

1400 ! Verify that the new connectors are installed

1410  OUTPUT @Na;":sens:corr:coll:ckit:conn:cat?"

1420  ENTER @Na;Conn$

1430  PRINT "Verify new connectors: ";Conn$

1440  DISP ""

1450 !

1460  DISP "Defining conn std 1..."

1470 ! Now set up standard #1

1480  OUTPUT @Na;":sens:corr:coll:ckit:stan 1"

1490  Verify_std

1500  OUTPUT @Na;":sens:corr:coll:ckit:conn:snam ""PSC 2.4"",FEMALE,1"

1510  Print_connector

1520 !

1530  DISP "Defining conn std 2..."

1540 ! Now set up standard #2

1550  OUTPUT @Na;":sens:corr:coll:ckit:stan 2"

1560  Verify_std

1570  OUTPUT @Na;":sens:corr:coll:ckit:conn:snam ""PSC 2.4"",FEMALE,1"

1580  Print_connector

1590 !

1600  DISP "Defining conn std 3..."

1610 ! Now set up standard #3

1620  OUTPUT @Na;":sens:corr:coll:ckit:stan 3"

1630  Verify_std

1640  OUTPUT @Na;":sens:corr:coll:ckit:conn:snam ""PSC 2.4"",FEMALE,1"

1650  Print_connector

1660 !

1670  DISP "Defining conn std 4..."

1680 ! Now set up standard #4

1690  OUTPUT @Na;":sens:corr:coll:ckit:stan 4"

1700  Verify_std

1710  OUTPUT @Na;":sens:corr:coll:ckit:conn:snam ""PSC 2.4"",FEMALE,1"

1720  OUTPUT @Na;":sens:corr:coll:ckit:conn:snam ""PSC 2.4"",MALE,2"

1730  Print_connector

1740 !

1750  DISP "Defining conn std 5..."

1760 ! Now set up standard #5

1770  OUTPUT @Na;":sens:corr:coll:ckit:stan 5"

1780  OUTPUT @Na;":sens:corr:coll:ckit:stan:label ""Sliding Load"""

1790  Verify_std

1800  OUTPUT @Na;":sens:corr:coll:ckit:conn:snam ""PSC 2.4"",MALE,1"

1810  Print_connector

1820 !

1830  DISP "Defining conn std 6..."

1840 ! Now set up standard #6

1850 !

1860  OUTPUT @Na;":sens:corr:coll:ckit:stan 6"

1870  Verify_std

1880  OUTPUT @Na;":sens:corr:coll:ckit:conn:snam ""PSC 2.4"",MALE,1"

1890  Print_connector

1900 !

1910  DISP "Defining conn std 7..."

1920 ! Now set up standard #7

1930  OUTPUT @Na;":sens:corr:coll:ckit:stan 7"

1940  Verify_std

1950  OUTPUT @Na;":sens:corr:coll:ckit:conn:snam ""PSC 2.4"",MALE,1"

1960  Print_connector

1970 !

1980  DISP "Defining conn std 8..."

1990 ! Now set up standard #8

2000  OUTPUT @Na;":sens:corr:coll:ckit:stan 8"

2010  Verify_std

2020  OUTPUT @Na;":sens:corr:coll:ckit:conn:snam ""PSC 2.4"",MALE,1"

2030  Print_connector

2040 !

2050  DISP "Class assignments..."

2060 !

2070 ! Designate the "order" associated with measuring the standards

2080 !

2090 !    Set Port 1, 1st standard measured to be standard #2

2100  OUTPUT @Na;":sens:corr:coll:ckit:order1 2"

2110 !    Set Port 1, 2nd standard measured to be standard #1

2120  OUTPUT @Na;":sens:corr:coll:ckit:order2 1,6,7"

2130 !    Set Port 1, 3nd standard measured to be standard #3 and #5

2140  OUTPUT @Na;":sens:corr:coll:ckit:order3 3,5"

2150 !    Set Port 1, 4th standard measured to be standard #4

2160  OUTPUT @Na;":sens:corr:coll:ckit:order4 4"

2170 !

2180 !    Set Port 2, 1st standard measured to be standard #2

2190  OUTPUT @Na;":sens:corr:coll:ckit:order5 2"

2200 !    Set Port 2, 2nd standard measured to be standard #1

2210  OUTPUT @Na;":sens:corr:coll:ckit:order6 1,6,7"

2220 !    Set Port 2, 3nd standard measured to be standard #3 and #6

2230  OUTPUT @Na;":sens:corr:coll:ckit:order7 3,5"

2240 !    Set Port 2, 4th standard measured to be standard #4

2250  OUTPUT @Na;":sens:corr:coll:ckit:order8 4"

2260 !

2270 !    Set Port 1, 1st standard

2280  OUTPUT @Na;":sens:corr:coll:ckit:olabel1 ""MyOpen1"""

2290 !    Set Port 1, 2nd standard

2300  OUTPUT @Na;":sens:corr:coll:ckit:olabel2 ""MyShorts1"""

2310 !    Set Port 1, 3nd standard

2320  OUTPUT @Na;":sens:corr:coll:ckit:olabel3 ""MyLoads1"""

2330 !    Set Port 1, 4th standard measured to be standard #4

2340  OUTPUT @Na;":sens:corr:coll:ckit:olabel4 ""MyThru1"""

2350 !

2360 !    Set Port 2, 1st standard

2370  OUTPUT @Na;":sens:corr:coll:ckit:olabel5 ""MyOpen2"""

2380 !    Set Port 2, 2nd standard

2390  OUTPUT @Na;":sens:corr:coll:ckit:olabel6 ""MyShorts2"""

2400 !    Set Port 2, 3nd standard

2410  OUTPUT @Na;":sens:corr:coll:ckit:olabel7 ""MyLoads2"""

2420 !    Set Port 2, 4th standard

2430  OUTPUT @Na;":sens:corr:coll:ckit:olabel8 ""MyThrus2"""

2440 !

2450  BEEP

2460  DISP "Done!"

2470  END

2480  SUB Get_label

2490    OUTPUT 716;":sens:corr:coll:ckit:stan:label?"

2500    ENTER 716;Label$

2510    PRINT Label$

2520  SUBEND

2530 !

2540  SUB Get_std

2550    OUTPUT 716;":sens:corr:coll:ckit:stan:type?"

2560    ENTER 716;Type$

2570    PRINT Type$

2580  SUBEND

2590 !

2600  SUB Print_connector

2610    DIM Nam$[40]

2620    OUTPUT 716;":sens:corr:coll:ckit:conn:sname?"

2630    ENTER 716;Nam$

2640    PRINT Nam$

2650  SUBEND

2660 !

2670  SUB Verify_std

2680    OUTPUT 716;":sens:corr:coll:ckit:stan:label?"

2690    ENTER 716;Label$

2700  SUBEND

2710 !