Guided Calibration

The following C# example program performs a 1-port cal:

  //

  // Performs a 1-port guided cal on the specified port with the specified connector

  // for that port and kit for that port.

  //  

  // port – port number to perform the 1-port calibration on

  // connector – the connector name for the DUT connector, e.g. "Type N -M-,50"

  // kitLabel – the label of the calkit to use, e.g. "1250-3607"

  //

  void Do1PortGuidedCal(int port, string connector, string kitLabel)

  {

           Instrument.Write(string.Format("sens:corr:coll:conn {0},{1}", port, connector));

           Instrument.Write (string.Format("sens:corr:coll:ckit:lab {0},{1}",port,kitLabel));

           Instrument.Write (string.Format("sens:corr:coll:meth:SOLT1 {0}", port));

    

    int steps = ReadInt("SENS:CORR:COLL:GUID:SCOunt?");

    for(int s = 1; s <= steps; ++s)

    {

          string steptext = Instrument.ReadString(string.Format("SENS:CORR:COLL:GUID:STEP:PROM? {0}",s));

          PromptUser(steptext); // blocks until user confirms they've performed the requested action

          Instrument.Write (string.Format("SENS:CORR:COLL:GUID:STEP:ACQ {0}",s));

          Instrument.ReadInt("*OPC?");

    }

    Console.Write("Saving...");

    Instrument.Write ("CORR:COLL:SAVE 0");

    Instrument.ReadInt("*OPC?");

    Console.WriteLine("Done ");

  }