LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control Structures interfering with outside Structure code

Basically what I am trying to do is change a set of 4 integer values simultaneously, in a series of steps to ramp up gas flows for a process. So I used a set of nested case structures and a event structure to control this.

The first case structure (outermost) flips from manual control to automatic via the “RxRamp Override” Boolean switch.

The second case structure controls the steps of the reactor startup, and is controlled via the “Step Up” and “Step Down” boolean switches and code within the event structure to increment or decrement the “Step #”.

The third case structure controls which way the process goes, either startup or shutdown.

~~~

So here is my issue, As long as those control structures are in my VI it screws with the code outside said structures.

For example, the Argon and Helium Isolation valves will only open when after clicking the boolean switches and then clicking the safety unlock for the step booleans (this makes the step booleans visible to prevent the operator from accidentally changing the gas flows before the rest of the step procedure is finished)

0 Kudos
Message 1 of 4
(2,266 Views)
It's not clear how your program is even supposed to work. An event structure is supposed to be used inside a while loop. It can't really be used on its own. The top part of the program looks like you're doing some monitoring, but I see no loop. Are you using the "Continuous Run" button on the toolbar? If so, stop, and redesign your program. You need to use loops.

Also, NEVER use local variables when you have the control/indicator right in front of you and you can use wires. This is especially true in the top part of the program where you can eliminate the local variables by using wires going to the controls/indicators that are sitting all by themselves in the top-right hand corner. They're quite lonely, you know. Smiley Wink
Message 2 of 4
(2,248 Views)

You have to replace those decorations on your diagram with structures that actually will execute your program. Smiley Wink

Using the Run Continuous button is not the correct way to keep executing your code. It's more a debug tool than anything else. When you use it, it starts the VI, then stops, then starts again from the beginning, etc. It's like hitting the run button many times. You have no interaction with any of your 'structures' with run continuous.

You should also think about ways to eliminate all of those local variables.

Message 3 of 4
(2,247 Views)
Yeah I was running the program using continous loop. That is how code I inherited worked, I figured that was normal.

Thanks for your help, this is probably the golden solution to all my problems.

Message Edited by pkramer on 04-04-2007 11:44 AM

0 Kudos
Message 4 of 4
(2,239 Views)