Skip to content
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

NIDAQ: Added analog input functionality #514

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

SAJHCamps
Copy link

@SAJHCamps SAJHCamps commented Oct 24, 2024

Expanded the driver to be able to read analog inputs and capture traces. Has been tested with NI MAX emulation software but not with actual hardware.

Things to check before merging:

  • Run tests with actual hardware.
  • Currently the trace values are read out one sample at the time but I am unsure whether this is a mistake on my side or a side effect of the emulator.
  • Check whether the NIDAQmx commands used are available in the 9.2 version of the library.

@SAJHCamps SAJHCamps force-pushed the fixed_Analog branch 2 times, most recently from ae12591 to 4afff6e Compare November 5, 2024 08:59
First version to see if the inputs are correctly detected and added to the hub
Basic implementation reading at ~10Hz
Added property handlers for the ExpectedMin- and ExpectedMaxVolts properties
@nicost
Copy link
Member

nicost commented Nov 15, 2024

Your branch compiles fine with the 9.2 version of NIDAQms that we are building against. There are a couple of compiler warnings, but those will be easy to fix before merging. Let me know if it is ready for merging.

@SAJHCamps
Copy link
Author

I just went through the compiler warnings and the ones that are left fall into two categories:

  • type conversions, because functions relating to device properties want doubles and NIDAQxm wants float64. Similarly NIDAQxm wants UInt64 but size() for vectors returns t_size.
  • unreferenced formal parameters, CSignalIOBase requires several functions which an input port cannot satisfy like StartDASequence(), so DEVICE_UNSUPPORTED_COMMAND is returned without using the parameter.

The NI DAQ card arrived last week, so I expect the other two tasks to be checked off somewhere this week

@SAJHCamps
Copy link
Author

I ran some test traces and measurements with our PCIe 6323 card and with the fixes the traces and continuous sampling are working as intended. Let me know if there are any more changes needed before merging.

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.

2 participants