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
6
votes
1 answer

Estimate transfer function from input output data

I have a two-column matrix of data obtained from NI-DAQ. The first column is the output data of a motor-generator set (with driver) and the second column is the input data (square wave). I want to find the transfer function using tfest without…
Matt1993
  • 105
  • 1
  • 3
  • 8
5
votes
1 answer

Continuous Acquistion with nidaqmx

I am not being able to acquire continuos data from NI DAQ using nidaqxm on Python 3. I already acquired finite data with a similar code, although I can't understand what I need to change to acquire data continuously. import nidaqmx from nidaqmx…
Jose Guilherme
  • 325
  • 8
  • 16
4
votes
1 answer

Timers cannot be stopped from another thread (short example with nidaqmx-python and callbacks)

I have seen other questions on the topic on this forum, but none have helped me understand how to deal with this. Most of them also seem to me to be about quite intricated and long code. I believe I am doing something rather simple / would like to…
4
votes
3 answers

Can you synchronize the data acquisition toolbox and the image acquisition toolbox of Matlab?

I'd like to simultaneously get data from a camera (i.e. an image) and an analog voltage using matlab. For the camera I use the imaq toolbox, for reading the voltage I use the daq toolbox (reading NI-USB device), with a following code: clear all %…
user2041376
3
votes
0 answers

Mount device driver package to Docker container

I am trying to access a NI cDAQ device from a Python script in a Docker container, using this python script (as a start): import nidaqmx task = nidaqmx.Task() task.do_channels.add_do_chan(lines="cDAQ1Mod1/port0/line0") task.write(1) I have failed…
Benedict H.
  • 129
  • 7
3
votes
2 answers

nidaqmx.Task: (OSError: [WinError 126] The specified module could not be found)

The following code for data acquisition gives the below error import nidaqmx with nidaqmx.Task() as task: nidaqmx.Task.ai_channels.add_ai_voltage_chan("Dev1/ai0") task.read() OSError: [WinError 126] The specified module could not be…
3
votes
0 answers

Segmentation fault in stop method of nidaqmx Python package

I am getting frequent segmentation faults while trying to stop (and/or close) a nidaqmx task using the Python nidaqmx package, version 0.5.7. One time I got an 'illegal instruction' error. Can anyone see a problem with the code? Has anyone had this…
sfnagle
  • 31
  • 2
3
votes
0 answers

Continuous analog read from National Instruments DAQ with nidaqmx python package

Inspired by the answer to this question, I have tried the following code: import nidaqmx from nidaqmx import stream_readers from nidaqmx import constants import time sfreq = 1000 bufsize = 100 data = np.zeros((1, 1), dtype = np.float32) #…
3
votes
2 answers

Data Acquistion using Python

I'm working on a project using National Instruments boards to do data acquistion. I have functional C codes for doing the tasks, but would like to use Python, so the GUI programming is less painful. In my C-code, I use the API call setTimer, which…
Carl Houtman
  • 155
  • 1
  • 10
2
votes
2 answers

National Instruments USB 6008 and Linux

I went to see if there was a data acquisition tool box for the program octave here but couldn't find one http://octave.sourceforge.net/packages.php What I'm trying to do is use my National Instruments USB-6008 to acquire data in octave or any other…
Rick T
  • 3,349
  • 10
  • 54
  • 119
2
votes
1 answer

Is there a way to enumerate interfaces using NI Daqmx

I have a C++ application interfacing with a NI DAQ card, however the name of the device is hard coded and if changed in the NI Max app it would stop working, so is there a way to enumerate connected devices to know the name of the cards that are…
UbiMiles
  • 71
  • 7
2
votes
1 answer

NI DAQmx - Trigger input channel to read N samples using external analog trigger input (python)

I am having trouble using Python and the nidaqmx library to properly trigger an analog input channel to read N values. I have two analog input channels, ai0 and ai1. Channel ai0 is the trigger channel that reads 9V until the circuit is connected and…
2
votes
3 answers

National Instrument Long Monitoring Python

I'm building some scripting routines via the nidaqmx module developed by NI. I use 2 NI PXI 44-98 (32 channels) acquisition cards. We would like to develop a monitoring experiment over long periods (10 hours) with a sampling rate of 200k Hz. For the…
2
votes
4 answers

Continous update of sensor data using while loop in python and tkinter

I am using NI instrument to read data and display it on GUI. Have used tkinter. But could not find a way to update the data using while loop. import nidaqmx import time from tkinter import * master = Tk() while True: with nidaqmx.Task() as…
damu_d
  • 53
  • 1
  • 8
2
votes
0 answers

Outputing analog voltage continuously to NI DAQ modules with nidaqmx-python

This is about working with the nidaqmx-python package, maintained by National Instruments for the purpose of interfacing their acquisition modules. Specs: NI cDAQ-9178 with NI 9264 output card plugged into it. Package nidaqmx-python in a conda…
1
2 3
8 9