LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed for using Waveform graph indicator

I am making a VI that plots y=Ax^2 + B, where all the variables are controls, also the Vi should use front panel control to enter the no. of points N to eavaluate the polynomial over the interval x0 to x n-1. I want to plot y vs. x.
 
This is where i am getting confused?Smiley Sad does N means the no. of loops(for loop) i want the VI to run. i am not able to plot y vs. x???
Please help with both these problems.
 
Thanks for any help..........
0 Kudos
Message 1 of 11
(3,785 Views)
attached is the VI...........i am using so far..
0 Kudos
Message 2 of 11
(3,780 Views)
Is this a school project?
 
X will vary, so it should not be a front panel control, but calculated from the iteration terminal of the loop.
 
A and B should go outside the loop, they should not change during loop execution
 
Inside the loop calculate x and y for each [i]. They will turn into arrays at the loop boundary, containing the set of X-values and Y-values for the graph. Now use an xy-graph to plot y vs x.
 
See how far you get. 🙂 Check the online help and the LabVIEW example finder for more ideas.
0 Kudos
Message 3 of 11
(3,776 Views)

Thanks for the help. I think i got it...........

 

0 Kudos
Message 4 of 11
(3,772 Views)

hi,

 

I got confused again, as to what i am using is correct or not? please let me know whether it is correct. My confusion is about the values of "x".

Thanks again,

 

0 Kudos
Message 5 of 11
(3,767 Views)
at the transit of the for loop an array will be created with the value of the For Loop counter (number of iterations)

regards
timo
0 Kudos
Message 6 of 11
(3,762 Views)
First of all, you should remove the timing node. There is no need to slow down the calculation. 😮
 
Currently, you use [i] directly for x, which is often a bit limiting. You should calculate and x based on [i] instead. (for example" x=0.1*[i] or x=[i]-50, etc. depending on the x-values you want.)
 
Of course a much simple version of your code would be:
  1. Use the Ramp Pattern to generate the desired x values (inputs are: start x, end x, number of points).
  2. Use the polynomial evaluation function with the x-array and the [ABC]-array to generate the y-array.
  3. graph it! Just bundle the x- and y-arrays and feed the cluster to the xy graph. No need to go through the express node.

Happy wiring!

Message 7 of 11
(3,754 Views)
Thanks for the help..
0 Kudos
Message 8 of 11
(3,746 Views)
Thanks..
0 Kudos
Message 9 of 11
(3,676 Views)

i got that, could you please chek it for me.

 

Thanks...

0 Kudos
Message 10 of 11
(3,743 Views)