Skip to content

Adding Measurement Library example in NI-Scope - #2245

Draft
NI-velmurugan wants to merge 4 commits into
ni:masterfrom
NI-velmurugan:users/velmurugan/add-niscope-measurement-library
Draft

NI-velmurugan wants to merge 4 commits into
ni:masterfrom
NI-velmurugan:users/velmurugan/add-niscope-measurement-library

Conversation

@NI-velmurugan

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_measurement_library.py, a Python adaptation of the LabVIEW niScope EX Measurement Library.vi

What testing has been done?

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

@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 75.18%. Comparing base (5375937) to head (c2c0089).

❗ There is a different number of reports uploaded between BASE (5375937) and HEAD (c2c0089). Click for more details.

HEAD has 11 uploads less than BASE
Flag BASE (5375937) HEAD (c2c0089)
niscopesystemtests 1 0
nidigitalsystemtests 1 0
nidmmsystemtests 1 0
nirfsgsystemtests 1 0
nimodinstsystemtests 1 0
nisesystemtests 1 0
niswitchsystemtests 1 0
nidcpowersystemtests 1 0
nirfsasystemtests 1 0
nifgensystemtests 1 0
nitclksystemtests 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2245       +/-   ##
===========================================
- Coverage   88.12%   75.18%   -12.94%     
===========================================
  Files          88       42       -46     
  Lines       22830     6633    -16197     
===========================================
- Hits        20118     4987    -15131     
+ Misses       2712     1646     -1066     
Flag Coverage Δ
codegenunittests 84.78% <ø> (ø)
nidcpowersystemtests ?
nidcpowerunittests 89.53% <ø> (ø)
nidigitalsystemtests ?
nidigitalunittests 68.43% <ø> (ø)
nidmmsystemtests ?
nifakeunittests 86.08% <ø> (ø)
nifgensystemtests ?
nimodinstsystemtests ?
nimodinstunittests 94.20% <ø> (ø)
nirfsasystemtests ?
nirfsaunittests 63.37% <ø> (ø)
nirfsgsystemtests ?
niscopesystemtests ?
niscopeunittests 43.20% <ø> (ø)
nisesystemtests ?
niswitchsystemtests ?
nitclksystemtests ?
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.

We can use immediate trigger to run the example and the external trigger depends on the external input
Comment thread src/niscope/examples/niscope_measurement_library.py Outdated
Comment thread src/niscope/examples/niscope_measurement_library.py Outdated
Comment thread src/niscope/examples/niscope_measurement_library.py Outdated
Comment thread src/niscope/examples/niscope_measurement_library.py
parser.add_argument('-n', '--resource-name', default='PXI1Slot3', help='Specifies the resource name of the device to initialize')
parser.add_argument('-m', '--scalar-measurement', default='FFT_FREQUENCY', choices=niscope.ScalarMeasurement.__members__.keys(), type=str.upper, help='The scalar measurement to be performed on each fetched waveform.')
parser.add_argument('--reference-level-units', default='PERCENTAGE', choices=niscope.RefLevelUnits.__members__.keys(), type=str.upper, help='Specifies the units of the reference levels.')
parser.add_argument('--low-ref', default=10.0, type=float, help='Stores the low reference level used in many scalar measurements.')

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
parser.add_argument('--low-ref', default=10.0, type=float, help='Stores the low reference level used in many scalar measurements.')
parser.add_argument('--low-ref', default=10.0, type=float, help='Specifies the low reference level used by scalar measurements.')

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.

To be consistent with our other examples, can we rephrase the description in this way?
If so, let's apply this nit change to applicable instances.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is consistent with the the driver docs, so I am not applying this changes

Comment thread src/niscope/examples/niscope_measurement_library.py Outdated
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