From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure

Solved!
Go to solution

Hi there,

 

I'm trying to create a VI that allows me to see different graphs of different functions based on the case that I select. I have a case structure being controlled by a numberic indicator to select each case. In each case there is a graph that is produced from a particular function based on the case. I can't seem to get any graphs to come up at all on run. Right now I have a graph indicator wired for each case but I want to change it so that I have only one graph indicator and the information from the case structure to be inputted into the graph. Any help woould be very much appreciated. 

 

Thank you kindly,

 

James

0 Kudos
Message 1 of 5
(3,381 Views)

Can You back-save that for 2014?

 

One suggestion- it is likely you can simplify your code by putting all the data on one multi plot graph and using the plot visability properties to control the user display.


"Should be" isn't "Is" -Jay
Message 2 of 5
(3,375 Views)

You need to learn about dataflow.

 

While the loops on top run continuously, the case selector gets read exactly once when the program starts and then the inner loop starts forever for whatever case is selected. The loop in the other cases can never run. The case needs to be inside the while loop and not vice versa. You program can never be stoppped, just aborted.

Message 3 of 5
(3,373 Views)

Thank you for you help. I tried updatig it a bit to include some of the tips you guys gave me and saved it as a 2014 file. I tried running the VI but nothing came up on the graphs.

 

Again, thank you for your help; it is very much appreciate,

 

James

0 Kudos
Message 4 of 5
(3,349 Views)
Solution
Accepted by topic author JCG77

@JCG77 wrote:

Thank you for you help. I tried updatig it a bit to include some of the tips you guys gave me and saved it as a 2014 file. I tried running the VI but nothing came up on the graphs.

 

Again, thank you for your help; it is very much appreciate,

 

James


JCG77, your Numeric is outside the loop, so the value change won't affect the data within the loop.

LabVIEW programming is based entirely on dataflow and parallelism. This is incredibly powerful and has lead to its success over the years (coupled with the graphical programming), but is usually one of the first things that new developers stumble over. Here's a simple resource to become more familiar with how it works. The Highlight Execution feature is a great way to watch how your application utilizes dataflow.

 

Also you need to keep a memory of multiple points in order to use a graph. We've been over this before. Refer to your last post where I told you that a graph requires an array of points, not a single point at a time.

 

You need something like this, but you may want to clear the graph memory arrays at some point. Maybe when the case value changes.

Function Gen.PNG

 

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 5 of 5
(3,319 Views)