Skip to content

Adding continuous update example for scope#15

Open
Upatel-NI wants to merge 6 commits into
mainfrom
Addingcontinousupdateexample4scope
Open

Adding continuous update example for scope#15
Upatel-NI wants to merge 6 commits into
mainfrom
Addingcontinousupdateexample4scope

Conversation

@Upatel-NI

@Upatel-NI Upatel-NI commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

What does this Pull Request accomplish?

Adding continuous update graph example for scope

Why should this Pull Request be merged?

Adding continuous update graph example for scope

What testing has been done?

or continuous example
With command line
image

Normal execution
image

For read and plot example
With command line
image
Normal execution
image

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new NI-SCOPE example script that continuously acquires waveform data and displays it in a live-updating matplotlib graph, aligning with the repo’s “community examples” goal of providing runnable reference workflows.

Changes:

  • Introduces niscope_continuously_update_graph.py implementing continuous acquisition + animated plotting.
  • Adds a CLI entry point to configure acquisition parameters (samples, vertical range/coupling, sample rate, etc.).
  • Adds basic simulated-run test helpers (test_example, test_main) for automation parity with other examples.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +43 to +46
resource_name (str): Resource name of the Scope (e.g., 'PXIe5162')
options (dict): Session options dictionary for driver configuration
num_samples (int, optional): Number of samples to read. Defaults to 250.0
vertical_range (float, optional): Voltage range in volts. Defaults to 5.0
"""Parses command-line arguments and runs the example."""
parser = argparse.ArgumentParser(description='NI-SCOPE Continuously Update Graph Example')

parser.add_argument('-n', '--resource_name', default='PXIe5162', help='Resource name of the NI oscilloscope (default: PXIe5162)')
Comment thread src/niscope/niscope_continuously_update_graph.py Outdated

def test_example():
"""Simulated hardware test — runs example() with a virtual PXIe-5162 (no real HW needed)."""
options = {'Simulate': '1','DriverSetup': 'Model:5162; BoardType:PXIe'}
@Upatel-NI Upatel-NI changed the title Addingcontinousupdateexample4scope Adding continuous update example for scope Jun 30, 2026
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.

2 participants