Search code examples
labviewdaq-mx

Labview: I can't read the voltage from more than one channel (DAQmx read)


I have a SCB 68A connector from National Instruments and I want to read out the open voltage from it. So I used the example code provided by National Instruments (https://decibel.ni.com/content/docs/DOC-28502):

enter image description here

I got 5 mV which is a reasonable value (I measured the noise signal with an oscilloscope). Now I want to read out the noise signal from few channels. So I sightly changed the VI (according to the documentation I need to create an array of channels and flatten them): enter image description here

But now I read out approximately 200 mV on both channels (and one of them is the same as in the first VI). It doesn't make any sense.

What am I doing wrong?

I want the user to be able to choose the channels, so I can't just write "Dev1/ai0:4".

Edit: I'm using the DAQ 14.0.0.

Edit 2: 1) There is nothing connected to the deivce - I just want to read out the noise signal. 2) I'm using the connector in the MIO with the disabled temperature sensor mode (the default configuration).


Solution

  • You are observing charge injection from the DAQ device's multiplexer. Connect each aiN terminal to aignd and you will be able to measure the noise of the DAQ device.

    Charge Injection

    Most NI DAQ boards have a single analog to digital converter (ADC) and provide multiple input channels by using a multiplexer (MUX) to switch the input of the ADC to the different analog input terminals ai0, ai1, etc: Sample DAQ System

    As NI explains, when the DAQ device's multiplexer moves from one channel to the next, it can introduce a small charge on each channel. Since the open channel does not have a path for this charge to dissipate, the voltage of the channel will increase. This can also cause the channel to rail, slowly floating up to the maximum input voltage (usually 10 V).

    Characterizing Noise

    You can determine the noise of each component in your system by:

    1. Measuring the noise of the DAQ device
    2. Measuring the noise of the DAQ device and terminal block
    3. Subtracting the DAQ device noise (step 1) from the system noise (step 2)

    When you're finished, the value from step 1 is the noise of the DAQ device, and the value from step 3 is the noise of the SCB-68.

    To measure the noise of an electric path, there must be a complete circuit for the ADC to sample. For step 1, connect each aiN terminal to aignd and run your VI. For step 2, connect the terminal block to the DAQ device, disconnect the sensor, and connect the terminal block's channel terminals to its ground terminal and run your VI.

    Minimizing Noise

    In addition to charge injection, noise can be introduced to a DAQ system from several sources, including the environment. Open terminals act like small antennas and receive radiated energy from other electronics, lights, and the AC mains.

    The link also outlines how to find and minimize noise, but the gist is:

    1. Systematically identify the sources of the noise.
    2. Remove sources of noise that aren't necessary for your measurements.
    3. Depending on the nature and source of the remaining noise, use appropriate shielding, cabling, and terminal configuration.
    4. Over-sample and average the signal.