LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple plots using for loop

Hi:

 

I need to multiple unique xy graphs on the same page.  Easiest way would be to use a for loop.  The problem is I cannot figure out how to use the graph property node to create a new graph for each loopp cycle?  Is this even the way to do this?  BTW I have labview 6.1. 

 

Thanks

0 Kudos
Message 1 of 13
(4,489 Views)

Howdy,

 

Sounds like you are wanting functionality found with LabVIEW Scripting which is supported with LabVIEW 8.6 and above. However, other users have found different ways, see the programmatically add front panel objects forum thread. Best of luck!

Message Edited by DiscoBall on 11-30-2009 10:49 AM
Message Edited by DiscoBall on 11-30-2009 10:49 AM
Joshua B.
National Instruments
0 Kudos
Message 2 of 13
(4,438 Views)

The recommendation made is inaccurate due to the vague request made in the OP.

 

Do you want 4 graphs on the front panel or do you want 4 plots within one graph?

 

There was a recent post with a similar request here:

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=457536

 

-Bob

Message Edited by B O B on 11-30-2009 10:53 AM
Message Edited by B O B on 11-30-2009 10:53 AM
Message 3 of 13
(4,431 Views)
I need 4 separate graphs on the front panel.
0 Kudos
Message 4 of 13
(4,411 Views)

Do these graphs need to display the same set of data?  Different sets of data?  What have you tried so far?

 

This seems like a very trivial thing to do, where are you running into trouble with this?

 

-Bob

0 Kudos
Message 5 of 13
(4,409 Views)

Bob:

 

Admittedly I am new to labview.  So this is most likely trivial.  The individual graphs would be unique with each having its own data set.  I tried using a for loop and changing the active plot number of the graph property node.  But it keeps writing over the same graph.

 

Thanks

0 Kudos
Message 6 of 13
(4,402 Views)

2009-11-30_133755.jpg

 

Assuming you're generating/acquiring data inside of the inner-most loop, you can enclose the loop inside of another for-loop which calls the inner code to generate multiple data sets.  Finally, index the output for your individual graph data sets.

 

Does this make sense?

 

-Bob

Message 7 of 13
(4,396 Views)
Yes.  Thanks.  I get the idea.
0 Kudos
Message 8 of 13
(4,380 Views)

 

The way it is now I still have to make the individual xy graphs from the front panel.  I want the loop to create the graphs so I don't have to create everyone of them (I have hundreds of graphs).  Is that possible?

 

 

0 Kudos
Message 9 of 13
(4,368 Views)
How do you intend to show hundreds of graphs on one front panel?
0 Kudos
Message 10 of 13
(4,366 Views)