LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting spatial data z = f(y) over time (x) in Labview

For example, I have 5 position measurements (y axis)  taken at 5 points (z axis).
I wish to plot these as a 3-d surface chart as a function of time (an indeterminate length - depends how long I run the labview VI) along the x axis.
 
I wish to only plot 100 time points  at a time (most current to the previous 99 points) and I want this to be like in strip chart mode (i.e. first in first out) ring buffer approach.
 
I am very new to labview so if an explanation could be provided along with a VI, that would really help me in learning how to manipulate arrays.
 
Thank you for taking the time to read this.
 
Bill


Message Edited by ImTired on 12-11-2007 03:40 PM
0 Kudos
Message 1 of 8
(3,562 Views)
Hey Bill,
 
Thank you for contacting National Instruments.  I have created a small example that I believe offers functionality similar to what you are looking for.  I have attached it below.  Take a look, and let me know if you have any questions.
 
Regards,
 
Kevin H
National Instruments
WSN/Wireless DAQ Product Support Engineer
0 Kudos
Message 2 of 8
(3,530 Views)


ImTired wrote:
I wish to only plot 100 time points  at a time (most current to the previous 99 points) and I want this to be like in strip chart mode (i.e. first in first out) ring buffer approach.

Maybe all you need is an Intensity Chart with a history lenght of 100?
 
Can you attach a VI with some typical data?
0 Kudos
Message 3 of 8
(3,523 Views)
Kevin:
 
Thank you so much.  I am now 90% of the way there.
I have modified the vi to use a ramp for the y variables and two x^2 therefore an x to the 4th as a function
to create the 3d plot.
 
But there seems to be a "traceback" problem in that a line is drawn from the last point in the array
back to the first point of the succeeding array.
 
I have attached the modified vi, the surface plot obtained form the modified vi, and 
for comparison, the same function when plotted using MATLAB which does not have
the same problem with the traceback.
 
Any ideas on what I can do to supress the traceback?
 
Thanks for all your help/
 
Bill 
 
0 Kudos
Message 4 of 8
(3,502 Views)

Hey Bill,

Here is what is going on.  Currently, we are plotting the following points:

(0,0,0), (1,.1,.0001), (2,.2,.002) ... (19,2,16)

So it looks like we are only plotting one point per x coord, when in reality we need to be plotting 20 points per x coord to get that parabolic-like shape, and then we need to repeat that to get the image. 

What I have done is modify the example, and instead of using arrays of 100, and I now have arrays of 2000, so we can have 20 x coords per actual x coord. So now, we are plotting:

(0,0,0), (0,.1,.0001), (0,.2,.002)...(0,2,16)

 If that is not very clear, please let me know, and I will see if I can come up with a better way to explain this.

I have attached the code below.

Regards,

Kevin H

National Instruments
WSN/Wireless DAQ Product Support Engineer
0 Kudos
Message 5 of 8
(3,481 Views)
Thank you Kevin.
 
I think I got it from your description, but the attached the code below
did not come through.
 
Could you please try to reply again or maybe I am just not seeing it.
 
Bill
0 Kudos
Message 6 of 8
(3,478 Views)
My mistake Bill!
 
Here it is.
 
Have a great weekend!
 
Kevin H
National Instruments
WSN/Wireless DAQ Product Support Engineer
0 Kudos
Message 7 of 8
(3,448 Views)
Thank you Kevin!
 
You have been most helpful.
 
Feel free to ask me for help with MATLAB or Simulink anytime. LOL!
Now that's something I know!Smiley Wink
 
Bill
0 Kudos
Message 8 of 8
(3,439 Views)