Skip to content

Adding Configure Acquisition example for NI-SCOPE - #2249

Closed
NI-velmurugan wants to merge 15 commits into
ni:masterfrom
NI-velmurugan:users/velmurugan/add-niscope-configure-acquisition
Closed

NI-velmurugan wants to merge 15 commits into
ni:masterfrom
NI-velmurugan:users/velmurugan/add-niscope-configure-acquisition

Conversation

@NI-velmurugan

@NI-velmurugan NI-velmurugan commented Oct 29, 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_configured_acquistion.py, a Python adaptation of the LabVIEW niScope EX Configured Acquisition.vi.

What testing has been done?

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

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@codecov-commenter

codecov-commenter commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.13%. Comparing base (56d2479) to head (9073397).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2249   +/-   ##
=======================================
  Coverage   88.13%   88.13%           
=======================================
  Files          88       88           
  Lines       22863    22863           
=======================================
+ Hits        20150    20151    +1     
+ Misses       2713     2712    -1     
Flag Coverage Δ
codegenunittests 84.96% <ø> (ø)
nidcpowersystemtests 94.40% <ø> (+0.04%) ⬆️
nidcpowerunittests 89.53% <ø> (ø)
nidigitalsystemtests 92.04% <ø> (ø)
nidigitalunittests 68.43% <ø> (ø)
nidmmsystemtests 92.33% <ø> (ø)
nifakeunittests 86.14% <ø> (ø)
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.

@marcoskirsch

Copy link
Copy Markdown
Member

Please take care to spell and capitalize product names correctly.

@NI-velmurugan NI-velmurugan changed the title Adding Configure Acquisition example in NI-Scope Adding Configure Acquisition example in NI-SCOPE Nov 2, 2026
@NI-velmurugan

Copy link
Copy Markdown
Contributor Author

Please take care to spell and capitalize product names correctly.

I have updated the product names wherever applicable to align with the established naming standards.

@NI-velmurugan

Copy link
Copy Markdown
Contributor Author

@jarnoldNI, the PR is ready for your review.

@NI-velmurugan
NI-velmurugan marked this pull request as ready for review November 11, 2026 14:20
@NI-velmurugan NI-velmurugan changed the title Adding Configure Acquisition example in NI-SCOPE Adding Configure Acquisition example for NI-SCOPE Nov 20, 2026
Comment on lines +34 to +35
# Configuring auto trigger
session.trigger_modifier = niscope.TriggerModifier[trigger_modifier]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Our C and CVI example do not configure auto trigger, so I would omit it, here, as well.
At the very least, turning it on by default is likely to give customers confusing results, if they copy that in to their code.

parser.add_argument('--vertical-offset', default=0.0, type=float, help='Specifies the location of the center of the range.')
parser.add_argument('--vertical-coupling', default='DC', choices=niscope.VerticalCoupling.__members__.keys(), type=str.upper,
help='Specifies how the digitizer couples the input signal for the channel.')
parser.add_argument('--max-input-frequency', default=0.0, type=float,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I have some minor reservations about adding this example.
In LabVIEW, it's a general purpose example to demonstrate the various ways that you can configure a scope, with configuration settings split by the various trigger types.

In Python, this translates to a very unfocused example with over 2 dozen command line arguments.
The C version is the same way, so it's not unique to Python.

It does its job of demonstrating how to configure the different type of triggers, but I worry the CLI may be intimidating to users.

I also think the example doesn't provide much value. We already have examples that demonstrate how to configure a basic acquisition and fetch. This just shows us selecting between the different trigger functions. The API documentation should explain their use well enough. What value is this example really adding?

@NI-velmurugan

Copy link
Copy Markdown
Contributor Author

I have some minor reservations about adding this example. In LabVIEW, it's a general purpose example to demonstrate the various ways that you can configure a scope, with configuration settings split by the various trigger types.

In Python, this translates to a very unfocused example with over 2 dozen command line arguments. The C version is the same way, so it's not unique to Python.

It does its job of demonstrating how to configure the different type of triggers, but I worry the CLI may be intimidating to users.

I also think the example doesn't provide much value. We already have examples that demonstrate how to configure a basic acquisition and fetch. This just shows us selecting between the different trigger functions. The API documentation should explain their use well enough. What value is this example really adding?

Agreed on both points. The example mostly restates the trigger method signatures in the API docs, and 27 arguments make it harder to follow than the API it demonstrates. Closing this PR without merging.

@divakar-selvam07
divakar-selvam07 deleted the users/velmurugan/add-niscope-configure-acquisition branch December 1, 2026 11:21
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.

6 participants