03-11-2012 08:56 AM
Hello all
I am trying to initialize default values to controls right after the run button is hit. It is working only if the control is loaded with default values before running. I am an amature and any kind of help will be truly appreciated.
Solved! Go to Solution.
03-11-2012 11:02 AM
In block diagram, over the control icon: left click -> create property node -> value
Then you can wire some constant and put before all your code.
For more help, use Save for previus version. Some still use older version of LabVIEW
Regards
03-11-2012 01:07 PM
Your VI is silly. You have to understand dataflow. You have no idea if the control is going to write to the indicator first or if the case statement will execute. What will you eventually be doing with your program. I would hope that you have some sort of while loop (do NOT use the run continuous button). Then the method would just be outside the loop and execute once - no need for a case statement. You could also place it inside the first state of a state machine.
03-12-2012 12:04 AM
Thank you Dennis for your crtical remarks. I used a while loop and removed the case structure. The vi works as desired. Still i have loads to learn.
Thanks 🙂
03-12-2012 01:37 AM
Thank you mahu.It took me sometime to figure out how to wire. Now its working perfect.
03-12-2012 08:46 AM
03-13-2012 12:39 AM
wow this is do much fun. Thanks alten