LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

real time graph

I am using labview 6.0. I have done a number of programs. All my programs save the data and plot the graph towards the end of the program. I understand labview 6.0 can plot the graph in real time i.e. each point as the data comes in on the graph. Can someone sent me a very simple example of this in labview 6.0?
0 Kudos
Message 1 of 10
(4,629 Views)
To plot as soon as data is available, you use a chart - not a graph. Assuming that you've got some kind of loop that is acquiring data, the chart goes inside the loop and the data acquired is wired directly to the chart. Look at the shipping example called Charts. Three are also some data acquisition examples that plot data to a chart.
Message 2 of 10
(4,614 Views)

You can plot real time data on an X-Y graph. I have done that a lot as I personally prefer graphs to charts. Exactly how you do it depends on exactly how you are acquiring data. You talk about your program saving data as it acquires it. You will probably add code to update the graph every time you save data. Your data will have to be structured properly to write to the graph indicator, but you must be doing that anyway now at the end of the program. Maybe all you need to do is include your existing graph update code at the data save point.

If you're having trouble structuring the data properly, add a post here to say that and I can provide a version 6.0 example, but I think you seem to be having difficulty knowing how to place the graph update code into the data acquisition and save code. I might need more details on that to provide a useful example.

Message 3 of 10
(4,610 Views)
My x-y graph is outside the loop. After my program has executed, labview prompts to save data in file. I select the file. Labview saves all collected data and immediately plots the graph. Can this be modified to plot each data pont as it arrives and also saves all data in a file.
0 Kudos
Message 4 of 10
(4,592 Views)
Yes.
Message 5 of 10
(4,587 Views)
If I move the x-y graph inside the loop, I will not be able to plot other graphs from other frames. The x-y graph need to be outside the loop to be used as a common indicator for all the frames.
0 Kudos
Message 6 of 10
(4,558 Views)
Hi LV1958,
"If I move the x-y graph inside the loop, I will not be able to plot other graphs from other frames"...
 
Instead of "frames", I suspect you mean "cases".  Perhaps you have multiple cases, each with its own data-producing loop?  IF so, create LocalVariable copies of the chart, put one copy in each loop.
 
If this doesn't help and/or you have more questions on the subject, it might be helpful if you were to post a GIF.
 
Cheers.
  
 
 
When they give imbeciles handicap-parking, I won't have so far to walk!
Message 7 of 10
(4,540 Views)
How do I create copies of LocalVariable of the chart?
0 Kudos
Message 8 of 10
(4,520 Views)

Hi,

I believe that what he meant by "copies of local variables of the chart" are several local variables of the same chart. Just rigth click on the chart and create as many local variables as you need.

Please correct me if I'm wrong!

Isabel

Message 9 of 10
(4,517 Views)

Hi Isabel,


 


... I believe that what he meant by "copies of local variables of the chart" are several local variables of the same chart. Just rigth click on the chart and create as many local variables as you need.

Please correct me if I'm wrong!

Isabel


You're quite right, that's what I meant -  but didn't express clearly.

Thanks Smiley Wink 

When they give imbeciles handicap-parking, I won't have so far to walk!
Message 10 of 10
(4,495 Views)