05-05-2009 01:15 AM
05-05-2009 01:31 AM
Hi softserve,
you definitively need a while loop to keep your vi running. You also need it in other programming languages like C. In your vi is no while loop. Where do you have problems with the while loop? If you write a test programm you should think about the architecture. See the different design patterns (File -> New...).
See also the free online cources to learn more about LabVIEW.
Mike
05-05-2009 01:31 AM
softserve wrote:
(the Run VI method example did not work)
Could you please elaborate here? Did not work means what is happening? Any error messages?
If you are going to use executables, try this one
select "VI Properties" from File menu and under "Execution" tab select "Run when opened". This will avoid the need to use the run button.
Post if you want something else.
Mathan
05-05-2009 01:33 AM
You need to implement the VI as a state machine that starts up in a wait state. Then set the VI to "run when opened" and hide the toolbar.
(Your code is about twice more complicated as it needs to be. Try to simplify!)
softserve wrote:
I also don't like the idea of the entire program being inside one large loop, as it seems rather inelegant.
Inelegant is to run the VI with the run button! Keep the diagram at a normal size and you don't need a "large" while loop to surround the code. 😄
softserve wrote:
I tried moving the whole thing into a while loop, but it would not execute, no matter what the while condition was set to.
Can you show us that code? Having a while loop does not magically run the program automatically. Maybe you have some misconception. 😉
05-05-2009 10:58 AM
05-05-2009 11:38 AM