LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continous plotting

Hi all,

 

I have some questions on the function of X-Y Graph based on the coordinates i obtained from my device. 

 

1) How do i plot these points (x-y coordinates) onto the graph at an interval of 1secs. Based on my first attachement (Interval Plotting), I set my time interval measurement into 1 sec, subsequenly how do i convert the data i obtained after every 1 sec to something which can be plotted onto the graph? 

 

2) On top of the functions i wish to achieve in (1), how do i set the frequency of the graph I am using? 

 

Please kindly advise, thanks!

 

Regards,

Scott

 

  

0 Kudos
Message 1 of 4
(2,577 Views)

The thing to remember about XY graphs is that you are simply plotting some number or datapoints where each point is defined by an X value and a Y value, consequently the plot has no measurement interval.

 

Say the x values are time. Depending on the x values in the data two points might be 2 seconds apart, while the next two are 2 minutes apart -- the plot doesn't care, it's just plotting points define by X and Y values.

 

So, if you want to have 1 sec interval between measurements make sure you collect it that way and use the time that the measurements occurred as the x values.

 

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 2 of 4
(2,567 Views)

Hi Scott,

 

I assume that you want to plot a point defined by X Y coordinates on the XY graph every second. Here is one of the ways to do it.

Continuous XY Plot FP.pngContinuous XY Plot.png

 

However, please note that I am building an array (since XY Graph plots a cluster of X and Y Arrays) inside a loop. This is not an efficient way of handling memory. A better way would be to initialize an array before getting into the loop with a good estimate of the final size of your array (no. of iterations that you are expecting your loop to run), and replace elements in that array instead of building the array.

 

Let me know if this helps.

Chinmay Anand Misra
CLD
Technical Marketing Engineer
NI IndRA
0 Kudos
Message 3 of 4
(2,563 Views)

As I interpret the question, you have not answered it. You have given the OP a graph of 1-D coordinates(y) vs. time(x) instead of X and Y coordinates, refreshed each second.. For 2-D coordinates, you can either create an XY graph, where a point is added each second, or a 3-D graph, with the third axis as the time. Examples of both are here:

 

X-Y_graph.png

 

I haven't worked with 3-D graphs much at all, so you'll have to play with this one to make it look like you would like (it keeps flip-flopping from the graph you see to a nice looking one and back). Perhaps someone else can give you clues about that.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 4 of 4
(2,539 Views)