LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run vi from control on front panel

I've been playing with LabVIEW for two weeks and I wrote a simple VI that measures capacitance on a semi-conductor device (this is a port from an old HT Basic program).  I want a simplified user interface with a large TEST DEVICE button to initiate the test; some operators have a tough time seeing that tiny run button at the top of the window(My Front Panel depicts what I would like have when the VI is complete).  I've combed through examples and read LabVIEW for Everyone (the Run VI method example did not work), but it seems I need some sort of "Cook Book." I tried moving the whole thing into a while loop, but it would not execute, no matter what the while condition was set to.  I also don't like the idea of the entire program being inside one large loop, as it seems rather inelegant.  Any help would be greatly appreciated.
0 Kudos
Message 1 of 6
(3,621 Views)

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

Message 2 of 6
(3,611 Views)

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

Message 3 of 6
(3,609 Views)

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. 😉

Message 4 of 6
(3,601 Views)
I will try your suggestions and report back, hopefully with positive results.  I should mention, however, that ultimately my goal is to be able to test several devices, assign each one a device number and keep all the test data in a single file, hence my determination to have a working TEST DEVICE button. We use a report generator that creates a standard formal report regardless of system (Teradyne, bench top or whatever).  A huge portion of my efforts have gone into making the user experience and the test data appear similar to HT Basic.  Thank you for your prompt responses.
0 Kudos
Message 5 of 6
(3,551 Views)
You should also try the 3488 driver instead of the Instrument I/O Assistant. You reinvented the wheel by using the assistant and it's probably less efficient.
0 Kudos
Message 6 of 6
(3,539 Views)