LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graph XY with Labview 6

Hi everybody,
i have Labview 6.0 and I want to produce a XY graph with two inputs that I collect them from multimetrs, but i don't know how to do.
Can anybody help me plese.
I think it is necessary to make a index array but I don't know how.
Can any body send me the Vi?
Thanks
0 Kudos
Message 1 of 9
(3,911 Views)
The examples that ship with LabVIEW should get you started easily. XY graphs take a wide variety of data topologies (e.g. cluster of x array and y array, array of xy-clusters, complex array (newer version of LabVIEW, not in 6.0))
 
Do you want to graph the data after all data is acquired?
In this case you would e.g. create an x and y array in a loop using autoindexing, bundle them after the loop, and feed them to the xy graph.
 
Do you want to update the graph while data is acquired?
Have a look at the xy-chart example that ships with LabVIEW.
 
If the examples don't help you, show us your code and we will fix it for you. 🙂
0 Kudos
Message 2 of 9
(3,902 Views)

First of all I want to thank you for your fast response.

I want to update my XY in the loop.

Here is my code.

I want to connect the 'voltage' and 'frequency' in the XY graph.

Thanks Smiley Happy

0 Kudos
Message 3 of 9
(3,896 Views)

Well, your voltage is an array and your frequency is a single numeric. We need more information.

At each iteration of the loop...

  1. Do you want to add a single point (e.g. the first array element of the voltage vs frequency, the average voltage vs frequency, etc.)
  2. Do you want to add multiple points (each of the new voltages in the array vs the same frequency)?

Attachied is an image of one possible solution (graphing the average voltage vs frequency). Sorry, I no longer have LabVIEW 6.0.

As you can see, I have eliminated the stacked sequence. It is completely unecessary. It complicates the diagram, hides code, and forces backwards wires. Dataflow completely determies the correct execution order.

Growing arrays inside while loops may cause performance issues if the VI runs for extended periods of time and the arrays grow without bounds. There are many slightly more complicated variations that can address these issues. How long does the loop run. Do you need to graph all data or only e.g. the last 1000 points?

Message Edited by altenbach on 10-31-2006 10:13 AM

Message 4 of 9
(3,891 Views)

Thank you for your help,

To answer your question :

          1. I want to add multiple points, that means every iteration I want to add the measured points (voltage and frequency) to my graphXY.

          2. I want to add all the measured points to my graphXY.

I don't need to have an array for voltage but the driver I installed fot the HP34401 reads measurement with array.

Is that possible to change this array to a single numeric (like it is for frequency) ?

Are you sure that the Vi you modifie gonna work with Labview 6.0 ?

Thanks for helping.

0 Kudos
Message 5 of 9
(3,878 Views)


@mysimba wrote:
Are you sure that the Vi you modifie gonna work with Labview 6.0 ?

Of course!

I took all your code and simply eliminated the sequence structure and cleand up the wire routing (no change in dataflow). The only thing I added was the upper code for the xy graph. I don't have LV6.0 so you'll have to do it on your own. Have you tried? 🙂

0 Kudos
Message 6 of 9
(3,874 Views)
No, I didn't try it.
Because I'm tired now and I'm gonna home to relax (it is 19:45 here).
But I will try it tomorrow and I will send you the result .
Thanks and good bye.
0 Kudos
Message 7 of 9
(3,871 Views)
You should also change the representation of the "result" output within "HP 53181A Read Measurement.vi" to DBL. Having this as EXT is just silly. 😉
0 Kudos
Message 8 of 9
(3,868 Views)
Hi altenbach,
I modified my Vi , I added the XY graph and it runs well now.
Thank you very much for your help.
I'm happy for this.
Best regards.
0 Kudos
Message 9 of 9
(3,836 Views)