LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make my VI work as a subvi? Help!!

Hi all.

 

I'm a Labview noob and this is the first VI I've made that actually has a purpose!

 

It uses a state machine to send commands to a PIC microcontroller. 

The VI works fine o its own, but when I make into a subVI, none of the controls work.  The reason why the controls don't work is because they are inside structures, but how do I get thje controls to work?

 

This VI is for my boss so I really need this to work soon!

 

I've attached the VI: [Chopper subVI for LV8.5 version2] and its subVI: [Chopper subVI for LV8.5 (SubVI).vi]

 

Many thanks

 

0 Kudos
Message 1 of 5
(2,714 Views)

The problem is that your VI depends on user interaction. So either you have to display its front panel as popup panel (refer to VI settings >> Window appearance) or you have to remove all code which depends on UI interaction.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(2,698 Views)

Hi, unfortunately the VI has to be user controlled.  So I'll have to try the popup panel.

 

Thanks

 

-Edit-

 

I just looked up VI properties >> Window appearance.  How do you make the VI a popup panel and what will will this allow it to do?

 

Cheers

0 Kudos
Message 3 of 5
(2,691 Views)

Have you already checked out the setting "Dialog"?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 5
(2,686 Views)

R-click the sub-vi and check Sub-vi call setup. There you can select Show Front Panel when called.

That, or VI properties Window Appearance (custom or dialog).

The first one is better if it can work without user interaction and you want the possibility to choose, the 2nd is better if you always must show it. You might even need to use a Invoke Node - Show front panel in code, but that shouldn't be necessary.

 

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 5
(2,677 Views)