LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

plotting multiple graphs

am trying to read three analog channels and plotting multiple graphs. see attached sheet and do send me your suggestion to remove the error.
0 Kudos
Message 1 of 11
(4,208 Views)

You need to change more that just the way you are plotting the data. You cannot run multiple analog in tasks. You can only have a single task but you can create a single task with multiple channels. Shown below is one way if you want to have separate min/max values for each channel. If you don't, just have a single DAQmx physical channel control with the multiple channels in it. The for loop can then be eliminated. I chose to use to return a 1D wavefrom type from the DAQmx Read NChan 1Samp and then just wire the output to a chart. If you want DBL returned it will be a 1D DBL array but you can't just wire the array to the chart. If you were to turn on Context Help, when you go to the block diagram and move your mouse over the chart indicator, it will show you the correct inputs for different types of charts. There is also a shipping example for charts that you can look at.



Message Edited by Dennis Knutson on 04-17-2008 06:39 PM
0 Kudos
Message 2 of 11
(4,203 Views)
Hi Dennis,

Thanks for your reply and suggestions. Before i implement this , just wanted to ask if this will allow me to view three analog channels on the SAME waveform chart.
0 Kudos
Message 3 of 11
(4,169 Views)

Hi Mia,

yes you see three analog value on the same wavaform chart.

Mike

0 Kudos
Message 4 of 11
(4,167 Views)

Hi Dennis,

I tired reading and plotting the two analog values on the same axes but its working partially. One of the reading as you will see in the attached VI ( graph in green color ) is working fine . But the red color graph is constantly giving ZERO value, however when i measure it using multimeter it say the voltage is 0.5 V.

I have also tried auto scaling of Y and X axes but will need to know what small error am i making. Using your technique is giving TWO graphs instead of one which can overlap both the curves. I am actually looking for a scalable solution which can allow me to overlap as many graphs as possible on the same axes.

I am using labview8.5.... looking forward to your reply.

0 Kudos
Message 5 of 11
(4,101 Views)
Sorry, I missed one thing. You should place a DAQmx Create Task before the for loop and wire it to the task in of the DAQmx Create Channel.
 
The reason you have two separate plots is that you chose the Stack Plots option. Right click on the chart and select Overlay Plots. The default is overlay so you had to have changed it yourself.
0 Kudos
Message 6 of 11
(4,087 Views)

Dennis, I know i am asking silly questions... but it will really help if you can send me a image file or paint file so that i can correlate to your senteces and labview programming.

Thanks

0 Kudos
Message 7 of 11
(4,073 Views)

Hi Miaa,

attached is your vi, with the additional "create Task.vi".

Mike

0 Kudos
Message 8 of 11
(4,063 Views)
Hi there,
will it make a difference from conceptual point of view if i place both values of FOR loop to be of same value ? say for example if i run both FOR loop for 400 iterations.
 
or
 
make three different FOR loops on the left hand side ( each with its own min,max , i/o , and AI  channel ) and then link it to DAQmx play button.
 
thanks for making me learn more about labview concepts.....
0 Kudos
Message 9 of 11
(3,962 Views)
Hi Miaa,
i´m not sure if i understand what you want. The left for loop is to configure your physical channels, so why should this loop run 400 times? You can remove the left for loop and insert three "Create physical channel" vi´s but why?
 
Mike
0 Kudos
Message 10 of 11
(3,957 Views)