Skip to content

Conversation

@t-b
Copy link
Collaborator

@t-b t-b commented Aug 12, 2025

Close #2484

Close #2472

@t-b
Copy link
Collaborator Author

t-b commented Aug 12, 2025

@timjarsky Ready to test!

@timjarsky
Copy link
Collaborator

Zayd is testing. I gave him the installer today.

@timjarsky timjarsky assigned t-b and unassigned timjarsky Aug 20, 2025
@timjarsky
Copy link
Collaborator

@t-b , from Zayd:

  If available we will fallback to Differential (Diff), see also https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019QRZSA2.
  !!! Threadsafe assertion FAILED !!!
  Message: "Start acquisition of NI device Dev1 failed with code: 65552
DAQmx_Scan;Expected channel type keyword: 'DIFF', 'NRSE', or 'RSE'.
While executing DAQmx_Scan:NIDAQ Tools error for device Dev1:10016: Expected channel type keyword: 'DIFF', 'NRSE', or 'RSE'."
  Please provide the following information if you contact the MIES developers:
  ################################
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Stacktrace:
  DAP_ButtonProc_TPDAQ(...)#L3947 [MIES_DAEphys.ipf]
TPM_StartTestPulseMultiDevice(...)#L68 [MIES_TestPulse_Multi.ipf]
TPM_StartTPMultiDeviceLow(...)#L42 [MIES_TestPulse_Multi.ipf]
TPM_BkrdTPMD(...)#L87 [MIES_TestPulse_Multi.ipf]
HW_StartAcq(...)#L668 [MIES_DAC-Hardware.ipf]
HW_NI_StartAcq(...)#L2322 [MIES_DAC-Hardware.ipf]
FATAL_ERROR(...)#L336 [MIES_Utilities_ProgramFlow.ipf]
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Time: 2025-08-20T16:38:25-04:00
  Experiment: Untitled ()
  Igor Pro version: 9.0.6.1 (56565)
  ################################

@t-b
Copy link
Collaborator Author

t-b commented Aug 22, 2025

@timjarsky Thanks for testing. Should be fixed now. Please retest.

@t-b t-b assigned timjarsky and unassigned t-b Aug 22, 2025
@t-b t-b force-pushed the feature/2486-allow-different-ADC-methods-for-NI branch from 088c100 to a247f58 Compare September 3, 2025 18:34
@t-b t-b force-pushed the feature/2486-allow-different-ADC-methods-for-NI branch from a247f58 to 184256c Compare October 1, 2025 00:25
@t-b
Copy link
Collaborator Author

t-b commented Oct 2, 2025

@timjarsky Any update from Zayd?

@timjarsky
Copy link
Collaborator

He continues to be unable to get his NI hardware to work with this PR (the hack did work)

@t-b t-b assigned t-b and unassigned timjarsky Oct 3, 2025
t-b added 4 commits December 1, 2025 22:32
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.
Copilot AI review requested due to automatic review settings December 1, 2025 21:32
@t-b t-b force-pushed the feature/2486-allow-different-ADC-methods-for-NI branch from 184256c to 7508837 Compare December 1, 2025 21:32
@t-b
Copy link
Collaborator Author

t-b commented Dec 1, 2025

@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.

@t-b t-b assigned timjarsky and unassigned t-b Dec 1, 2025
Copy link

Copilot AI left a 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_PrepareAcq signature across all hardware types to accept an ADCConfig parameter (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.

timjarsky
timjarsky previously approved these changes Dec 1, 2025
t-b added 3 commits December 2, 2025 21:29
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.
@t-b t-b force-pushed the feature/2486-allow-different-ADC-methods-for-NI branch from 7508837 to f12ccd2 Compare December 2, 2025 20:29
@t-b t-b assigned t-b and timjarsky and unassigned timjarsky and t-b Dec 2, 2025
@t-b t-b merged commit 1b398d7 into main Dec 3, 2025
22 checks passed
@t-b t-b deleted the feature/2486-allow-different-ADC-methods-for-NI branch December 3, 2025 13:33
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.

Support different AD input methods for NI hardware Clarify NI device support for devices without RSE

3 participants