Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

IVI

Benchmark Example: Measuring the magnitude frequency response of a system

Consider the task of determining the frequency response of an unidentified system. This requires both a waveform/function generator to generate sine waves at various frequencies and a DMM or an oscilloscope to measure the output voltage(s) of the system under test. You can see below the pseudo-code for a test program that uses high-level instrument driver calls to program a function generator and oscilloscope.

  • Initialize and Configure Oscilloscope
  • Initialize and Configure Frequency Generator
  • While (frequency < EndFreq)

BEGIN LOOP

  • Generate Sine Wave (Frequency Generator Channel 1)
  • Read Stimulus Waveform (Scope Channel 1)
  • Read Response Waveform (Scope Channel 2)
  • Calculate Magnitude and Phase Difference between Stimulus and Response
  • Store Magnitude and Phase
  • Increase Frequency

END LOOP

  • Plot Magnitude and Phase Difference
  • Close Oscilloscope
  • Close Frequency Generator

graphic

Pseudo-code and test setup for swept sine test
This test process was implemented using a HP 33120A function generator and a HP 54645D oscilloscope. The table below highlights the difference in performance between IVI and traditional VXIplug&play drivers for this particular test.


Difference in Performance
  State Caching Test Time
(seconds)
Performance
Difference
  Off
(Traditional VXIplug&play driver)
35.0 N/A
  ON
(IVI driver)
13.2 265%