I am using Matlab 6.1 to acquire and anlyze two audio signals from a B&K PreAmp. I am applying the built-in reference tone (1kHz, 1V RMS) to one channel, and the B&K acoustical calibrator (also 1k @ 1Vrms) to another.
I have the code as follows:
ai = analoginput ('nidaq',2);
ai.SampleRate = 30000;
ai.SamplesPerTrigger = 30000;
addchannel(ai, [0 1]);
start (ai)
[data,time] = getdata(ai);
stop (ai)
The matrix 'data' has two columns, one for the voltages for each channel. The channels correspond to the NI hardware channels on the card.
Using the SCB-68 connector block board I have channel 1 from the preamp connected to ACH0 and ACH8 in differntial configuration, and Channel 2 to ACH1 and ACH9.
Matlab is configured for differntial mode.
I have checked the signals all the way up to the SCB-68 - the signal is intact and there is no obvious distortion or cross-talk on either channel.
However, if I load the NI-MAX software and run the test panel. In Strip-Chart mode I am getting a very noisy signal. It looks as if it is just random noise which is being modualted by a 1kHz tone. This is the same for both channels.
If I plot the acquired data in matlab, then the waveforms are perfect. The only problem is that if a signal is applied to one channel but not the other, then it appears on the other but at a much smaller amplitude. My matlab software also calcualtes the SPL of the signal. With no signals applied the nosie floor is about 35dB. However, if I stick 1k @ 94dB on one channel, it shows as 94dB on that channel, but 60dB on the other channel. For some reason it has gained 30dB even though there is no signal being applied.
It is the same for all channels in any configuration.
Because my program also has a frequency counter, it is reading back both channels as 1k, even though a signal is only applied to one channel.
This is very strange and I can't seem to get rid of it. Anyone know where to start with this?
(I've sent this request to mathworks).
I've attached a few small screen captures of the problems