LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xy plot properties

Hi There,

I'm relatively new to Labview. I am trying to create an intensity versus position plot. I have a linear actuator moving a laser source toward a detector, as the source get closer to the detector, the detected intensity will rise. So I'm am trying to plot the relationship.

What I need help is how to set the XY plot such that it will only show positive position and intensities regions, and how to keep previous ploted points on the graph as I move the laser source to the detector so I could save an intensity vs position profile.

Thanks a lot

Brian

0 Kudos
Message 1 of 3
(2,615 Views)
There are a couple of ways of doing this:
 
First, if you know the number of points that are going to be displayed beforehand (even approximately) you can pre-initialize an array of that size and pass it into a shift register. As you acquire new data points, insert them into that array and display it accordingly.
 
The second method, which is much less efficient (causes frequent memory reallocation) requires you to use the Build Array.vi in order to add a new point to your array every time it is acquired.
 
See the attached example of both of these methods. You will obviously have to modify the code to fit your situation, as I dont know many of the specifics of your application. There are almost definately better ways of implementing what I did, but this is the quick and dirty way. In the event this is not what you wanted, at least it draws a cool shape.Smiley Very Happy
Jeff


Using Labview 7 Express
Message 2 of 3
(2,597 Views)
Hey thanks a lot, this has solved my problem!

Cheers,

Brian
0 Kudos
Message 3 of 3
(2,592 Views)