NI-VNA

Performing an Auto Calibration Using the NI-VNA API

  • Updated2023-02-21
  • 1 minute(s) read
  1. Configure the device for the final measurement you will be taking.
  2. (Optional) If desired, enable High-Sensitivity mode during calibration by calling niVNA_SetAttributeViBoolean(vi, "0", NIVNA_ATTR_CALIBRATION_HIGH_SENSITIVITY_ENABLED, VI_TRUE).
  3. Connect the AutoCal module to the desired serial port, and inform the driver of the port used by calling niVNA_SetAttributeViString(vi, "0", NIVNA_ATTR_AUTOCAL_BOX_COMMUNICATION_PORT, <port>), where <port> could be "COM1", "COM2", and so on.
  4. Load characterization data for the AutoCal module by calling niVNA_LoadAutoCalCharacterizationDataFromFile(vi, "0", <filepath>), where <filepath> should be a path to a .acd file included with the AutoCal kit.
  5. Connect the AutoCal module to PORT 1 and PORT 2. Which ports connect to which AutoCal module terminals can be configured by setting niVNA_SetAttributeViInt32(vi, "0", NIVNA_ATTR_AUTOCAL_BOX_ORIENTATION, <orientation>), where <orientation> could be NIVNA_VAL_AUTOCAL_BOX_ORIENTATION_PORT1_IS_LEFT or NIVNA_VAL_AUTOCAL_BOX_ORIENTATION_PORT1_IS_RIGHT.
  6. Call niVNA_InitUserCal(vi, "0", <calibrationType>), where <calibrationType> can be NIVNA_VAL_CALIBRATION_TYPE_2PORT_SOLT or NIVNA_VAL_CALIBRATION_TYPE_1PORT_SOL.
  7. Call niVNA_PerformCalibrationAction(vi, "port1,port2", NIVNA_VAL_CALIBRATION_ACTION_AUTOCAL_STANDARD).
Note Note  If NIVNA_VAL_CALIBRATION_TYPE_1PORT_SOL was chosen as the calibration type, only "port1" is required for the portList parameter.
  1. Call niVNA_WaitForCalibrationActionDone(vi, "0", <timeout>).
  2. If the calibration has been successful to this point and you wish to apply the new calibration, call niVNA_CloseUserCal(vi, "0", NIVNA_VAL_USER_CALIBRATION_COMMIT). Otherwise, call niVNA_CloseUserCal(vi, "0", NIVNA_VAL_USER_CALIBRATION_ABORT).
  3. To store the current configuration and calibration settings to a file, call niVNA_SaveCalibrationAndConfigurationDataToFile(vi, "0", <filePath>, VI_TRUE).