LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically Changing Number of Channels in Chart

Hi,

I have a simple question about a labview programming issue. I am
trying to modify an NI Example program for demonstrational purposes.
I am using the Multi-plot real-time chart example program (link below)
from the NI website. I have changed your example for the chart to
display the data in the stacked plot mode. How could I modify it to
vary the number of traces dynamically. Is this possible? My goal
would be to use a series or radio buttons to control viewing 4, 8 or
16 channels, in real time. All of the code and programs I have seen
have channel display statically in the begining setup. Is there a
property node of the chart that controls this?

Thanks
John

http://zone.ni.com/devzone/explprog.nsf/6c163
603265406328625682a006ed37d/5ac3fd88cb3815f086256657007542ee?OpenDocument
0 Kudos
Message 1 of 4
(2,577 Views)
There's not really a property node. I've done this before, but it's not exactly straight forward. If you stretch the window that shows the trace names and colors, you can show more trace names and colors. Make sure that this is big enough to handle the max number of traces that you'll need.

Next, in your code, make a property node for the chart. You'll need to set all the trace colors to transparent to begin with, then change them to a predefined color depending on how many traces you have. You do this by using the property node, setting the active plot, then changing the color (and name, too). Then you just wire the plots to the chart, and it should display it. I can show you some of my code that performs these functions if need be.

Mark
Message 2 of 4
(2,577 Views)
Mark,

I would appreciate if i could see some code. Would you please email
it to my hotmail address.

Thanks
John

On Mon, 4 Feb 2002 07:40:27 -0800 (PST), markwysong
wrote:

>There's not really a property node. I've done this before, but it's
>not exactly straight forward. If you stretch the window that shows
>the trace names and colors, you can show more trace names and colors.
>Make sure that this is big enough to handle the max number of traces
>that you'll need.
>
>Next, in your code, make a property node for the chart. You'll need
>to set all the trace colors to transparent to begin with, then change
>them to a predefined color depending on how many traces you have. You
>do this by using the property node, setting the active plot, then
>
changing the color (and name, too). Then you just wire the plots to
>the chart, and it should display it. I can show you some of my code
>that performs these functions if need be.
>
>Mark
0 Kudos
Message 3 of 4
(2,577 Views)
John,

Seems I may have not completely read your post correctly, so I apologize. My code had been using charts in the overlay mode, not the stacked plot mode. With the stacked plots, the wiring to the chart must be a cluster. In LabVIEW, a cluster must be defined with a certain number of elements, and it can't be changed on the fly like an array (add an element). So there's not a property node that you can set to change this.

You can do what you want if the chart is in overlay mode, but not stacked. Sorry for the confusion on my part.

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