Skip to content

Commit 2a19c75

Browse files
authored
Combine DC Power examples into one that has a .measui and a .vi (#214)
* Merge DCPower examples with the .measui and VI interfaces * Add the .vi user interface file * Update read mes * Update readmes to include information about multiple UI files * Update readmes to include information about multiple UI files * Mention multiple UIs for sample measurement
1 parent d479d28 commit 2a19c75

18 files changed

Lines changed: 12 additions & 9702 deletions

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,14 @@ There are three ways to do this:
5757

5858
The `examples` directory contains the following example projects:
5959

60-
- `sample_measurement`: Performs a loopback measurement with various data types.
60+
- `sample_measurement`: Performs a loopback measurement with various data types. Provides a Measurement UI and a LabVIEW UI.
6161
- `nidaqmx_analog_input`: Performs a finite analog input measurement with NI-DAQmx.
62-
- `nidcpower_source_dc_voltage`: Sources and measures a DC voltage with an NI SMU. Provides a Measurement UI
63-
- `nidcpower_source_dc_voltage_with_labview_ui`: Sources and measures a DC voltage with an NI SMU. Provides a LabVIEW UI
62+
- `nidcpower_source_dc_voltage`: Sources and measures a DC voltage with an NI SMU. Provides a Measurement UI and a LabVIEW UI.
6463
- `nidmm_measurement`: Performs a measurement using an NI DMM.
6564
- `nifgen_standard_function`: Generates a standard function waveform using an NI waveform generator.
6665
- `niscope_acquire_waveform`: Acquires a waveform using an NI oscilloscope.
6766
- `niswitch_control_relays`: Controls relays using an NI relay driver (e.g. PXI-2567).
68-
- `nivisa_dmm_measurement`: Performs a DMM measurement using NI-VISA and an NI Instrument Simulator v2.0.
67+
- `nivisa_dmm_measurement`: Performs a DMM measurement using NI-VISA and an NI Instrument Simulator v2.0.
6968

7069
For more details about a specific example, see the `README.md` file included with the example.
7170

examples/nidcpower_source_dc_voltage_with_labview_ui/NIDCPowerSourceDCVoltageUI.vi renamed to examples/nidcpower_source_dc_voltage/NIDCPowerSourceDCVoltageUI.vi

File renamed without changes.

examples/nidcpower_source_dc_voltage/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ This is a MeasurementLink example that sources and measures a DC voltage with an
1111
- Sources the same DC voltage level on all selected pin/site combinations
1212
- Measures the DC voltage and current for each selected pin/site combination
1313
- Includes InstrumentStudio and MeasurementLink UI Editor project files
14+
- Includes multiple UI files. Note: InstrumentStudio only displays the 1st UI file.
15+
To change the UI file used for the example, simply switch the order of the
16+
`ui_file_paths` array in `measurement.py`
1417
- Includes a TestStand sequence showing how to configure the pin map, register
1518
instrument sessions with the session management service, and run a measurement
1619
- Uses the NI gRPC Device Server to allow sharing instrument sessions with other

examples/nidcpower_source_dc_voltage/measurement.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
measurement_info = nims.MeasurementInfo(
2222
display_name="NI-DCPower Source DC Voltage (Py)",
2323
version="0.1.0.0",
24-
ui_file_paths=[pathlib.Path(__file__).resolve().parent / "NIDCPowerSourceDCVoltage.measui"],
24+
ui_file_paths=[
25+
pathlib.Path(__file__).resolve().parent / "NIDCPowerSourceDCVoltage.measui",
26+
pathlib.Path(__file__).resolve().parent / "NIDCPowerSourceDCVoltageUI.vi",
27+
],
2528
)
2629

2730
service_info = nims.ServiceInfo(

examples/nidcpower_source_dc_voltage_with_labview_ui/NIDCPowerSourceDCVoltage.instudioproj

Lines changed: 0 additions & 21 deletions
This file was deleted.

examples/nidcpower_source_dc_voltage_with_labview_ui/NIDCPowerSourceDCVoltage.pinmap

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)