LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do i display multiple plots on one chart?

Solved!
Go to solution

Wow, really elegant.

 

About the multi plot chart, you were right. I had also bundled my data sources, but I connected them to property node (value) without using any "active plot" (thinking that it will give effect to all the plots' values). And in the attempts when I had connected source directly to Waveform terminal, I had made "array" instead of "cluster" so it didn't work.

 

After your first reply, I made the changes and was about to upload my version (with a doubt about the event structure for value change of channels, as it stops execution), but your second reply with everything in the event structure is much more effecient.

 

Nevertheless I am sending you my version, which is less elegant than your, but works the same (except that in this version also, it will check for channel status in each loop, because when I put that piece inside an Event structure, the execution halted after 1st cycle). Any suggestions/remarks for why the code of channel's visibility would not work inside an event structure?

 

Thank you for the detailed help and code!

 

Vaibhav
0 Kudos
Message 11 of 21
(11,381 Views)

Vaibhav wrote:

... because when I put that piece inside an Event structure, the execution halted after 1st cycle). Any suggestions/remarks for why the code of channel's visibility would not work inside an event structure?


It does work, as you can see by my example. 🙂

 

Maybe you can attach your code that does not work and we can figure out what's wrong.

0 Kudos
Message 12 of 21
(11,374 Views)

Yes Altenbach,

your code works and I had put the channel value change as the only event. may be that was the problem. after i put the Waveform value passing in an event, the code started working.

 

I am sending both the codes - that worked and that had problems.

 

Looking for your remarks.

Vaibhav
0 Kudos
Message 13 of 21
(11,363 Views)

If you only have an event for the channel selectors, the loop will stall until the event fires.

This is dataflow. The loop can only finish the current iteration if all elements in it have finished, including the event structure.

 

You can make the event structure "transparent" by adding a timeout event with zero ms, but that seems silly.

 

Typically, if you have a loop that needs to spin at a certain rate, it should not contain an event structure. You can place the event structure in a second, parallel loop that does nothing else but wait for user interactions. Or you can use my example and use the timeout event to pace the loop.

 

 

Message 14 of 21
(11,356 Views)

altenbach wrote:

If you only have an event for the channel selectors, the loop will stall until the event fires.

This is dataflow. The loop can only finish the current iteration if all elements in it have finished, including the event structure.


Yes, that's what I have done in  my another program that we discussed in another thread few weeks ago, regarding accessing a control's live status inside event of another control.

 

 


altenbach wrote:
Typically, if you have a loop that needs to spin at a certain rate, it should not contain an event structure. You can place the event structure in a second, parallel loop that does nothing else but wait for user interactions. Or you can use my example and use the timeout event to pace the loop.

 

Yes, that's how I changed my this program if you saw the Chart Properties.vi

 

Thanks again for your time and help.

 

 

 

Vaibhav
0 Kudos
Message 15 of 21
(11,339 Views)

Hi Altenbach,

I made some more enhancements in that VI and tried to experiment with setting color. But I cannot change the colors programmatically, of the second and third channels. I can only change the first channel colors. I tried several options in the programming, but no effects. Even tried to change the order of calling events. Also, tried to send the color values in cluster (like the cluster of input data), but no effect. I tried to put all the plots color properties in single node (with separate input for each channel/plot) but no effect.

 

Any clues?

 

 

Vaibhav
0 Kudos
Message 16 of 21
(11,269 Views)

Dear all,

 

Is it possible to change the chart from single chart (overlay) plot to stack plot while the program is running? I know i can only do that before the program is run.

 

Is there a node property that can do this?

0 Kudos
Message 17 of 21
(10,937 Views)

Try this as a start 🙂

You have to first select a plot and then set the properties of that plot.

0 Kudos
Message 18 of 21
(10,936 Views)

I don't think you can change a chart from "stack plots" to "overlay plots" at runtime.

 

You could do both and switch which one is visible, for example. If you don't show the y axis and all plots have similar range, you could also just increment each plot by a fixed amount to simulate a stacked plot.

 

(You really should always start a new thread instead of appending to an old thread that is already marked as solved. Now you don't get a chance to mark a solution). 

Message Edited by altenbach on 04-18-2010 10:06 AM
0 Kudos
Message 19 of 21
(10,876 Views)

Regarding this problem, I am having the same one too. I am using Labview 10 and im very new to this software.

I have 2 analog signals , so how do i use the multiple plot / multiple graphs functions in Labview, so that when i move the cursor on the chart, itwill give me both values from my 2 signals.

 

Hope i expressed my question right.

 

Thanks in advanced.

0 Kudos
Message 20 of 21
(10,537 Views)