Example Code

NI-SCOPE and NI-DCPower DC Gain Accuracy Test Example

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Modular Instrumentation

    Software

  • LabVIEW

    Driver

  • Other

Code and Documents

Attachment

Overview
Demonstrates how an NI-DCPower device can be used with an NI-SCOPE device to measure DC accuracy of the scope.


Description
This example VI shows how an NI-DCPower device can be used with an NI-SCOPE device to measure DC accuracy of the scope or something connected to the scope, such as a probe. For each vertical range of the scope, DC value at 90% of the maximum is output by the power supply. The scope reads this value both at a positive and negative level, averages the readings, and calculates the DC accuracy as a percentage of the input.

 

Requirements

Software:

  1. LabVIEW 2012 (or compatible)
  2. NI-SCOPE
  3. NI-DCPower


Steps to Implement or Execute Code

  1. Open a session to the digitizer. And configure the output levels of DCPower device,including positive and negative levels.
  2. Configure the probe compensation.
  3. Configure the channel characteristics such as input channel name, input impedance.
  4. Fetch the acquired data. If the acquisition is not finished yet, this function will wait up to the specified timeout.
  5. Measure positive and negative levels for DC voltage source, and calculate the DC accuracy as a percentage of the input.
  6. Check for errors, and stop if any occurred. Also stop if the "Stop" button is clicked.
  7. Close the session and display any errors that might have occurred.

 

Additional Information or References
VI Snippet

DCPower.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Daniel S.
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.