-
Notifications
You must be signed in to change notification settings - Fork 9
Support Differential for NI hardware's analog inputs as fallback #2486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@timjarsky Ready to test! |
|
Zayd is testing. I gave him the installer today. |
|
@t-b , from Zayd: |
|
@timjarsky Thanks for testing. Should be fixed now. Please retest. |
088c100 to
a247f58
Compare
a247f58 to
184256c
Compare
|
@timjarsky Any update from Zayd? |
|
He continues to be unable to get his NI hardware to work with this PR (the hack did work) |
In a future commit we want to make it configurable.
Add an ADCConfig parameter which allows to pass in the output from HW_NI_GetAnalogInputConfig. We now only use RSE if it is supported and fallback to Differential if available. If that is also not available we bail out.
We want that information in the issue template as well and MEN_CreateIssueOnGithub() uses this function.
184256c to
7508837
Compare
|
@timjarsky Ready again for testing. If Zayd does not have any time testing, we can also merge now once CI passes and fix any other issues later on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for NI hardware analog input terminal configurations, implementing a fallback mechanism to use Differential (DIFF) mode when the preferred Referenced Single Ended (RSE) mode is not available. The implementation tracks the ADC configuration as a new labnotebook entry and passes this information through the hardware preparation pipeline.
Key Changes
- Added ADC configuration tracking infrastructure with a new labnotebook entry "ADC Configuration bits"
- Modified
HW_PrepareAcqsignature across all hardware types to accept anADCConfigparameter (NI-specific) - Implemented automatic ADC configuration detection and fallback logic with user warnings when RSE is unavailable
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Added documentation about RSE preference with Differential fallback for NI hardware |
| Packages/MIES/MIES_Constants.ipf | Bumped LABNOTEBOOK_VERSION to 82 and added CO_DAP_DIFF_FALLBACK_NI constant |
| Packages/MIES/labnotebook_numerical_description.itx | Added "ADC Configuration bits" entry to numerical labnotebook |
| Packages/MIES/MIES_WaveDataFolderGetters.ipf | Added column 62 for ADC Configuration bits in sweep settings key wave |
| Packages/MIES/MIES_GlobalStringAndVariableAccess.ipf | Added GetDeviceADCConfig() getter function for ADC configuration |
| Packages/MIES/MIES_DataConfigurator.ipf | Documented ADC configuration bits in labnotebook during DAQ setup |
| Packages/MIES/MIES_DAEphys.ipf | Added DAP_GatherADCConfiguration() to detect and validate ADC configurations |
| Packages/MIES/MIES_DAC-Hardware.ipf | Updated HW_PrepareAcq signatures and implemented configuration selection logic in HW_NI_PrepareAcq |
| Packages/MIES/MIES_TestPulse.ipf | Pass ADCConfig parameter to HW_PrepareAcq in test pulse mode |
| Packages/MIES/MIES_DataAcquisition_Single.ipf | Pass ADCConfig parameter to HW_PrepareAcq in single device DAQ |
| Packages/MIES/MIES_DataAcquisition_Multi.ipf | Pass ADCConfig parameter to HW_PrepareAcq in multi-device DAQ |
| Packages/tests/HardwareBasic/UTF_BasicHardwareTests.ipf | Added test verification for ADC configuration bits in labnotebook |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Up to now we only supported configuring ADC channels with RSE when using NI hardware. Although this is the preferred configuration [1] some NI hardware does not support that. We have a user report now that hacked-in Differential support works, so let's fallback to that with a message. The available ADC configurations are also stored in the labnotebook. [1]: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019QRZSA2
We need to use the names accepted by the NIDAQ MX operations and functions. See for example the help for DAQmx_AI_SetupReader.
7508837 to
f12ccd2
Compare
Close #2484
Close #2472