c++cnidaqmxdaq-mx

Digital/Analog output generation with NI DAQMX c/c++


I'm struggling to find a way to generate a voltage output from my NI DAQMX, using C/C++.

I can't figure out how to use the NI device libraries, and I can't find any helpful examples online.

Does anyone have any examples or insight that they can share to solve this?


Solution

  • You should take a look at this, as already suggested. Particularly,

    DAQmxWriteAnalogF64(taskHandle, 1000, 0, 10.0, DAQmx_Val_GroupByChannel, data, &written, NULL);
    

    should be what you are looking for. Also, have a look at the reported examples "GenVoltageUpdate" and "WriteDigChan" for implementation insight.