LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx multi channel acquisition

Hi all,

 

Thank you in advance for your help.

 

The purpose of my program is to use a producer consumer design pattern to output a constant voltage to multiple thermistors. Each thermistor ultimately gets connected to an analog input. As you can see in pic1 below, I am initializing the multi channel read using syntax dev1/ai0:7. This approach is 'working'. However, the user has to select which thermistors they have connected via the front panel.  My issue is that this implementation will still be acquiring data from all channels regardless of which channels are selected. This allows the user to potentially monitor garbage data from an unconnected input if there is any issues with hardware setup. I would not be against having the user manually select assign the input channels via control. However, I have had trouble implementing this see pic2.

 

Your help and suggestions are greatly appreciated. 

Download All
0 Kudos
Message 1 of 6
(6,417 Views)

Your pictures seem to be incomplete, and I can't tell what they have to do with each other.  Can you attach an actual VI?

 

How does the user select which channels they want and which they don't?  I would think you'd use a boolean array.

 

Why can't you go ahead and acquire data from all channels, and then discard or ignore the data from the channels you don't want.

0 Kudos
Message 2 of 6
(6,413 Views)

Jeff B probably know a better way, but here is one possible solution

snip.png

 

 

mcduff

Message 3 of 6
(6,399 Views)

@mcduff wrote:

Jeff B probably know a better way, but here is one possible solution

 

 

mcduff


Have you been borrowing my 8-Ball?

Capture.pngCapture1.png

Just take all the data!  

WHAT!!! Use the plot visibility checkbox to unload the "Dead waveforms".  Use the TDMS editor to remove dead data OR use the TDMS Add-on for Excel's import wizard to not import dead channels.  Or use the "Plot Visible?" Property to select which channels to export to file.

 

Now that you have a "1 each drop dead simple answer" you can spend some time documenting just exactly how you got some controllable voltage source into a Voltage Analog Input through a variable resistor.  You probably want to Measure Current and get a R/V curve for the thermistor or, a thermal response (theta sub jc) given a known Temp coefficient


"Should be" isn't "Is" -Jay
Message 4 of 6
(6,356 Views)

I just know someone is going to challenge me on "Why" My example is the better answer.

 

No fair peeking

Spoiler
Every other answer requires the USER to know something before the experiment starts.  Users make mistakes.  So, taking and filing all the possible data prevents workarounds like "Training the user" or, optionally, pointing out to the user that they are too stupid to run your code.  (Sometimes, they don't like to have that fact mentioned)

"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 6
(6,354 Views)

First off, Yes I am using a Boolean array to select which channels are active. However, the issue I am running into with both designs suggested and my own is that these other AI channels that do not have thermistors connected are not reading zero. Specifically they are "ghosting" the last read input that is connected to a terminal. Hence, a user will not be able to verify that they have selected the correct terminal by waveform data And I cannot parse data by voltage range.

 

Here are some references on Ghosting:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P6TeSAK&l=en-US

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YHy6CAG&l=en-US

 

I tried reducing the sample rate and increasing the inter-channel delay but did not have any luck.

However, I was able to eliminate the ghosting by grounding the first AI.# without a thermistor. It seems like doing this will serve the purpose that I need.

Not sure if there are any alternative solutions to resolve this issue. I did everything suggested in the link except putting a buffer opamp leading into the AI#.

 

Really appreciate the help!

 

0 Kudos
Message 6 of 6
(6,308 Views)