Skip to content

Add nivisa_dmm_measurement example#191

Merged
bkeryan merged 15 commits intomainfrom
users/bkeryan/nivisa-example
Jan 11, 2023
Merged

Add nivisa_dmm_measurement example#191
bkeryan merged 15 commits intomainfrom
users/bkeryan/nivisa-example

Conversation

@bkeryan
Copy link
Copy Markdown
Collaborator

@bkeryan bkeryan commented Jan 10, 2023

What does this Pull Request accomplish?

Add a nivisa_dmm_measurement example, which uses pyvisa to perform a DMM measurement with NI Instrument Simulator v2.0 hardware. It also supports using pyvisa-sim to simulate the simulator hardware.

Why should this Pull Request be merged?

Implements the NI-VISA part of AB#2086086: Test Architect can access python example for using session management

What testing has been done?

Manually tested with InstrumentStudio, MeasurementLink UI Editor, and TestStand.

@bkeryan
Copy link
Copy Markdown
Collaborator Author

bkeryan commented Jan 10, 2023

FYI, the NI Instrument Simulator v2.0 is a small plastic box that connects to a PC via GPIB and/or RS-232.

image

It simulates three instruments: a waveform generator, an oscilloscope, and a digital multimeter:

image

You can configure some settings in software by running the NI Instrument Simulator Wizard:

  • GPIB multi-address vs. single address
  • GPIB address numbers
  • RS-232 baud rate and other configuration

I reset the simulator to its default factory settings, which includes GPIB multi-address mode with address 1-3.

@bkeryan
Copy link
Copy Markdown
Collaborator Author

bkeryan commented Jan 10, 2023

.measui panel: copied from nidmm_measurement and removed outputs that aren't supported by the simulator.

image

@bkeryan
Copy link
Copy Markdown
Collaborator Author

bkeryan commented Jan 10, 2023

TestStand:
image

Report w/duplicated measurement step (for more readings):
image

@bkeryan
Copy link
Copy Markdown
Collaborator Author

bkeryan commented Jan 10, 2023

I created Test Case 2263609: Use a Python measurement service with NI-VISA in TestStand to document how to set up and run this example.

@bkeryan
Copy link
Copy Markdown
Collaborator Author

bkeryan commented Jan 10, 2023

Neither NI nor the IVI Foundation distribute official Python support for VISA. I used pyvisa and pyvisa-sim.

Comment thread examples/nivisa_dmm_measurement/measurement.py Outdated
Comment thread examples/nivisa_dmm_measurement/teststand_fixture.py Outdated
Comment thread examples/nidcpower_source_dc_voltage/_helpers.py
Comment thread examples/nivisa_dmm_measurement/LICENSE Outdated
Comment thread examples/nivisa_dmm_measurement/NIInstrumentSimulatorV2_0.yaml
Comment thread examples/nivisa_dmm_measurement/pyproject.toml Outdated
Comment thread examples/nivisa_dmm_measurement/teststand_fixture.py
@pbirkhol-ni
Copy link
Copy Markdown
Contributor

This link is a blast from the past. :) http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=13039

Comment thread examples/nivisa_dmm_measurement/measurement.py
Comment thread examples/nivisa_dmm_measurement/measurement.py Outdated
Comment thread examples/nivisa_dmm_measurement/measurement.py
Comment thread examples/nivisa_dmm_measurement/teststand_fixture.py Outdated
@bkeryan bkeryan merged commit 506c7d3 into main Jan 11, 2023
@bkeryan bkeryan deleted the users/bkeryan/nivisa-example branch January 11, 2023 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants