Repository navigation
Adding Configure Acquisition example for NI-SCOPE - #2249
NI-velmurugan wants to merge 15 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
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. |
|
@jarnoldNI, the PR is ready for your review. |
| # Configuring auto trigger | ||
| session.trigger_modifier = niscope.TriggerModifier[trigger_modifier] |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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. |
- [ ] I've added tests applicable for this pull requestWhat does this Pull Request accomplish?
This PR adds
niscope_configured_acquistion.py, a Python adaptation of the LabVIEWniScope EX Configured Acquisition.vi.What testing has been done?
Manually tested the example only using simulated hardware and the real hardware.