From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform daq assistant - Two signals appear the same

Hi,
 
I've got a simple VI attached which includes a DAQ Assistant with two channels, one triangular wave from a hardware function generator and a constant voltage.  The dynamic data flows into a waveform which plots the channels.  The clock is internal with no trigger, and the sample mode is continuous.
 
The problem is that each signal is graphed properly when I plot only ONE signal.  However, when I try to graph both signals, they both appear as the triangular waveform.
 
My hardware: PCI 6220, SCXI 1000 chasis, BNC 2095.  I'm running Labview 7.0.
 
There was a similar problem at this post:
But they never really addressed this mirror signal problem.  I'd like to stick with DAQmx and stay away from the traditional tools if possible. 
 
Thanks,
Michael
Download All
0 Kudos
Message 1 of 13
(3,777 Views)

Furthermore, even when I use the Cont Acq&Graph Voltage-Ext Clk-Dig Start.vi example, I still can see each channel fine by itself, but when I acquire both signals, they both become the triangular waveform.

0 Kudos
Message 2 of 13
(3,766 Views)

Michael,

Looking at your code, there are a couple things that are missing, though none that I think would cause the problem that you are seeing. So let’s start with some fixed good code to work from. So I would recommend using one of the shipping examples, but not the one that you said that you used in your second post. I would start with: “Cont Acq&Graph Voltage-Int Clk.vi” which you can find in the example finder in the categories:

Hardware Input and Output >> DAQmx >> Analog Measurements >> Voltage >>  “Cont Acq&Graph Voltage-Int Clk.vi”

 


From there all you would need to do is make sure you have correct device selected, and input the two channels that you want to read from at the same time. I have a screen shot of this attached. As you can see with this example program, and just specifying which channels I am using I was able to read two signals just fine. I also did this using a DAQ assistant, and have included screen shots of the front panel and block diagram.

So take a look at my screen shots, and try that example program I mentioned. Once we have the same start point as far as code goes, and you are still experiencing the problems then we will go from there.  Let us know how it goes.

-GDE

0 Kudos
Message 3 of 13
(3,748 Views)

GDE,

I do appreciate the suggestions, but no dice yet.  I've attached the screen captures of my code and the waveform graph.  Literally, the only change I made was adding the 2nd channel in between the first and the sample clock.  Again, channel ai2 is graphed properly.  The other channel should be a constant voltage ~3.8 V.  When I acquire it by itself, the waveform graph shows it properly.

Thanks,
Michael

Download All
0 Kudos
Message 4 of 13
(3,741 Views)
Michael,

What is the source of the constant DC voltage? Is it ground-referenced, or single-ended? I'm assuming the function generator is ground referenced, correct? Also, how do you have your BNC-2095 configured? Do you have the ground-reference switches on? Are the pull-up resistors enabled? Please let us know your configuration, as I believe this behavior has something to do with grounding and it affecting the multiplexing of your signals. It would also help to have the SCXI module number. Thanks!
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 5 of 13
(3,724 Views)

Ryan,

The source of the constant DC voltage is a pressure sensor, which is single-ended since there's 20 mV between the signal ground and the electrical outlet ground.  The function generator is ground referenced, yes.  I have the BNC unit configured in floating signal type with detection of open thermocouples, i.e. all switches "on."  The BNC 2095 is connected to an SCXI 1100 to an SCXI 1000 chasis to an SCXI 1349 to the SHC 6868 EPM cable to the PCI 6220 card.

Thanks for the help,
Michael

0 Kudos
Message 6 of 13
(3,717 Views)

Hello Michael,

So it seems that you have one ground referenced source and one floating source but have all of the switches configured to be floating sources.  Another complication is the fact that the default setting for the SCXI-1100 is for ground-referenced signals.  You can leave this setting on the SCXI-1100 as it is because CH - is not connected through a bias resistor to ground. 

However, you do want your floating signal to be connected in this manner, the negative lead connected through a bias resistor to ground.  This is taken care of by using the BNC-2095 with the switch for ground referencing of that channel in the "on" position.  However, for the function generator, you will need to flip the switch on the BNC-2095 for ground referencing to "off" so that the CH - terminal does not get connected through a resistor to ground, causing a ground loop. 

Please try this configuration and see if it helps.

Thanks,

Laura

0 Kudos
Message 7 of 13
(3,699 Views)

Hi Laura,

Sorry for the late reply.  I've tried a couple of things:

1) changing my function generator channel setting to "ground ref - off"  There was no change in my graphed output.  The constant voltage channel continues to mirror the image of the function generator.

2) changing the function generator channel setting to "ground ref - on" and the floating signal to "ground ref - off" just to see what would happen.  The signal looked the same as above.

3) I completely switched both channels to another set of connections on the BNC board.  The setting were as you recommended: the floating channel with "ground ref - on" and the function generator with "ground ref - off."  The result was now both signals mirror the constant voltage.  When I physically switch the two channels, then the signals went back to the triangle waveform.

Michael

0 Kudos
Message 8 of 13
(3,684 Views)

Hi Michael,

It seems like your signals are always following either the first or second channel in the scan.  For example, if the signal is always following the first channel in the scan, say the triangle wave, and you physically swap the channels, the signal then always follows the DC voltage.  To test this, please swap the order of the channels in the scan programmatically.  So, instead of having ai0 be the first channel added to the task, make ai1 be the first channel and ai0 the second. 

Another thing to try:  Space out the two channels, and ground the channels in between.  For example, acquire from ai0 and ai3 with ai1 and 2 being connected to grounded.  You may also try acquiring all four channels with the same connections.

Please let me know the results,

Laura

0 Kudos
Message 9 of 13
(3,648 Views)

Laura,

Thanks again for the quick reply.  Here are the results:

1) I tried what you asked two different ways.  First, I literally switched the order in the block diagram.  The graph of two triangle waves remained.   Secondly, I went back to the original VI and listed both channels in the control dialog box, ie I lised them Multiplexer/ai3, Multiplexer/ai2.  They still appeared as triangle waves.

2) I tried switching the order with the triangle wave in "ground ref - off" mode.  The result was the same.

3) I grounded channels 10 and 12 by setting the channels to "ground ref - off" in addition to the function generator signal's being in "ground ref - off" mode, channel 14. (If I need to physically input a ground to channels 10 and 12, let me know- I didn't think this was necessary)  The constant voltage was recorded on channel 8.  Now, irregardless of the order on my front panel, the graphs mirror the constant voltage!  The grounded signals in between make no difference in this result.  The ground ref - off/on for the triangular wave had no effect.  The physical order of channels (ie I switched the constant voltage to channel 14, and the triangle wave to channel 😎 switched the effect!  Now, with the in between channels still grounded, whatever signal is recorded on channel 8 is the one that gets duplicated by channel 14.

Any thoughts? thanks, Michael

0 Kudos
Message 10 of 13
(3,640 Views)