LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean “ok buttons” to default values when running a continues program?

I am having a problem with a program I am writing with Labview. I need the program to run continuously, but when the program goes back around it retains the previous values entered and does not allow me to enter new values. I need the values to return to default after each time the program runs completely through.
0 Kudos
Message 1 of 5
(3,240 Views)

Then you will need to set your controls by using local variables or property nodes (local variables are preferable) at the beginning of your program.  Best way is to use a flat sequence structure.  Put the setting of the controls in the first frame.  Put your while loop that contains your current program in the 2nd frame.  Now whenever you stop the program. (I hope you are not using Run continuous and Abort Execution buttons), then restart it, the controls will be put back to their default values.



artorus wrote:
I am having a problem with a program I am writing with Labview. I need the program to run continuously, but when the program goes back around it retains the previous values entered and does not allow me to enter new values. I need the values to return to default after each time the program runs completely through.



I'm not sure what you mean by "does not allow me to enter new values."  Perhaps you can post your VI so we can take a look at it.


Message Edited by Ravens Fan on 03-03-2008 08:16 PM
Message 2 of 5
(3,238 Views)


artorus wrote:
Boolean “ok buttons” to default values when running a continues program?
I am having a problem with a program I am writing with Labview. I need the program to run continuously, but when the program goes back around it retains the previous values entered and does not allow me to enter new values. I need the values to return to default after each time the program runs completely through.

"OK buttons" are by default set to latch action. Thims means that they will be TRUE only until the are read by the code and then automatically revert to false. This is what you apparently want so there is no need to use locals and sequences.
 
As Ravens said, don't use the "continuous run" mode, but place your code in a suitable while loop.
Message 3 of 5
(3,232 Views)


altenbach wrote:


artorus wrote:
Boolean “ok buttons” to default values when running a continues program?
I am having a problem with a program I am writing with Labview. I need the program to run continuously, but when the program goes back around it retains the previous values entered and does not allow me to enter new values. I need the values to return to default after each time the program runs completely through.

"OK buttons" are by default set to latch action. This means that they will be TRUE only until the are read by the code and then automatically revert to false. This is what you apparently want so there is no need to use locals and sequences.
 
As Ravens said, don't use the "continuous run" mode, but place your code in a suitable while loop.


I was going to comment on the subject of the message being about OK buttons which was kind of confusing, but since the message body just talked about values, I figured the person must have been asking about other controls in general.
 
I guess we should ask the original poster,  "What are you trying to do?  Why do you need the values to return to their defaults?"
Message 4 of 5
(3,229 Views)
I found a solution. Everyones advice lead me to the solution I was looking for. Thanks everyone.
0 Kudos
Message 5 of 5
(3,202 Views)