LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting two different analog inputs onto a graph

I basically need to measure the band gap of a semiconductor, for which I need a graph of temperature v/s reverse  saturation current. I'm using an LM35 to get the temperature reading through one channel as analog input, and taking in voltage through another channel. I basically need to plot these two against each other as I vary the temperature, so I need a number of data points as I reduce the temp from 80 to room temp, but am getting confused about how to do so.

 

How exactly am I supposed to take in a large number of input values from both these channels and plot them on a single graph to get a straight line. (I need to measure the slope of the line). 

0 Kudos
Message 1 of 10
(9,321 Views)
Turn on context help, hover over the terminal for the XY graph on the block diagrem, and look the different ways to connect data to it.  Also look at the example XY graph.vi in the example finder.
0 Kudos
Message 2 of 10
(9,314 Views)

I tried putting two DAQ assistant icons on the block diagram, one with an RSE input from the LM35 and the other with a differential input from across a resistor, and I put the outputs of both into a bundle . I put the whole thing into a while loop with a boolean switch, and I attached the output of the cluster to an XY graph outside the while loop. I want the thing to get the reading of temp and voltage as I let the temp drop from 80 to 32, and then plot the whole thing as line on the graph. I dont know if this is the way, but whenever I try to run it, it says that resources is reserved or something, for each of the DAQ assistant icons...

 

What am I doing wrong? 

0 Kudos
Message 3 of 10
(9,290 Views)

If you get an error code, it helps to post that as well.

 

Search the forums for the error code you are getting.  You'll find numerous message threads talking about it.  You can't have two DAQ assistants.  You need to combine your two channels into a single DAQ assistant.  Why?  Because there is only one timing device on your DAQ card, so when you create two separate tasks that want to share that card, you get an error.  If you create two channels into one task, then you won't get the error.

0 Kudos
Message 4 of 10
(9,272 Views)

It sounds like you might need a chart, not a graph. Did you know that you can simply bundle two items to a chart? Look at this example where I plot two numbers...

 

Message Edited by Broken Arrow on 04-13-2010 09:22 AM
Richard






0 Kudos
Message 5 of 10
(9,261 Views)

Ok...so i put two channels into one task so that i can get their analog inputs simultaneously, and then I've used indexing arrays to break up the data and plot them into the x and y input of an xy graph, so that I can plot them against each other. I've also taken a branch from each of the seperate channels and plotted them on a waveform graph. I've put the whole thing in a while loop, so that when I run it there's a continuous output on the graphs which keeps changing continously. Now these are my problems:

 

1) One of the inputs is supposed to be 320 mV, which it is coming when i check  the automation explorer, but when I plot it on the waveform graph, it comes lower around 200mV. 

 

2) I want to cool the sensor from 80 to 35, and then plot one input against the other. So how do I store the data from each iteration until I can see that the temp has dropped to 35 and then plot all the acquired points onto a graph? How exactly do i configure the channels(continous samples, N samples?) and how do I display each iteration and store all of them till I switch off the loop and then the graph gets plotted using all the aquired points?

 

...Sorry for the bad grammar. 

0 Kudos
Message 6 of 10
(9,230 Views)

Hi,

i need some help with my project. I needed to measure the output from 2 sensors (both are the same type of sensor and have roughly the same output, depending on the stimulus). Puting both in one DAQ (in different channels) is not really working out because if i stimulate one, both the graphs change. I tried adding a offset voltage on one channel and separating them, but it somehow ends up on both channels in the waveform graphs. I have Labview 7.1 and using 2 while loops for 2 DAQs doesnt work.

 

Any advise on this matter would help.

thanks

0 Kudos
Message 7 of 10
(9,154 Views)
You should really start a new thread rather than hijacking someone else's.  When you do, post your VI so we can see what you are trying to do.
0 Kudos
Message 8 of 10
(9,137 Views)
sorry about that. new to this and i thought that it was a similar problem.
0 Kudos
Message 9 of 10
(9,126 Views)

Well, you are going to have to use a single DAQ read. Other than that I'm not sure what the exact problem is. The original subject was about using the same graph and it seems you are talking about different graphs so I'm not sure why you even posted here.

 

Please explain in some detail what it is you want to accomplish and what it is that you are having problems with. Attach your code or an example that demonstrates the issue.

0 Kudos
Message 10 of 10
(9,123 Views)