Skip to content

Adding Multi Record example in NI-Scope - #2247

Draft
NI-velmurugan wants to merge 2 commits into
ni:masterfrom
NI-velmurugan:users/velmurugan/add-niscope-multi-record
Draft

NI-velmurugan wants to merge 2 commits into
ni:masterfrom
NI-velmurugan:users/velmurugan/add-niscope-multi-record

Conversation

@NI-velmurugan

@NI-velmurugan NI-velmurugan commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor
  • This contribution adheres to CONTRIBUTING.md.
  • I've updated CHANGELOG.md if applicable.
    - [ ] I've added tests applicable for this pull request

What does this Pull Request accomplish?

This PR adds niscope_multi_record.py, a Python adaptation of the LabVIEW niScope EX Multi Record.vi

What testing has been done?

Manually tested the example only using simulated hardware and the real hardware.

The additional trigger type since this example is independent of the trigger type and the LV as well documented that it is avoided to simplify the VI, but adding this will let the user aware that they can configure any type of trigger instead of just the edge trigger
@codecov-commenter

codecov-commenter commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.12%. Comparing base (5375937) to head (3d2662c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2247   +/-   ##
=======================================
  Coverage   88.12%   88.12%           
=======================================
  Files          88       88           
  Lines       22830    22830           
=======================================
+ Hits        20118    20119    +1     
+ Misses       2712     2711    -1     
Flag Coverage Δ
codegenunittests 84.78% <ø> (ø)
nidcpowersystemtests 94.40% <ø> (+0.04%) ⬆️
nidcpowerunittests 89.53% <ø> (ø)
nidigitalsystemtests 92.04% <ø> (ø)
nidigitalunittests 68.43% <ø> (ø)
nidmmsystemtests 92.33% <ø> (ø)
nifakeunittests 86.08% <ø> (ø)
nifgensystemtests 94.34% <ø> (ø)
nimodinstsystemtests 73.85% <ø> (ø)
nimodinstunittests 94.20% <ø> (ø)
nirfsasystemtests 82.71% <ø> (ø)
nirfsaunittests 63.37% <ø> (ø)
nirfsgsystemtests 81.22% <ø> (ø)
niscopesystemtests 89.99% <ø> (ø)
niscopeunittests 43.20% <ø> (ø)
nisesystemtests 91.50% <ø> (ø)
niswitchsystemtests 81.66% <ø> (ø)
nitclksystemtests 94.87% <ø> (ø)
nitclkunittests 98.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

with niscope.Session(resource_name=resource_name, options=options) as session:
session.configure_vertical(range=vertical_range, coupling=niscope.VerticalCoupling.DC)
session.configure_horizontal_timing(min_sample_rate=min_sample_rate, min_num_pts=min_record_length, ref_position=50.0, num_records=num_records, enforce_realtime=True)
# Other trigger types (for example hysteresis or window) can be configured here; IMMEDIATE acquires without an input signal crossing the edge level.

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.

Suggested change
# Other trigger types (for example hysteresis or window) can be configured here; IMMEDIATE acquires without an input signal crossing the edge level.
# Configure the selected trigger here; add other trigger types to this block as needed.

else:
session.configure_trigger_immediate()
with session.initiate():
# Fetch waits for all records to be acquired and returns them all.

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.

Suggested change
# Fetch waits for all records to be acquired and returns them all.
# Wait for num_records to be acquired, then return their waveforms.

import matplotlib.pyplot as plt

with niscope.Session(resource_name=resource_name, options=options) as session:
session.configure_vertical(range=vertical_range, coupling=niscope.VerticalCoupling.DC)

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.

nit:

Suggested change
session.configure_vertical(range=vertical_range, coupling=niscope.VerticalCoupling.DC)
session.channels[channel].configure_vertical(range=vertical_range, coupling=niscope.VerticalCoupling.DC)

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