Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with the NI-DAQ Example programs

I am using the DAQ-AI-16E-4 card with SC 2040(sample and hold amplifier) at the front.I tried to give a square wave of 800 mV and 60 Hz from the function generator.This signal is connected to the SC 2040 Analog input.I saw the signal on the test panel in the MAX Automation software.I was able to see the sqauare wave of 800mV on the test panel,but the signal was little noisy.I kept my sampling rate as 6000 Hz in the test panel.I ran the program DAQSingleBufAsync.c from my Visual C++ compiler.The program ran fine for this setup and I was able to read the 100 buffer points.The only problem was the values were having fluctuations and they were not constantly at 0.8 volts.So now i tried to give a gain of 10 on my SC 2040 board to gain go
od S/N Ratio.I tried to use the same program and tried to change the gain parameters used by functions DAQ_Start & DAQ_Vscale in the program from 1.0 to 10. The values i got from running this program was not 800 mV.It was around 5 volt or 0.5 volt.When I saw this signal on the test panel,i saw 8V on the test panel(which is correct as my signal is 0.8volt*gain(10)=8Volt).Now which changes should I make in the code.I think i m making some mistake in the gain parameters of the program.Please help me out.

Thanks
0 Kudos
Message 1 of 3
(2,500 Views)
If you set the SC-2040 to have a gain of 10 with a 0.8 V signal, the DAQ device will be receiving an 8 V signal. If you set up the DAQ device to have a gain of 1, the input range will be between -5 V and 5 V and that is why you are seeing 5 V. The DAQ device isn't be able to receive a voltage outside the +/- 5 V range and is railing at 5 V.

You will want to use -1 for the gain parameter within the DAQ_Start function which will apply a 0.5 gain for the DAQ device. The corresponding input range for the device with a gain of 0.5 will be +/- 10 V. Therefore, with a gain of 0.5, the DAQ device will be able to read the 8 V signal. I hope this helps.

Regards,

Todd D.
0 Kudos
Message 2 of 3
(2,500 Views)
Excellent !!
That helped.

Thanks
0 Kudos
Message 3 of 3
(2,500 Views)