LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display on the graph three or more waveforms where time scale is not an index of array but a real time

How to display on the graph three or more waveforms where time scale is not an index of array but a real time:

 

I measure three voltages Va, Vb, and Vc on my Test stands every 3sec. So I’m building four arrays (Va, Vb, Vc, Time) and combine all in one.

Time

Va

Vb

Vc

0

5

3.5

2.8

3

4.9

3.6

2.9

6

4.8

3.8

2.1

Now I need to show on the graph in which scale X is “Voltage” and scale Y is “Time”.

How can I do it?

 

Thanks a lot,

Boris

0 Kudos
Message 1 of 12
(3,683 Views)
The x axis of a waveform graph is not an index of an array. You must be thinking of an XY graph. In any case, if you are getting three values, it sound like it would make much more sense to use a waveform chart and plot them as they are acquired. The x axis can be set with property nodes to reflect your sample rate. Look at the shipping example called Real-time Chart. I think it does exactly what you want.
0 Kudos
Message 2 of 12
(3,678 Views)
How to display above array as bar graph?
 
My question is similar, but my output need to be bar graph. Thanks!
 
Alyssa
0 Kudos
Message 3 of 12
(3,660 Views)

hi, here is my vi.

 

If you run several  times you will find the problems.

Thanks.

0 Kudos
Message 4 of 12
(3,644 Views)
Can somebody give me a help?
 
When you run this vi, first graph is shown from 0-200, the second graph is continue from the last. But when you run the vi again, display will begin from the right to left. and the original graph won't disappear.
 
What's the problem?
0 Kudos
Message 5 of 12
(3,623 Views)

I cant open your vi since you have 7.1 and I only have 7.0, could you post a screenshot of your block diagram and front panel? Or is it too big?

Im not entirely sure what you want. Do you want a bar for each thing being measured, the amplitude of which is the measurement, and then update that value over time?

Or do you actually want your bar graph to show more bars with time?

Please give a few more details relating to your application, and hopefully a picture of your code.

Jeff


Using Labview 7 Express
0 Kudos
Message 6 of 12
(3,617 Views)
I couldn't run it because your Single Point to Bargraph VI is missing.
 
Whenever something behaves differently on a second run when compared to the first run, it is usually related to an uninitialized shift register.  These would use the default value on the first run of a VI, but would maintain their values from the previous run when you run the VI the next time.  I see you have an uninitialized shift register on the first For loop that has 3 iterations.  I would look there.
 
You may want to set up a flat sequence structure and put the empty array going to the graphs that is at the bottom of your code in the first frame to guarantee that the graphs get cleared before the heart of the program starts running.
0 Kudos
Message 7 of 12
(3,615 Views)
Hi, thanks all your reply.
 
You may find "points_to_bar_graph.vi" from this website, I find it by this way.
 
I will ask a stupid question: I don't have any photo processing software, how can I save the vi into a picture format?
 
So here I just paste it into word document.
Download All
0 Kudos
Message 8 of 12
(3,609 Views)

Hi Jeff,

 

What I want to is exactly displaying every measured data in bar graph over time, the amplitude is the measured data. It seems when time goes on, and more data gathered the more time display takes because labview will  refresh from the very begining point. and when I run this second or more times, it is in a mess.

 

Alyssa

0 Kudos
Message 9 of 12
(3,607 Views)

hi Ravens,

I am quite new to Labview, how to clear the last data effectivelly? As you said at the bottom I have initialized the array.

 

Alyssa

 

0 Kudos
Message 10 of 12
(3,604 Views)