LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Button that initializes values then releases control of further booleans

Solved!
Go to solution

I am attempting to create a button that turns on a series of other buttons but then releases control to allow individual switching. The problem is that for my project I must run the labview file continuously so when I change a control switch to true it keeps the value of the other booleans true. For example, I flick a switch to turn all the lights on at the same time but then later want to have the power to individually turn particular lights off. Then also have the ability to turn all the lights off again with a click of a button. I'm having trouble figuring this out. I don't have much so far, sorry for that. 

0 Kudos
Message 1 of 16
(3,268 Views)
Solution
Accepted by topic author JShultz89

Like this?

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
Message 2 of 16
(3,262 Views)

This is perfect! Thank you. I must have missed that exercise. 

0 Kudos
Message 3 of 16
(3,258 Views)

I found an issue with the way the values are passed. My program is continuously updating a series of variables as the calculation changes with time. The switch values are not passed until the button is pressed. Is there a way to alter the example so that it will store the values as an array and continuously run the calculation without pausing for the new input. 

 

The boolean values out of the switchs are wired to an array that is wired to a For Loop that rewrites the values of an array depending on the boolean. Basically, the For Loop appears to be pausing, waiting for new values to be passed before updating the results inside the array. 

0 Kudos
Message 4 of 16
(3,237 Views)

Can you post your code?

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 5 of 16
(3,227 Views)

Attached are the 3 files necessary for running the Matrix Control VI. It's basically a solar tracking program. 

0 Kudos
Message 6 of 16
(3,184 Views)

@JShultz89 wrote:

I found an issue with the way the values are passed. My program is continuously updating a series of variables as the calculation changes with time. The switch values are not passed until the button is pressed. Is there a way to alter the example so that it will store the values as an array and continuously run the calculation without pausing for the new input. 

 

The boolean values out of the switchs are wired to an array that is wired to a For Loop that rewrites the values of an array depending on the boolean. Basically, the For Loop appears to be pausing, waiting for new values to be passed before updating the results inside the array. 


I looked at your code and I'm not sure I fully understand your problem. Is the "MatrixControl.vi" a SubVI? Could you explain in more detail what you are trying to accomplish?

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 7 of 16
(3,170 Views)

The Matrix Control is actually the master vi. The matrix control vi is used to take relative positions in the world to orient a tracking device to where it is and then where it should be pointing to look at the sun. It first takes location (lat and long), then orientation (horizontal or vertical and south facing angle), then makes small corrections. The NOAA vi gives sun position. The angular correction vi calculates the angle at which the device should point. Anyway, with the knowledge of where it is located and then where the sun is in the sky, it knows the angle at which the tracking should be pointed to look at the sun. Because this whole process is dependent upon the time and the suns movement, the VI must run continuously. I'm passing a series of degree values in an array to feed to each device.

 

I want to be able to turn the continuous angular result (from all the caculations) of the device off by changing the number to a constant. This would be best controlled with a series of switches that alters the array to receive the calculations or sets the array to 0's. I imagine a boolean array that matches the pattern of array values coming in. By indexing the values to the For Loop I can individually turn pieces on and off. But I need a master switch to pass a boolean to all the switch but then release it's continuous control until its used again. 

 

Just let me know if this doesn't make sense. Thank you for your help. 

0 Kudos
Message 8 of 16
(3,165 Views)

The most confusing part is that I see no structure in your program that would allow it to run continuously. Are you using the "Run Continuously" button on the toolbar?

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 9 of 16
(3,161 Views)

That is correct. 

0 Kudos
Message 10 of 16
(3,153 Views)