LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY graph trail

Hi,

I want to display two signals in an XY graph (contineously) But i don't
want a single dot, i want a trail of at least 100 points (that keeps
coming and going), i'm aquiring data with a sample rate of 500 Hz and
don't want to put 100 elements of my shift register in the while loop to
obtain al the (before) aquired data points. Is there any other
possibility to do this?

Thijs
0 Kudos
Message 1 of 6
(1,140 Views)
There's nothing that I'm aware of that will do this for you, and the shift
register method you don't seem to like is trivial. Certainly compared with
writing an ActiveX control that internally will be doing the same thing in
any case.

Just have an array 100 elements long that cycles via your shift register,
rotate it one element on each iteration and replace the last element (which
will be the first, having wrapped around from the beginning) with your new
datapoint, and massage the resulting 100 point buffer into your plot.

Thijs Boeree wrote in message
news:3A06AC07.9B445D42@amc.uva.nl...
> Hi,
>
> I want to display two signals in an XY graph (contineously) But i don't
> want a single dot, i want a trail of at least 100 points (that keeps
>
coming and going), i'm aquiring data with a sample rate of 500 Hz and
> don't want to put 100 elements of my shift register in the while loop to
> obtain al the (before) aquired data points. Is there any other
> possibility to do this?
>
> Thijs
>
0 Kudos
Message 2 of 6
(1,140 Views)
Asuming you build a while loop yo firs create a shift register, you should
wire an empty array constant to it. In the while loop you paste one "build
arrray". Pop-up on it (right click) and select "change to array", wire the
left shift register to it. After that add a new conection to de "build
array", Pop-uo on it and select "change to element". To this new connection
wire the value new value to be added. Wire tha output of "build array" to
the graph and to the rigth shift register.

I hope this solve your problem, if I did not make my self clear I can send
you a demo VI, o you can send me your VI

Good look.

Alejandro Zepeda
Mexico
0 Kudos
Message 3 of 6
(1,140 Views)
Thijs Boeree writes:

> Hi,
>
> I want to display two signals in an XY graph (contineously) But i don't
> want a single dot, i want a trail of at least 100 points (that keeps
> coming and going), i'm aquiring data with a sample rate of 500 Hz and
> don't want to put 100 elements of my shift register in the while loop to
> obtain al the (before) aquired data points. Is there any other
> possibility to do this?
>
> Thijs

Thijs,

I'd use an array of 100 elements and remove the oldest data.

Your description sounds a little bit like you are asking for a "normal
chart" in continous update mode (the last of the 3 possibilities).

Johannes Nieß
0 Kudos
Message 4 of 6
(1,140 Views)
I am a bit new with the programm can you explain to me how i do this? Do i
need to make a for loop with a shift register?
Thijs

Johannes Niess schreef:

> Thijs Boeree writes:
>
> > Hi,
> >
> > I want to display two signals in an XY graph (contineously) But i don't
> > want a single dot, i want a trail of at least 100 points (that keeps
> > coming and going), i'm aquiring data with a sample rate of 500 Hz and
> > don't want to put 100 elements of my shift register in the while loop to
> > obtain al the (before) aquired data points. Is there any other
> > possibility to do this?
> >
> > Thijs
>
> Thijs,
>
> I'd use an array of 100 elements and remove the oldest data.
>
> Your description sounds a little bit like you are asking for a "no
rmal
> chart" in continous update mode (the last of the 3 possibilities).
>
> Johannes Nieß
0 Kudos
Message 6 of 6
(1,140 Views)
> I want to display two signals in an XY graph (contineously) But i don't
> want a single dot, i want a trail of at least 100 points (that keeps
> coming and going), i'm aquiring data with a sample rate of 500 Hz and
> don't want to put 100 elements of my shift register in the while loop to
> obtain al the (before) aquired data points. Is there any other
> possibility to do this?
>

You may want to check out the subVIs for the XY chart examples. It basically
does what you describe, but in a subVI, meaning that your top level VI stays
simpler. The example is General/graphs/charts/XY Chart.vi, or very
close to
this.

Greg McKaskle
0 Kudos
Message 5 of 6
(1,140 Views)