Measure Efficiency
- Updated2025-07-23
- 2 minute(s) read
Purpose
This example demonstrates how to use IO Configuration step types to communicate with the instrument for measuring efficiency.
Example File Location
<TestStand Public>\Examples\Interfacing with Hardware\InstrumentStudio\Efficiency\Efficiency.seq
Highlighted Features
- IO Configuration Step Types
- Sweep Loop Step Type
Major API
None
Prerequisites
Complete the following steps before executing this example on 64-bit TestStand.
- Install the following NI software:
- LabVIEW (64-bit)
- NI-DCPower
- Measurement & Automation Explorer (MAX)
- InstrumentStudio 2021 or later
- MI Device Support for TestStand
Note- MAX and InstrumentStudio are included by default when you install NI-DCPower.
- MI Device Support for TestStand is included by default with NI-DCPower only when TestStand is already installed. You can install it separately with NI Package Manager once TestStand is installed.
- Complete the following setup:
- In TestStand, configure the LabVIEW Adapter to use the LabVIEW Development System.
- Create a simulated device in MAX. Right click Devices and Interfaces»Create New »Simulated NI-DAQmx Device or Modular Instrument»Finish.
- In the Create Simulated NI-DAQmx Device dialog, expand the node for Power Supplies and select the NI PXIe-4143.
- For the newly added device, update the name of the device in MAX to dev2 and save the device.
How to Use This Example
Complete the following steps to use this example.
- On the Steps pane of the MainSequence sequence, review the steps in the Setup step group.
- The Get Sequence File Directory step gets the directory of the example sequence file.
- The Identify CSV Output file step creates the output stream in the sequence file directory.
- The Create DC Power Session and Apply Configuration step creates a session (dev2) in LabVIEW.
- On the Steps pane, review the steps in the Main step group.
- The Sweep DC Power - Current Vout step sweeps on the voltage values for the session (dev2) on channel 0 and the current values for the session (dev2) on channel 1.
- The Measure Current And Voltage - Channel0 step measures the current and voltage for channel 0.
- The Measure Current And Voltage - Channel1 step measures the current and voltage for channel 1.
- The Calculate Efficiency step calculates the efficiency based on the measured voltage and current values against the values set in the preceding two steps.
- On the Steps pane, review the steps in the Cleanup step group.
- The Close Sessions step closes the sessions which have been opened in the current sequence.
- Select Execute»Single Pass to run the sequence.
- The voltage, current, and efficiency values are logged to <TestStand Public>\Examples\Interfacing with Hardware\InstrumentStudio\Efficiency\output.csv.