LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Chart

I am trying to plot  movement of a point in xy chart. i have x y values. everytime the update happens the point moves to the next xy but i am not getting the entire plot that is history? like a path tarversed on every update...help me

0 Kudos
Message 1 of 6
(3,326 Views)
There is no such thing as an xy chart. It is a graph that requires you to build an array of values to retain previous points. If you use the Express graph, make sure the reset is not set to true. A shift register with a build array is often used with the regular xy graph.
0 Kudos
Message 2 of 6
(3,296 Views)
A couple things to bear in mind:

1. What is the update rate? If you are updating at a high rate, appending to an array of data points can be slow.
2. How long a memory do you want to have? Again, you can consume a lot of memory.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 6
(3,285 Views)

@depakroshanblu wrote:

I am trying to plot  movement of a point in xy chart. i have x y values. everytime the update happens the point moves to the next xy but i am not getting the entire plot that is history? like a path tarversed on every update...help me


If you are not getting the result you want, your program is flawed. As a first step, attach your VI so we can see what you are doing wrong. While there are dozens of ways to do it correctly, there are millions of ways to do it incorrectly, so don't keep us guessing. 😄

 

Do you want a fixed history lenght? Where is the data coming from? What is the data rate? Is the x and y range well defined? If you want to graph an infinite number of points, another option would be to use an intensity graph and manipulate the pixels as you go. This is guaranteed to use a fixed memory amount.

 

 

0 Kudos
Message 4 of 6
(3,272 Views)

Have a look at the XY graph examples provided and use the xy-buffer.vi 😄

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 6
(3,209 Views)

Yeah I saw someone simulate motion with an XY graph.  I don't think it would have been the way I did it, but it was cleaver and worked mostly well.

 

The developer needed a way to show a road more or less.  It had two parallel lines and the car was supposed to drive in between the lines.  The two parallel lines would then move to the right or left together, but always pointed up, more like changing lanes I guess.  The car was a dot at the bottom of the XY graph and could move left and right using a slider.  The reason he choose a XY Graph is because he could simulate motion, simply by changing the Y scale of the graph.  He would start by drawing the whole road and putting it on the graph, but then set the Y scale to be between 0 and 10, then as time when on between 0.1 and 10.1.  The only thing that needed to be re-drawn was the car, because now it sits at 0.1 instead of 0.

 

The update rate was good enough, but had a few bugs.  If it were me I would have chosen a 2D picture, but that would have likely involved more resourcing in drawing, but more control over how it was displayed what you saw.

 

EDIT:  I justed to that person and apparently they used the XY cursor for the car so they didn't need to draw the point.

0 Kudos
Message 6 of 6
(3,160 Views)