LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with case structure execution

Within my vi have a ring that I use to control the case structure. the case strucutre is basically used to cut the signal into different size pieces. The property nodes I have are to make things visible or not depending on what case I choose. The problem is that I don't actually see whatever is supposed to be visible until I push a button going to the event structure. I dont understand why this is happening because as far as I can tell I am following the rules of dataflow. I want to be able to have the case structure execute before even thinking about the event structure. Any thoughts as to why the indicators are not visible until after the event structure is entered?


Message Edited by Intern Liz on 04-15-2008 03:36 PM
0 Kudos
Message 1 of 7
(3,288 Views)
What is the point of the event structure? How many event cases are there? If you want to execute the code of one case unconditionally, just remove the event structure. It does not make much sense to even have it, because only one event can execute anyway per dataset from what I can guess from the picture.
 
Why dont you attach the entire code so we can tell.
0 Kudos
Message 2 of 7
(3,276 Views)
I have the event structure because there are two cases. I have attached the code below.
Message Edited by Intern Liz on 04-16-2008 07:09 AM

Message Edited by Intern Liz on 04-16-2008 07:10 AM
0 Kudos
Message 3 of 7
(3,236 Views)

Your code is way too convoluted and crosslinked and can be dramatically simplified and refactored. (e.g. You only need one instance of each property node).

Try e.g. the attached quick modification (not fully tested).

Let me know if you have questions.

0 Kudos
Message 4 of 7
(3,206 Views)

Thank you so much. I guess this is one instance of where teaching yourself LabVIEW causes you to make things 10 times more complicated than they need to be. I will definitely be going back to my main vi and subvis to clean up the code where I use property nodes.

The modifications you made do generally work. The only part that doesnt completely work is the default that doesnt cut the signal, it just passes the signal straight through. When the vi first opens it doesnt pull up that fft and pushing the perform fft button still does nothing. It is not until you choose a different fft style and then go back to default that it will appear. I don't understand why this happens because logically the code should work as it is.

0 Kudos
Message 5 of 7
(3,184 Views)

 



Intern Liz wrote:

 When the vi first opens it doesnt pull up that fft and pushing the perform fft button still does nothing.



Sorry, I forgot about that. Easy solution: just fire the "cut case" once at program start with a signaling value property node as in the attached modification.
 
 
0 Kudos
Message 6 of 7
(3,180 Views)
Thanks again altenbach. You have helped me out alot here and through all of the other posts that I have read that you helped people on.
0 Kudos
Message 7 of 7
(3,177 Views)