LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best structure to measure voltage across 8 resistors in parallel via 8 separate analog channels

I'm not sure how you plan to measure the currents through each. Normally when you measure current, unless you have a meter in series with the resistor, you measure the voltage across a "current shunt" in series with the load (the individual resistance). These shunts are usually a very low resistance wire (or bus bar for high currents) so as minimally influence the current. The voltage across these shunts is usually very low (my most recent was rated at 10mV/Ampere). As pointed out the voltage across all of the parallel connected resistors will be the same, so if you know the individual resistances then measuring the voltage across one will give you the info needed to calculate the current through each of them. Otherwise you will need to put a shunt in series with each and measure the voltage across each of those to measure the actual current in each leg. A multichannel analog board will make simultaneous measurements of all its channels (if so directed) and then present the results as an array of values. If you are using DAQmx the pulldown selections allow "multiple channels, single sample" which returns a 1D array with each element representing a channel, and "multiple channels, multiple samples" a 2D array with each row representing multiple measurements of a channel.

Hope this helps,

P.M.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 11 of 26
(1,081 Views)
And in fact is the only way to do because the DAQ board only measures voltage, all you can do is take a single reading. But, for future reference, it's certainly possible to measure multiple channels at the same time (or nearly the same time). A multi-channel DAQ board wouldn't be much use without this capability. You just have to specify mulitple channels in your task list ike dev1/ai0:ai4 for channels 0 through 4 or dev1/ai0,ai4 for just channels 0 and 4.
0 Kudos
Message 12 of 26
(1,077 Views)
i see.... ok i think im not thinking clearly these days.  forget the current measurements, ultimately i am just making sure i know how to automate my setup to read different channels and take a certain amount of data, and record it.  i'll just switch the circuit to in series then read the voltages. this is just a test setup afterall.
 
so if i am using DAQmx, in the Read function i know i can choose the Nchannels Nsamples, is that what you are talking about? how would i set up the channels? do i use an array constant and populate the array with the analog channels?
 
thanks for all the help. 
0 Kudos
Message 13 of 26
(1,076 Views)
Dennis:
 
I think thats exactly what i was looking for.  Where exactly do i specify that in the task list? I will go play around with it for now. Thanks for the help again, im such a newb.
0 Kudos
Message 14 of 26
(1,072 Views)
When you use DAQmx Create Channel, the physical channel input.
0 Kudos
Message 15 of 26
(1,067 Views)
ok yeah, thats where i found it, but it only lets me write dev1/ai0:04  same thing as what you put? so in essence, i wouldnt need a  for loop? as tbob suggested on page one? thanks again dennis.
0 Kudos
Message 16 of 26
(1,063 Views)
You can put any valid list of channels in there that you want. With multiple channels specified and a multiple channel DAQmx Read, you do not need a for loop. Try one of the shipping examples. One of the simplest is Cont Acq&Graph Voltage-Int Clk. The DAQmx Read is already set for multiple channels so all you would have to do is change the Physical Channel input on the front panel.
0 Kudos
Message 17 of 26
(1,057 Views)

And as mentioned earlier, you can create a DAQmx task in Meas & Automation Explorer (on the desktop), which allows you to choose the channels, give them "names" that mean something (like "Motor1 voltage") and configure the channel for the type of measurement. As was mentioned, they are voltage measurements, but in this task configuration you can define them as "current measurement" and then configure the shunt resistance and MAX will give back a number that is the calculated current, based on the voltage measured across that shunt. Similarly if config'd as a temperature measurement it will ask for the type of thermocouple and calculate the temperature based on that types linearity equation. In your program you can then do the DAQmx measurement by task name making the program more meaningful when you go back in vs. some device# channel#, etc. MAX and MAX tasks are also a good tool for checking out your NI hardware connections before you have written any code, and for troubleshooting your setup and code when the numbers don't seem quite right.

You should learn to field strip the NI-MAX in the dark, your program may depend on it! Smiley Wink

P.M.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 18 of 26
(1,052 Views)

dennis:

that makes sense to me, and thats what i have been doing...however if i wanted to display say 4 different waveforms, and 4 difference avg voltage values on the front panel and save the values to a spreadsheet, it seems like i need another structure. would the data just pass through? as in display all voltages on one waveform.

lv_pro:

actually i have been playing around with the DAQmx tasks before all of this, it only operates on one channel correct? like would i be able to create a task, that takes the voltage of channels 0-4?

 

thanks guys. much much help.

0 Kudos
Message 19 of 26
(1,049 Views)
First, I want to apologize about some bad information I gave you. The correct syntax for multiple channels is dev1/ai0:4, not ai0:ai4. Second, if you wire the output of DAQmx Read to a graph, all channels will be displayed on a separate plot. Expand the plot legend to change colors, etc. of each individual plot. If you need to, you can do some calculations and add the result to the same graph. The same is true for something like Write to Spreadsheet file. If the input to it is a 2D array with one channel or several, it's still a 2D array and the function will automatically write either one column or several.
0 Kudos
Message 20 of 26
(1,044 Views)