LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add plot areas?

Hello,
I use Labview 6.1 to expand chart plots as the attachment. The problem is that I could only add more plot areas with the legend resize before vi running. For example, now it displays 4 plot areas, signal 1 and 5 will display at one plot area if there is 5 input signals. The "Plots Shown" or legend height properity didn't work. Only the legend width can work.
Any suggestion to do this? Thanks!

Regards,
George
0 Kudos
Message 1 of 14
(3,985 Views)
No, you can not add / remove plots on a Chart during runtime. You need to create multiple charts, each with desired # of plots.

-Joe
0 Kudos
Message 2 of 14
(3,985 Views)
The only ways I know to do what you want to do is 1)to create your own graphs using a picture control and the drawing functions (It is a lot of work.) or 2)to create your own offsets in an overlayed chart, turn off the scale and build your own scale with a picture control (also a lot of work).

You might think that you could control a remote panel using the vi methods, but you will find that, since the Waveform Chart is a restricted type, you cannot control the number of visible plots with the "Legend:Plots Shown" property remotely. In fact, the only way I have found to control this property is by dragging the size buttons on the legend box when the vi is not running. It seems like something that could be improved by NI. In fact, given that the "Legend:Plots Sh
own" property has characteristics that indicate you can write to it, it appears that this is actually a bug in LabVIEW. The other possibility is that I don't yet know the "trick" to implementing this property.

Sorry, but, unless you find someone who has already done the work, you must create your own display to achieve the behavior that you desire.

-jayme
jc
Mac 10.4
LV7.1
CLD
0 Kudos
Message 3 of 14
(3,985 Views)
Hello Joe Guo and Jcrooke,
Thank you for your message!
I added many charts for different situations previously in my software. I'm tired of this method.
I prefer to wait for other methods. I'll try Jcrooke's suggestions in the future when I have time.

Best regsrds,
George
0 Kudos
Message 4 of 14
(3,985 Views)
A question for you. Do you need to have each trace display on a separate chart. It is a relatively straight-forward application to have one or more traces display on the same chart simultaneously. Under these conditions, you can select any/all traces on or off with a simple switch on the front panel. This way, you also get the higher resolution of a single larger graph.
If you decide that you might like to do this, and can not get it to work, drop me a note here. I have several applications in the field that do exactly what I have described.

Good luck with your project.

Dave
0 Kudos
Message 5 of 14
(3,985 Views)
> You might think that you could control a remote panel using the vi
> methods, but you will find that, since the Waveform Chart is a
> restricted type, you cannot control the number of visible plots with
> the "Legend:Plots Shown" property remotely. In fact, the only way I
> have found to control this property is by dragging the size buttons on
> the legend box when the vi is not running. It seems like something
> that could be improved by NI. In fact, given that the "Legend:Plots
> Shown" property has characteristics that indicate you can write to it,
> it appears that this is actually a bug in LabVIEW. The other
> possibility is that I don't yet know the "trick" to implementing this
> property.
>

There are certain things that require the V
I to be recompiled, so they
cannot be carried out on a VI that is executing or reserved. To change
this will take lots of work and may happen, but I wouldn't wait for it.
If you will be running the VI in a development system and not an EXE
or DLL, you can look at using subPanels or dynamically loaded panels
that are edited using the legend properties when idle and then shown to
the user.

Greg McKaskle
0 Kudos
Message 6 of 14
(3,985 Views)
Hi Greg,
Thank you for your reply!
I don't understand how to use "subPanels or dynamically loaded panels that are edited using the legend properties when idle and then shown to the user". Can you tell me more what kind of legend properties can be used to control the display number of the plot areas in stack plots?

Best regards,
George
0 Kudos
Message 7 of 14
(3,985 Views)
Hi Dave,
Thank you for your reply!
In one chart, the software can display the selected traces. The problem is I need a "stack plots" like user interface and hope the number of plot areas can change alonge with the number of input signal during running time.
I believe Jcrooke's method of using picture control is a solution for it. Because it needs a lot of work, I didn't try it.
It seems that you have simple method to handle this. Can you tell me?

Best regards,
George
0 Kudos
Message 8 of 14
(3,985 Views)
George Lee wrote:

> Hello,
> I use Labview 6.1 to expand chart plots as the attachment. The problem
> is that I could only add more plot areas with the legend resize before
> vi running. For example, now it displays 4 plot areas, signal 1 and 5
> will display at one plot area if there is 5 input signals. The "Plots
> Shown" or legend height properity didn't work. Only the legend width
> can work.

I use graphs for such things. They allow dynamic number of plots and an
intelligent global VI manages my plots chart memory. Works usually very
well.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 9 of 14
(3,808 Views)
George Lee wrote:

> Hi Dave,
> Thank you for your reply!
> In one chart, the software can display the selected traces. The
> problem is I need a "stack plots" like user interface and hope the
> number of plot areas can change alonge with the number of input signal
> during running time.

No go for a lot of reasons. The first one is the inherent allocation of
the chart buffer in a chart control. The second one is that each plot
area has things like scales and other data which needs to be allocated
for. The way the chart control is implemented these are all things which
require a recompile and you can't recompile a running VI nor can you
recompile in an executable.

> I believe Jcrooke's method of using picture control is a solution for
> it. Be
cause it needs a lot of work, I didn't try it.
> It seems that you have simple method to handle this. Can you tell me?

Well, it is indeed a lot of work and I would not attempt to even try to
do it. It seems to much work in comparison to what you get. What I did
in the past was a screen with 1, 4, and 9 graphs on it and depending on
the user selection, I displayed them accordingly. The data was
maintained in an intelligent global (functional global VI) to allow for
chart behaviour. It used a circular buffer internally, to avoid
performance loss due to moving all the data everytime new data was
added. Worked perfect and the only heavy work was the functional global
VI with its circular buffer but that is something which can be done in a
day or two.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 10 of 14
(3,808 Views)