LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Basic user interface design in LabView 5.1?

What is the best way to design user interfaces in LabView 5.1? The question does not concern visual matters, only functional.

For instance, I have a main VI that is the UI and subVIs that performs actual test sequences. The UI has an Abort button that should stop the execution of a subVI. But when the subVI is being executed, the main VI (UI) is not active and "does not care" if I press the Abort button. I know that I can use the Invoke Node function, but is there a better way?

Another typical example is a numeric indicator in the UI that gives the user info about the test progress in the subVI.

These problems can be avoided by putting ALL code in the main VI, but this destroys the modularity of the code.

So basi
cally: how do I combine the use of subVIs and the ability to interact with the application by using controls and indicators in a main VI (UI)?

(I have a feeling that this would be easier with LV 6, but I have to stick to 5.1...)
0 Kudos
Message 1 of 3
(2,981 Views)
One solution would be to create a LV2 Style Global (unitialized shift register) in an action engine to write and to read your values. So in your subvi you can use the write action to write your boolean and in the top level application you can read the boolean and stop the top level application. You could do this for the value also. Hope this helps.
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 2 of 3
(2,981 Views)
Hi Tom
A technique of de-coupling the front panel is described in our book "A
Software Engineering approach to LabVIEW".
Have a look at the example code in
http://authors.phptr.com/watts/downloads/labview511.html
its chapter 6 LCOD user interface.

Essentially you queue front panel states using a seperate queueing
component.
If you have any questions email me (our website link is
www.ssdc.co.uk)
Best of Luck
Steve Watts
SSDC

Tom C wrote in message news:<50650000000800000028A90000-1066448259000@exchange.ni.com>...
> What is the best way to design user interfaces in LabView 5.1? The
> question does not concern visual matters, only functional.
>
> For instance, I have a main VI that is the UI and subVIs that performs
> actual test sequences. Th
e UI has an Abort button that should stop the
> execution of a subVI. But when the subVI is being executed, the main
> VI (UI) is not active and "does not care" if I press the Abort button.
> I know that I can use the Invoke Node function, but is there a better
> way?
>
> Another typical example is a numeric indicator in the UI that gives
> the user info about the test progress in the subVI.
>
> These problems can be avoided by putting ALL code in the main VI, but
> this destroys the modularity of the code.
>
> So basically: how do I combine the use of subVIs and the ability to
> interact with the application by using controls and indicators in a
> main VI (UI)?
>
> (I have a feeling that this would be easier with LV 6, but I have to
> stick to 5.1...)
0 Kudos
Message 3 of 3
(2,981 Views)