LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting 2 arrays

Hi all
 
I have 2 separate 1D arrays, i need to plot between X and Y axis.please help me with this
 
Thanks
veeru
 
0 Kudos
Message 1 of 52
(3,747 Views)
If you would simply turn on Context Help, you would see this when you move your mouse over a graph indicator. To plot two 1D arrays, use the Build Array function to create a 2D array.
 
 
 


Message Edited by Dennis Knutson on 03-30-2008 07:52 PM
0 Kudos
Message 2 of 52
(3,735 Views)
If one array is X and one array is Y, bundle them into a cluster an wire to an xy graph terminal.
 
0 Kudos
Message 3 of 52
(3,728 Views)
I tried but its not working out
0 Kudos
Message 4 of 52
(3,722 Views)

I have ttached my program, it may seems too lengthy

In that program from Frame 2 I will get an array and from 3 i will get the other array, i need to plot between these two( i am doing this bit in Frame 4)

Please help me  with this

 

0 Kudos
Message 5 of 52
(3,721 Views)

So, you want an XY Graph? You want to plot one array versus another? Then wire up your bundle function to an XY Graph. You don't have anything wired to it right now.

p.s. There's absolutely no reason to use the sequence structure in your program. It's just making it hard to read.

0 Kudos
Message 6 of 52
(3,712 Views)

Thanks Everyone

Dennis I have wired the bundle to XY Graph, the output waveform is not correct

 

0 Kudos
Message 7 of 52
(3,703 Views)


Veeru wrote:

Dennis I have wired the bundle to XY Graph, the output waveform is not correct


Maybe you could tell us what kind of result you are expecting. You cannot blame the xy graph if you feed it the wrong data. 🙂
 
In any case, your VI is extremely convoluted. Your sequnce has no purpose and you have three instances of basically the same code. If you place that in a FOR loop with N=3, you can fit the entire code on a postcard. 🙂
Stacked sequences are very distracting because they hide code and sequence locals often force right-to-left wires. There is no reason to force execution order with a sequence. Execution order follows natually from the dataflow.
 
Here's the same thing simplified. also inclding the xy graph. Maybe it can give you some ideas to simplify your code.


Message Edited by altenbach on 03-30-2008 11:22 PM
0 Kudos
Message 8 of 52
(3,697 Views)

Thanks very much

The reason i repeated 3 times is the signal which i have named as torque is going to be acquired to from test.

Theta is the position information from sincos and i have to plot that with torue signal,so the output is something like the torque signal.

Thanks

 

 

0 Kudos
Message 9 of 52
(3,664 Views)
Sorry, but I have no idea what you just wrote... 😉


Veeru wrote:
The reason i repeated 3 times is the signal which i have named as torque is going to be acquired to from test.
To repeat things, we use a loop and not duplicate the code N times. How may time do you really need to e.g. calculate "x/2+1" for the same value of x. Once is enough! 


Veeru wrote:
Theta is the position information from sincos and i have to plot that with torue signal,so the output is something like the torque signal.
I cannot understand what you are saying. What is the meaning of "something like"? What is X? What is Y?
 
Do you have a link describing the experiment setup and the math behind it?

0 Kudos
Message 10 of 52
(3,642 Views)