Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Unstable signal generation of Analog Input channel with DAQmx reference trigger function

I am struggling with reference trigger function. My project is to start to acquire two or three analog input channel data when external digital trigger signal(5V) triggers PFI1 channel. I found good example file in NI website (http://zone.ni.com/devzone/cda/epd/p/id/151), so I modified it by changing Daqmx start analog edge by Daqmx reference digital edge (I changed it as suggested by another message in forum
http://forums.ni.com/ni/board/message?board.id=250&message.id=36844&query.id=105514#M36844), and changing physical channel of Daqmx Creat Channel function (example file: Dev1:ai0, but I used Dev1:ai0:1) for 2 input channels.
Then for testing this program, I directly connected power supply (0V) to AI channel 0 and 1, and also connected power supply (0V) to oscilloscope 2 channels to monitor two channels.
 
When I tested this program (2 Analog input channels) with my setup, I got weird unstable signal generation from Analog input channel (big oscillating signal, Pk to Pk ~20mV, and about 200msec interval, figure file below) to affect signals of oscilloscope. When I acquired Analog data by using only one Analog Input channel, then these unstable signal disappeared, but if I used two or multi channel, then this weird signal appeared again  with certain intervals.
And I also tested this program by using Daqmx start digital edge trigger instead of Daqmx reference digital edge trigger, then even if I used 2 or multi channel, this weird signal disappeared.
 
So I think that this problem is from some trigger function and Analog input read function. Anyone has similar problem before?
I attached my files (labview program and weird signal figure file)
 
Download All
0 Kudos
Message 1 of 8
(4,484 Views)
Hey numhana,

I wanted to confirm that I have correctly understood your setup. From my understanding, you are using a DAQ device and also an oscilloscope to measure 2 power supplies that are both outputting 0V. You are also using a digital reference trigger with the DAQ device. To help better troubleshoot your issue I have a few questions for you:

What DAQ device are you using?

Are you seeing the "weird signal" on the DAQ device as well? Does this only occur when you have the oscilloscope connected?

How are your signals connected (Differential, RSE, NRSE)?

At what rate is your trigger coming in? Does the "weird signal" appear to come in at the same rate as the trigger?

If you try connecting the signals to different analog input channels that are farther apart do you see the same results? Ex. ai0 and ai7 rather than ai0 and ai1.
Regards,

Chris Delvizis
National Instruments
0 Kudos
Message 2 of 8
(4,456 Views)
Hi Chris,

Thank you for the fast response. Here is my answers.

1) What DAQ device are you using?

DAQ-6036E, Because we have two 6036Es, so I tested this program with two 6036Es, but the results are the same.

2) Are you seeing the "weird signal" on the DAQ device as well? Does this only occur when you have the oscilloscope connected?

That's a good question. I could not get any weird signal in the labview program of the DAQ device, but the signal is in the oscilloscope.

3) How are your signals connected (Differential, RSE, NRSE)?
Differential.

4) At what rate is your trigger coming in? Does the "weird signal" appear to come in at the same rate as the trigger?
When I changed sample rate at 10k, 20k and 40k Hz, then weird signal appear with time interval of 1400, 700, 350 msec, respectively.
But when I changed parameters of "Samples per channel" and "Pretrigger Sample", the time interval is not changed at all.

5) If you try connecting the signals to different analog input channels that are farther apart do you see the same results? Ex. ai0 and ai7 rather than ai0 and ai1.
the same results (case 1: ai0 and ai1, case 2: ai0 and ai7)

Sungjin
0 Kudos
Message 3 of 8
(4,449 Views)
Additional answer of question #4

4) At what rate is your trigger coming in? Does the "weird signal" appear to come in at the same rate as the trigger?
Trigger does not affect these weird signal. Even if I did not generate any trigger signal and the program is waiting for trigger signal, these weird signal appear. So when I turn on "Highlight Execution" button to monitor which function generate these signal, the weird signal starts to appear when "DAQmx read" function starts to work. I think that "DAQmx read" function generates these signal, even when the function are waiting for trigger signal. In addition, as I said in the previous message, the weird signal disappears when "DAQmx start trigger" function is used instead of "DAQmx reference trigger" function. So I think that combination of "DAQmx read" and "DAQmx reference trigger" functions generate the weird signal.

I should use "DAQmx reference trigger" because I want to get pretrigger data.
0 Kudos
Message 4 of 8
(4,446 Views)
Hey numhana,

Because the rate of the "weird signal" occurring seems to be correlated with the rate of the trigger, I think the ultimate cause of the the "weird signal" has something to do with the trigger signal itself. The problem is probably not related to the DAQmx Read function. This function just waits to be called until the trigger occurs.

What device are you using to create the trigger? Somehow this device seems to be causing noise on the analog lines. In order to try and isolate the problem, I would suggest trying a different device to create the trigger signal.

This seems strange that it occurs with a reference trigger and not with a start trigger. Does the weird signal still occur when you use a reference trigger and configure it to take no pretrigger samples?
Regards,

Chris Delvizis
National Instruments
0 Kudos
Message 5 of 8
(4,422 Views)
Hi Chris,

I don't think that trigger signal is the main reason, and I think that your DAQmx function generate something when the function is waiting for the trigger. Actually, even when I disconnected any trigger device, DAQmx read function starts to generate weird signal while the function is waiting for the trigger. In addition, when I simply generate 5V signal from digital output of DAQ board, then weird signal generates too.
Is it possible for you to test my program with any DAQboard? It is very simple setup. When I saw the signal at the first time, I also thought that there is something wrong with my setup and my other devices. I spent a week to figure out that DAQboard generates the weird signal. I think that one of possible reason is some relay in DAQ board circuit, because the weird signal disappear when I use only one Analog input channel, but the weird signal appears again when I use two or multiple channel.

In addition, the weird signal appears even when I use a reference trigger and configure it to take no pretrigger samples. So I think that maybe reference trigger function affects some relay circuit of DAQboard, is it possible?

Sungjin
0 Kudos
Message 6 of 8
(4,416 Views)
Hi chris again,

I think that you misunderstand my message. When I said in the mail "When I changed sample rate at 10k, 20k and 40k Hz, then weird signal appear with time interval of 1400, 700, 350 msec, respectively", the sample rate is analog input sampling rate, not trigger rate. So "Because the rate of the "weird signal" occurring seems to be correlated with the rate of the trigger" is not correct, the rate of the "weird signal" occurring seems to be correlated with the sampling rate of Analog input not the rate of the trigger.

Sungjin
0 Kudos
Message 7 of 8
(4,414 Views)

numhana,

After running your code I do not see anything out of the ordinary.  I also do not have a trigger set up for my device. 

What kind of signal are you measuring? Where is it coming from?

What happens when you remove the trigger and just acquire continuously on your card?

Can you clarify your set up with the oscilloscope?  Do you see the noise EVER in the LabVIEW program?  Do you see the “weird signal” when you just have your signal source hooked up to the oscilloscope?

 Do you see the weird signal in Measurement and Automation Explorer (MAX) when running test panels?

Thanks.

Ryan N
National Instruments
Application Engineer
ni.com/support
0 Kudos
Message 8 of 8
(4,372 Views)