Message Boards Message Boards

[WSS17] Mathematica connection to NI - Data Acquisition (DAQ) cards

GROUPS:

[WSS17] Mathematica connection to NI - Data Acquisition (DAQ) cards

I have controlled hardware devices through serial ports, GPIB ports, USB ports using SerialRead/Write and NI - VISA from Mathematica. Here at WSS17, I wanted to control NI - DAQ cards using Mathematica. Through all these device communication protocols, large number of devices can be controlled which enables me to run my experiments efficiently using Mathematica.

DAQ cards are used for efficient measurements as they are compact and occupy less space than traditional devices. NI-DAQmx is an efficient driver to control NI-DAQ cards. In WSS17, I developed Mathematica-DAQmx Link ("DAQmxLink"), which links NI-DAQ cards with Mathematica through the communication between Mathematica NETLink and NI-DAQmx .

Project structure You can find the detailed code Git link

Further Reading on DAQmx

More on DAQmx .NET object

NI - DAQ - Test

usb6000 = DeviceOpen["DAQmx"]

enter image description here

ListPlot[DeviceReadBuffer[usb6000, 10000, "source"]]

enter image description here

I can read the individual data too.

Table[DeviceRead[usb6000], {i, 1, 10}]

enter image description here

This is the basic connectivity between Mathematica and NI DAQmx.

POSTED BY: Suman Banerjee
Answer
19 days ago

Group Abstract Group Abstract