Purpose

This example demonstrates how to perform input leakage measurements with the PPMU function of the Digital Pattern Instrument (PXIe-6570 or PXIe-6571) using the NI-Digital Pattern Driver software in LabVIEW, Microsoft .NET, and C. You can use this example to help you learn key concepts or to serve as a starting point for applications you create.
Note For this example to produce passing results, you must connect an appropriate DUT to a digital pattern instrument and configure a pin and channel map file for the DUT. The example runs without a DUT but reports false results on each test step. NI does not provide a DUT for this example.

Ideally, input pins have an infinite input impedance. In reality, however, the input impedance is non-infinite, which causes small amounts of current to leak into or out from the pin. This example forces a series of voltages to selected digital input pins of the DUT and measures the leakage current for each pin.

Example File Location

<Public Documents>\National Instruments\NI-Digital\Examples\Getting Started

Highlighted Features

  • Digital Pattern Editor
  • NI-Digital Pattern Driver

Major API

NI-Digital Pattern Driver

Prerequisites

Note For this example to produce passing results, you must connect an appropriate DUT to a digital pattern instrument and configure a pin and channel map file for the DUT. The example runs without a DUT but reports false results on each test step. NI does not provide a DUT for this example.

How to Use This Example

Complete the following steps before you review or modify the pin and channel map in the digital pattern editor and run the test in LabVIEW, Microsoft .NET, or C.

  1. If you are using a DUT, manually connect the DUT to a digital pattern instrument.
  2. In the Start menu, navigate to NI Digital Pattern Editor in the National Instruments folder to launch the Digital Pattern Editor.

Review the Pin Map

  1. Open the Leakage Example.digiproj project, located in the appropriate development environment folder in the <Public Documents>\National Instruments\NI-Digital\Examples\Getting Started directory.
  2. Double-click the PinMap.pinmap file in the Project Explorer window to launch the pin and channel map editor, which displays an editable hierarchical view of the Instruments, Pins, Pin Groups, Sites, and Connections elements in the pin and channel map file. This example pin and channel map includes a 2 input (A1, A2), 2 output (Y1, Y2) digital device with a power supply pin (VCC) also connected to the digital pattern instrument.
  3. On the Pin Map tab, select the default PXI1Slot2 {Digital Pattern} entry in the <Instruments> section and change the corresponding Name field to match the name of the digital pattern instrument resource in your system.
  4. Notice that the pins are organized into pin groups.
  5. Modify the pins, sites, and connections to match the DUT you are using and update the pattern accordingly. Assign the pins to the predefined pin groups because the example code uses these pin group names to configure the measurements.

Run the LabVIEW Example

  1. Open the Leakage VI.
  2. On the block diagram, review the comments, which explains each subVI. The VI loads the same pin and channel map referenced in the Leakage Example.digiproj project you reviewed in the digital pattern editor.
  3. On the front panel, select a digital pattern instrument resource in your system in the Resource Name control.
  4. (Optional) Modify the test parameters to match the DUT you are using.
  5. Run the VI.

Run the Microsoft .NET Example

  1. Open the NIDigital.LeakageExample.sln solution file in Microsoft Visual Studio.
  2. In MainForm.cs, review the comments, which explain the NI-Digital Pattern Driver .NET API calls. The code uses the same pin and channel map referenced in the Leakage Example.digiproj project you reviewed in the digital pattern editor.
  3. Build and run the solution.
  4. On the main form, enter the name of a digital pattern instrument resource in your system in the Digital Instrument text box.
  5. Click the Run Test button.

Run the C Example

  1. Open the Leakage.sln solution file in Microsoft Visual Studio.
  2. In Leakage.c, review the comments, which explain the NI-Digital Pattern Driver C API calls. The code uses the same pin and channel map, specifications, levels, timing, and pattern files referenced in the Leakage Example.digiproj project you reviewed in the digital pattern editor.
  3. In the main function, enter the name of the digital pattern instrument resource in your system as the initialization value for the variable deviceID.
  4. Build and run the solution.