Questions tagged [nidaqmx]

nidaqmx is shorthand for National Instruments (NI) Data Acquisition. NI has developed several software products for using their hardware, e.g. LabVIEW. They also have released an extensive C header file and a dll to facilitate use of their hardware in other user software (Measurement Studio). Examples in several flavors of C, visualBasic, and Python can easily be found on the Web.

This tag should be used when questions about using National Instruments hardware under various programming environments. Questions about using National Instruments software packages should likely be directed to their support services.

National Instruments has a large and well-developed library of information at: Getting Started with NI-DAQmx

While NI seems to be pushing people to use their package LabVIEW, they will answer questions from people using the "C" library. Python users have expressed frustration at the lack of native support. A stable wrapper of the "C" library has been developed at: PyDAQmx

134 questions
2
votes
0 answers

Converting C dll header to delphi: char*

I'm using an NIDAQmx DLL in a Delphi XE4 app. The DLL only has an ANSI C header file. I'm trying to convert this function: int32 __CFUNC DAQmxGetPhysicalChanName(TaskHandle taskHandle, const char channel[], char *data, uInt32…
Michael Gendelev
  • 471
  • 4
  • 16
2
votes
0 answers

DAQ connection best practice

What are the best practices for configuring and communicating with a DAQ? Is it better to configure the DAQ once and then leave the line open and communicate when needed or is it better to open, configure and close the connection every time I need…
j.do
  • 21
  • 4
2
votes
1 answer

NI DAQmx -- How to configure software trigger?

I can't for the life of me figure out how to enable a software trigger using National Instruments DAQ mx. Documentation vaguely mentions properties, or that it can only be used with a switch device, but it's very incomplete. The one example page…
Sonicsmooth
  • 2,673
  • 2
  • 22
  • 35
2
votes
0 answers

Matlab: Generating an analog output signal (voltage) via NI DAQ during image acquisition

In Matlab, I am trying to provide an analog output signal (a voltage) at a certain point in time (or frame number) through a National Instruments DAQ while acquiring images with a USB3 camera. If the image acquisition starts at t=0 (frame 0), the…
ron767
  • 33
  • 1
  • 5
2
votes
1 answer

Can't build PortAudio for i386 to make it play nice with NI's DAQmxBase

I'm trying to write a little C/C++ program that both acquires data from an NI USB DAQ and plays audio with PortAudio. The problem is, it appears that the NI DAQ library for Mac/Linux, DAQmxBase, has to be built under i386, and I just can't get…
Tom
  • 593
  • 4
  • 6
1
vote
1 answer

NI USB-6008 issues

I am trying to run the sample C program that came with my NI USB-6008 DAQ card. I am trying to run the "ContGen-ExtClk.c" example. I get the following error when I build the program: DAQmx Error: Requested value is not a supported value for this…
moesef
  • 4,641
  • 16
  • 51
  • 68
1
vote
0 answers

undefined reference to `DAQmxCreateTask@8

By using VS code, I was trying to build a C code which has a DAQmx library from National Instruments. I have already included the NIDAQmx.h header file to the code. even if the build was successful, while compiling the code I am getting error…
Remya R
  • 21
  • 3
1
vote
2 answers

Pyinstaller with nidaqmx

I have a piece of software written in python that I am trying to package into an executable. One of the modules is being problematic and I can't find any information on it: nidaqmx After running standard pyinstaller, eg. pyinstaller…
Cusco88
  • 11
  • 1
1
vote
1 answer

How to avoid a Data Missed event in matlab when doing data acquisition from an NI board?

I am receiving DataMissed event(s) in matlab when acquiring waveform data (2 channels) and an analog input trigger (set up in pretrigger mode - negative delay value). Here is the code: sampleRate = 500000; pretrigger = 8; trigger_value = 0.6; ai =…
Ben
  • 305
  • 5
  • 12
1
vote
0 answers

NI DAQ MAX Receiving false results from Task.CIChannels.CreateAngularEncoderChannel()

I have an NI DAQ: cDAQ9185-1E7661EMod1, and I'm trying to read it's data from port ctr1 as a counter channel: AngularEncoderChannel. I'm using NI's C# api. All I receive back is a stream of 0, 0.36, 0.72 in bulks (a few thousand times 0, then a few…
user12618694
1
vote
0 answers

NI-USB Daqmx applying low pass filter with defined cut off frequency by python

I am trying to acquire voltage and temperature data with NI-USB 6341. The data is noisy and requires a filter, in my cases a low pass filter and a bandpass filter, separately. I do prefer to do it by python functions, based on the NI-DAQmx Python…
1
vote
1 answer

nidaqmx: prevent task from closing after being altered in function

I am trying to write an API that takes advantage of the python wrapper for NI-DAQmx, and need to have a global list of tasks that can be edited across the module. Here is what I have tried so far: 1) Created an importable dictionary of tasks which…
ctdunc
  • 13
  • 3
1
vote
1 answer

CodeBlocks, C++, mingw-w64 compiler, Windows 10, Errors: Undefined reference to `DAQmxCreateTask', etc

I wonder if anyone could help me. I'm programming a NI-DAQmx application in C++, using CodeBlocks WxWidgets. I'm using a recent version of the mingw-w64 compiler and Windows 10. When compiling, I'm getting the undefined reference errors to the…
Paul
  • 11
  • 6
1
vote
0 answers

How to synchronize ctr and ai channels reading using NIDAQmx API?

I have a chassis cDAQ-9174 and two DAQ (NI 9421 and NI9208), that I am using to monitor some voltage based sensors and reading some frequency based sensors. For this, in MATLAB, I created a session where I added ai_channels for the voltage based…
1
vote
2 answers

Triggering an output task with NIDAQmx

I'm having trouble carrying out what I think should be a pretty straightforward task on a NIDAQ usb6002: I have a low frequency sine wave that I'm measuring at an analog input channel, and when it crosses zero I would like to light an LED for 1…
kb4444
  • 35
  • 1
  • 5
1
2
3
8 9